-
-
Save rusty-key/fa83afbd2e4a62b1dfb77124aa1c08be to your computer and use it in GitHub Desktop.
webpack.config.js
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
module.exports = (_, argv) => { | |
return { | |
entry: { | |
app1: "/path/to/app1/index.js", | |
app2: "/path/to/app2/index.js", | |
app3: "/path/to/app3/index.js", | |
}, | |
optimization: { | |
splitChunks: { | |
cacheGroups: { | |
react: { | |
name: 'react', | |
chunks: 'all', | |
test: /[\\/]node_modules[\\/](react|react-dom|reason-react)[\\/]/, | |
}, | |
intl: { | |
name: 'intl', | |
chunks: 'all', | |
test: /[\\/]node_modules[\\/](react-intl|bs-react-intl|intl-.*)[\\/]/, | |
}, | |
vendors: { | |
name: 'vendors', | |
chunks: 'all', | |
test: /[\\/]node_modules[\\/]/, | |
}, | |
shared: { | |
name: 'shared', | |
chunks: 'all', | |
test: /[\\/]shared[\\/]/, | |
}, | |
} | |
}, | |
} | |
}; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment