mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 14:38:45 +00:00
feat(phone/webpack): Allow for use of react-devtools in game
This is dynamically added to the bundle depending on the environment. In production, react-devtools will not be bundled. Build a development bundle using `yarn build:dev`
This commit is contained in:
1 parent
eaf27f37ef
commit
7b6d49f661
6 files changed
+730
-54
No files matched your search
@@ -0,0 +1,21 @@
|
||||
const path = require('path');
|
||||
const CommonWebpack = require('./webpack.common');
|
||||
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
||||
|
||||
module.exports = CommonWebpack({
|
||||
mode: 'development',
|
||||
devtool: 'inline-source-map',
|
||||
entry: ['react-devtools', './src/index.tsx'],
|
||||
// Output path
|
||||
output: {
|
||||
path: path.resolve(process.cwd(), 'build'),
|
||||
filename: 'index.js',
|
||||
},
|
||||
plugins: [
|
||||
new HtmlWebpackPlugin({
|
||||
template: 'public/index.html',
|
||||
inject: true,
|
||||
minify: false,
|
||||
}),
|
||||
],
|
||||
});
|
||||
Reference in new issue
Block a user