updated webpack config file and updated readme file
This commit is contained in:
@@ -12,6 +12,7 @@ This project is a simplified front end clone of Netflix. It was created with Rea
|
|||||||
- [ ] Update carousel to current styling
|
- [ ] Update carousel to current styling
|
||||||
- [ ] Create movie page screen
|
- [ ] Create movie page screen
|
||||||
- [ ] Migrate to Typescript
|
- [ ] Migrate to Typescript
|
||||||
|
- [ ] Implement dynamic code splitting with dynamic imports
|
||||||
|
|
||||||
### Tools used
|
### Tools used
|
||||||
|
|
||||||
|
|||||||
@@ -20,11 +20,23 @@ module.exports = () => {
|
|||||||
return {
|
return {
|
||||||
entry: './src/index.js',
|
entry: './src/index.js',
|
||||||
output: {
|
output: {
|
||||||
|
filename: '[name].[contenthash].js',
|
||||||
path: path.resolve(__dirname, 'dist'),
|
path: path.resolve(__dirname, 'dist'),
|
||||||
filename: 'bundle.js',
|
|
||||||
publicPath: '/',
|
|
||||||
clean: true,
|
clean: true,
|
||||||
},
|
},
|
||||||
|
optimization: {
|
||||||
|
runtimeChunk: 'single',
|
||||||
|
moduleIds: 'deterministic',
|
||||||
|
splitChunks: {
|
||||||
|
cacheGroups: {
|
||||||
|
vendor: {
|
||||||
|
test: /[\\/]node_modules[\\/]/,
|
||||||
|
name: 'vendors',
|
||||||
|
chunks: 'all',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
mode: prod ? 'production' : 'development',
|
mode: prod ? 'production' : 'development',
|
||||||
// Enable sourcemaps for debugging webpack's output.
|
// Enable sourcemaps for debugging webpack's output.
|
||||||
devtool: prod ? 'none' : 'eval-source-map',
|
devtool: prod ? 'none' : 'eval-source-map',
|
||||||
|
|||||||
Reference in New Issue
Block a user