From 9c386c4bdc32045e0462e02a888dd9b241d9619d Mon Sep 17 00:00:00 2001 From: Dr_rOot Date: Mon, 16 Sep 2019 11:34:12 +0800 Subject: [PATCH] fix: process is not defined at node 12.x #267 https://github.com/SimulatedGREG/electron-vue/issues/871#issuecomment-490370237 --- .electron-vue/webpack.renderer.config.js | 12 ++++++++++++ .electron-vue/webpack.web.config.js | 12 ++++++++++++ 2 files changed, 24 insertions(+) diff --git a/.electron-vue/webpack.renderer.config.js b/.electron-vue/webpack.renderer.config.js index 1daa2a567..65e225e9b 100644 --- a/.electron-vue/webpack.renderer.config.js +++ b/.electron-vue/webpack.renderer.config.js @@ -166,6 +166,18 @@ let rendererConfig = { filename: 'index.html', chunks: ['index'], template: path.resolve(__dirname, '../src/index.ejs'), + templateParameters(compilation, assets, options) { + return { + compilation: compilation, + webpack: compilation.getStats().toJson(), + webpackConfig: compilation.options, + htmlWebpackPlugin: { + files: assets, + options: options + }, + process + } + }, // minify: { // collapseWhitespace: true, // removeAttributeQuotes: true, diff --git a/.electron-vue/webpack.web.config.js b/.electron-vue/webpack.web.config.js index 058cf4150..0c6a7a349 100644 --- a/.electron-vue/webpack.web.config.js +++ b/.electron-vue/webpack.web.config.js @@ -134,6 +134,18 @@ let webConfig = { filename: 'index.html', chunks: ['index'], template: path.resolve(__dirname, '../src/index.ejs'), + templateParameters(compilation, assets, options) { + return { + compilation: compilation, + webpack: compilation.getStats().toJson(), + webpackConfig: compilation.options, + htmlWebpackPlugin: { + files: assets, + options: options + }, + process + } + }, // minify: { // collapseWhitespace: true, // removeAttributeQuotes: true,