Config files in custom plugin

Hello Team,
I am working on custom Kibana plugin.
Could you please help me understand how can I keep common settings in configuration file so that I don't have to rebuild the code.
I tried creating conf.js (at root level in <plugin_name> folder )file and import it using require('conf.js') in router js but I am getting cannot find module error.

Kibana version : 6.7

Thank you for your help and support.
Thank you,
Aditya Deshpande

Hi there Aditya!

You'll need to use a relative import to get access to that file:

import conf from './conf';
// or
const conf = require('./conf');

Hi joshdover,
Sorry for the delayed response.
I tried to add config.js with const values, I was getting module not found error. When looked at the zip file in build folder I realised the file is not available in the zip folder.
Could you please help me understand how yarn build creates zip and copies file.

Thank you for your help and support.

Thank you,
Aditya

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.