Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 41c18ee

Browse files
author
Emile Frey
committed
setting some env for deployment
1 parent ebf66d8 commit 41c18ee

File tree

3 files changed

+20
-1
lines changed

3 files changed

+20
-1
lines changed

‎frontend/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"scripts": {
77
"test": "echo \"Error: no test specified\" && exit 1",
88
"start": "webpack serve --config webpack.config.dev.js --mode development --host 0.0.0.0 --port 3000",
9-
"build": "webpack --config webpack.config.base.js --mode production",
9+
"build": "webpack --config webpack.config.prod.js --mode production",
1010
"serve": "http-server ./dist"
1111
},
1212
"keywords": [],

‎frontend/webpack.config.dev.js‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,13 @@ config.devServer = {
1212
overlay: true
1313
},
1414

15+
16+
config.plugins = config.plugins.concat([
17+
new webpack.DefinePlugin({
18+
'process.env.NODE_ENV': JSON.stringify('development')
19+
})
20+
])
21+
1522
config.mode = "development"
1623

1724
module.exports = config

‎frontend/webpack.config.prod.js‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
const webpack = require("webpack");
2+
var config = require('./webpack.config.base.js')
3+
4+
config.plugins = config.plugins.concat([
5+
new webpack.DefinePlugin({
6+
'process.env.NODE_ENV': JSON.stringify('production')
7+
})
8+
])
9+
10+
config.mode = "production"
11+
12+
module.exports = config

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /