node-config
node-config copied to clipboard
warning `Critical dependency: the request of a dependency is an expression` when build with webpack
there is a warning build with webpack.
WARNING in ../../node_modules/config/parser.js 190:11-28
Critical dependency: the request of a dependency is an expression
@ ../../node_modules/config/lib/config.js 10:13-33
@ ./src/index.js 5:85-112 6:313-323
the problem is at lib/config.js: 584
NODE_CONFIG_PARSER = util.initParam('NODE_CONFIG_PARSER');
if (NODE_CONFIG_PARSER) {
try {
var parserModule = Path.isAbsolute(NODE_CONFIG_PARSER)
? NODE_CONFIG_PARSER
: Path.join(CONFIG_DIR, NODE_CONFIG_PARSER);
Parser = require(parserModule);
}
catch (e) {
console.warn('Failed to load config parser from ' + NODE_CONFIG_PARSER);
console.log(e);
}
}
maybe need change require(parserModule) torequire(${parserModule})?
Did you search the issues for webpack and review the other webpack issues before adding a new one?
Closing due to lack of interest and follow-up. The node-config maintainers don't use webpack. No one else has contributed a PR for this or commented in about a year, so it does not seem to a priority for nearly all users. If someone wants to submit a PR to improve webpack support, feel free.