Skip to content

Instantly share code, notes, and snippets.

@bennycode
Created August 15, 2022 22:45
Show Gist options
  • Save bennycode/7ba37ca4ae29837dcd4007738a465e05 to your computer and use it in GitHub Desktop.
Save bennycode/7ba37ca4ae29837dcd4007738a465e05 to your computer and use it in GitHub Desktop.
Multiple Webpack Output Libraries
module.exports = {
devtool: 'source-map',
entry: {
[projectName]: `${__dirname}/${pkg.main}`,
},
externals: {
dexie: 'Dexie',
},
mode: 'production',
output: {
filename: '[name].bundle.js',
library: 'StoreEngine',
path: `${__dirname}/dist`,
publicPath: '/',
},
plugins: [new webpack.BannerPlugin(`${pkg.name} v${pkg.version}`)],
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment