Skip to content

Commit 9c386c4

Browse files
committed
fix: process is not defined at node 12.x #267
SimulatedGREG/electron-vue#871 (comment)
1 parent a1eb489 commit 9c386c4

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

.electron-vue/webpack.renderer.config.js

+12
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,18 @@ let rendererConfig = {
166166
filename: 'index.html',
167167
chunks: ['index'],
168168
template: path.resolve(__dirname, '../src/index.ejs'),
169+
templateParameters(compilation, assets, options) {
170+
return {
171+
compilation: compilation,
172+
webpack: compilation.getStats().toJson(),
173+
webpackConfig: compilation.options,
174+
htmlWebpackPlugin: {
175+
files: assets,
176+
options: options
177+
},
178+
process
179+
}
180+
},
169181
// minify: {
170182
// collapseWhitespace: true,
171183
// removeAttributeQuotes: true,

.electron-vue/webpack.web.config.js

+12
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,18 @@ let webConfig = {
134134
filename: 'index.html',
135135
chunks: ['index'],
136136
template: path.resolve(__dirname, '../src/index.ejs'),
137+
templateParameters(compilation, assets, options) {
138+
return {
139+
compilation: compilation,
140+
webpack: compilation.getStats().toJson(),
141+
webpackConfig: compilation.options,
142+
htmlWebpackPlugin: {
143+
files: assets,
144+
options: options
145+
},
146+
process
147+
}
148+
},
137149
// minify: {
138150
// collapseWhitespace: true,
139151
// removeAttributeQuotes: true,

0 commit comments

Comments
 (0)