updated webpack config file and updated readme file

This commit is contained in:
andres alcocer
2022-11-24 15:16:38 -05:00
parent 64ee9007f2
commit b8105a9c29
2 changed files with 15 additions and 2 deletions

View File

@@ -12,6 +12,7 @@ This project is a simplified front end clone of Netflix. It was created with Rea
- [ ] Update carousel to current styling
- [ ] Create movie page screen
- [ ] Migrate to Typescript
- [ ] Implement dynamic code splitting with dynamic imports
### Tools used

View File

@@ -20,11 +20,23 @@ module.exports = () => {
return {
entry: './src/index.js',
output: {
filename: '[name].[contenthash].js',
path: path.resolve(__dirname, 'dist'),
filename: 'bundle.js',
publicPath: '/',
clean: true,
},
optimization: {
runtimeChunk: 'single',
moduleIds: 'deterministic',
splitChunks: {
cacheGroups: {
vendor: {
test: /[\\/]node_modules[\\/]/,
name: 'vendors',
chunks: 'all',
},
},
},
},
mode: prod ? 'production' : 'development',
// Enable sourcemaps for debugging webpack's output.
devtool: prod ? 'none' : 'eval-source-map',