zweizhao.github.io

项目,文章,随笔,博客,Markdown,个人网站,人生感悟。

View on GitHub
const webpack = require('webpack')
const library = '[name]_lib'
const path = require('path')

module.exports = {
    entry: {
    vendors: ['vue/dist/vue.esm.js', 'vue-router','vuex']
},

output: {
    filename: '[name].dll.js',
    path: path.join(__dirname,'dist'),
    library
},

plugins: [
    new webpack.DllPlugin({
        path: path.join(__dirname, 'dist/[name]-manifest.json'),
            // This must match the output.library option above
            name: library
        }),
    ],
}