Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
An example Webpack configuration file. https://webpack.js.org/guides/code-splitting/
const path = require('path');
module.exports = {
mode: 'development',
entry: {
index: './src/index.js',
another: './src/another-module.js',
index: {
import: './src/index.js',
dependOn: 'shared',
},
another: {
import: './src/another-module.js',
dependOn: 'shared',
},
shared: 'lodash',
},
output: {
filename: '[name].bundle.js',
path: path.resolve(__dirname, 'dist'),
},
};
@studyroom1
Copy link

studyroom1 commented Aug 13, 2021

please check your mail from nft30001

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment