Skip to content

Commit 7556abd

Browse files
chore(build): add process node env to builds
1 parent 3d65752 commit 7556abd

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

packages/node_modules/overmind-devtools/webpack.config.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
const webpack = require('webpack')
12
const HtmlWebpackPlugin = require('html-webpack-plugin')
23
const path = require('path')
34

@@ -33,5 +34,10 @@ module.exports = {
3334
resolve: {
3435
extensions: ['.js', '.tsx', '.ts'],
3536
},
36-
plugins: [new HtmlWebpackPlugin()],
37+
plugins: [
38+
new HtmlWebpackPlugin(),
39+
new webpack.DefinePlugin({
40+
'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV),
41+
}),
42+
],
3743
}

packages/overmind-website/webpack.config.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
const webpack = require('webpack')
12
const HtmlWebpackPlugin = require('html-webpack-plugin')
23
const path = require('path')
34

@@ -55,5 +56,8 @@ module.exports = {
5556
new HtmlWebpackPlugin({
5657
template: path.join(__dirname, 'backend', 'index.html'),
5758
}),
59+
new webpack.DefinePlugin({
60+
'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV),
61+
}),
5862
],
5963
}

0 commit comments

Comments
 (0)