Skip to content

Commit

Permalink
Webpack adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
nickgirardo committed Aug 11, 2021
1 parent b551cab commit fa35c14
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
9 changes: 7 additions & 2 deletions conf/webpack.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ module.exports = {
entry: './src/index.tsx',
devtool: 'inline-source-map',
output: {
publicPath: '/',
path: path.resolve(__dirname, '../build'),
filename: '[name].js',
filename: 'bundle.js',
},
resolve: {
extensions: ['', '.js', '.ts', '.jsx', '.tsx'],
Expand Down Expand Up @@ -36,7 +37,11 @@ module.exports = {
}),
],
devServer: {
contentBase: path.resolve(__dirname, './build'),
contentBase: path.resolve(__dirname, '../build'),
historyApiFallback: {
disableDotRule: true,
index: '/',
},
},
watchOptions: {
ignored: /node_modules/,
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"typescript": "^4.3.5"
},
"scripts": {
"prestart": "if [ -d \"build\" ]; then rm -r \"build\"; fi",
"start": "webpack serve --config conf/webpack.dev.js",
"prebuild": "if [ -d \"build\" ]; then rm -r \"build\"; fi",
"build": "webpack --config conf/webpack.prod.js",
Expand Down

0 comments on commit fa35c14

Please sign in to comment.