Skip to content

Commit

Permalink
feat(renderer): added new config param process.env
Browse files Browse the repository at this point in the history
This new config param lets you extend the define plugin in the client renderer.
  • Loading branch information
exreplay committed Jun 14, 2019
1 parent a47961d commit 27fe2e7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 4 additions & 1 deletion packages/config/configs/renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,8 @@ export default () => ({
base: false,
client: false,
server: false,
sw: false
sw: false,
process: {
env: {}
}
});
3 changes: 2 additions & 1 deletion packages/renderer/src/client.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ export default class WebpackClientConfiguration extends WebpackBaseConfiguration
.use(webpack.DefinePlugin, [{
'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV || 'development'),
'process.env.VUE_ENV': JSON.stringify('client'),
'PRODUCTION': this.isProd
'PRODUCTION': this.isProd,
...this.globalConfig.process.env
}])
.end()
.plugin('vue-ssr-client')
Expand Down

0 comments on commit 27fe2e7

Please sign in to comment.