Critical dependency: require function is used in a way in which dependencies cannot be statically ex

webpack配置html-webpack-plugin时,报警如下:

WARNING in ./node_modules/html-webpack-plugin/index.js 134:15-22
Critical dependency: require function is used in a way in which dependencies cannot be statically extracted 

解决:

module下加入以下语句即可

unknownContextCritical: false,

你可能感兴趣的:(webpack,webpack)