@daipeng7/dll-webpack-plugin
v0.0.5
Published
a simple plugin for dll bundle
Downloads
12
Readme
@daipeng7/dll-webpack-plugin
a simple plugin for dll bundle
Install
npm i -D @daipeng7/dll-webpack-plugin
or
yarn add -D @daipeng7/dll-webpack-plugin
Example
new DllWebpackPlugin({
mode: process.env.NODE_ENV,
context: resolve(''),
entry: {
vue: [
require.resolve('vue/dist/vue.esm.js'),
'vue-router',
'vuex',
],
utils: ['axios']
},
output: {
path: resolve('./dll'),
filename: '[name]/[name].dll.js',
library: '[name]_library'
},
asset: {
publicPath: '/static/dll',
outputPath: 'static/dll',
hash: true
}
})
Options
mode
- condition:
mode
is environment variable, defaultdevelopment
context
- condition:
context
is process cwd, defaultprocess.cwd()
entry
- condition:
entry
is same of webpack config (just boject mode)
output
- condition:
output
is same of webpack config
asset
- condition:
asset
is same of add-asset-html-webpack-plugin config