0.0.5 • Published 3 years ago

@daipeng7/dll-webpack-plugin v0.0.5

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

Build Status https://webpack.docschina.org/configuration/

@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, default development

context

  • condition: context is process cwd, default process.cwd()

entry

  • condition: entry is same of webpack config (just boject mode)

output

  • condition: output is same of webpack config

asset