Html Webpack Plugin: ReferenceError: process is not defined

Html Webpack Plugin:
ReferenceError: process is not defined
Html Webpack Plugin: ReferenceError: process is not defined_第1张图片
Html Webpack Plugin: ReferenceError: process is not defined_第2张图片

  templateParameters(compilation, assets, options) {
    return {
      compilation: compilation,
      webpack: compilation.getStats().toJson(),
      webpackConfig: compilation.options,
      htmlWebpackPlugin: {
        files: assets,
        options: options
      },
      process,
    };
  },

这个问题是由于nodejs版本太高引起(>12)如果不想降级,可采用这种方案

参考资料:

https://github.com/SimulatedGREG/electron-vue/issues/871

你可能感兴趣的:(前端)