I'm setting up a package to pull settings from the package.json of the application using the package. I'm currently doing that with this code:
var path = require('path');
var packageSettings = require(path.resolve('package.json'));
export default packageSettings.myPackage || {};
However, node/webpack throws this warning:
Critical dependency: the request of a dependency is an expression
I tried searching for a way to do this and had no luck. The documentation on config
makes it sound like that applies only to scripts. Is this the best way to do this, or is there another?