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:
Taso committed 2021-02-08 23:00:33 -05:00
1 parent eaf27f37ef
commit 7b6d49f661
6 files changed
+730 -54

No files matched your search

+21
View File
@@ -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,
}),
],
});