张恒

修正当nodejs>=12时发生的process is not defind问题

...@@ -146,9 +146,19 @@ let rendererConfig = { ...@@ -146,9 +146,19 @@ let rendererConfig = {
146 removeAttributeQuotes: true, 146 removeAttributeQuotes: true,
147 removeComments: true 147 removeComments: true
148 }, 148 },
149 - nodeModules: process.env.NODE_ENV !== 'production' 149 + templateParameters(compilation, assets, options) {
150 - ? resolve('node_modules') 150 + return {
151 - : false 151 + compilation: compilation,
152 + webpack: compilation.getStats().toJson(),
153 + webpackConfig: compilation.options,
154 + htmlWebpackPlugin: {
155 + files: assets,
156 + options: options
157 + },
158 + process,
159 + };
160 + },
161 + nodeModules: false
152 }), 162 }),
153 new webpack.HotModuleReplacementPlugin(), 163 new webpack.HotModuleReplacementPlugin(),
154 new webpack.NoEmitOnErrorsPlugin() 164 new webpack.NoEmitOnErrorsPlugin()
......