I have a nodejs app which exports a function, using that function I want to retreive the resulted object and include it in the webpack bundle. I tried webpack magic comment webpackIgnore
but it also ignores to include the function result in the bundle. Like following:
const getConfig = import('../interface' /* webpackIgnore: true */);
const config = getConfig();
What I need is the const config
result included in the bundle. How can I do that?
Disclaimer: this example is just a quick random snippet made to show the point.