Skip to content

Commit 578342e

Browse files
chore(website): turn off devtools in production
1 parent 7556abd commit 578342e

File tree

3 files changed

+9
-12
lines changed

3 files changed

+9
-12
lines changed

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

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
const webpack = require('webpack')
21
const HtmlWebpackPlugin = require('html-webpack-plugin')
32
const path = require('path')
43

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

packages/overmind-website/src/app/index.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,11 @@ declare module 'overmind' {
1515
interface IConfig extends TConfig<typeof config> {}
1616
}
1717

18-
export default new Overmind(config)
18+
export default new Overmind(
19+
config,
20+
process.env.NODE_ENV === 'production'
21+
? {
22+
devtools: false,
23+
}
24+
: {}
25+
)

packages/overmind-website/webpack.config.js

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

@@ -56,8 +55,5 @@ module.exports = {
5655
new HtmlWebpackPlugin({
5756
template: path.join(__dirname, 'backend', 'index.html'),
5857
}),
59-
new webpack.DefinePlugin({
60-
'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV),
61-
}),
6258
],
6359
}

0 commit comments

Comments
 (0)