-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
32f1b5e
commit 1b3940b
Showing
3 changed files
with
29 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,22 @@ | ||
const path = require('path'); | ||
const config = require('./webpack.config.js'); // Import your existing webpack config | ||
|
||
module.exports = { | ||
...config, | ||
mode: 'development', | ||
output: { | ||
filename: 'bundle.js', // Static filename for development | ||
path: path.resolve(__dirname, 'dist'), | ||
publicPath: '/', // Ensure this is set correctly | ||
}, | ||
devServer: { | ||
compress: true, // Enable gzip compression | ||
port: 3000, // Port to run dev server on | ||
hot: true, // Enable hot module replacement, | ||
historyApiFallback: true // This option is crucial for handling client-side routing | ||
}, | ||
optimization: { | ||
...config.optimization, | ||
splitChunks: false, // Disable chunk splitting in dev | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters