asfktz / autodll-webpack-plugin

Webpack's DllPlugin without the boilerplate
MIT License
1.46k stars 80 forks source link

I try to usein local package(alias), but plugin don't work? #109

Closed icai closed 6 years ago

icai commented 6 years ago

As the title, my config is following.

  new AutoDllPlugin({
    inject: true, // will inject the DLL bundles to index.html
    filename: '[name].[hash:5].js',
    path: './dll',
    entry: {
      lib: [
        'jquery',
        'mini'
      ],
      vendor: ['vue', 'iview']
    }
  }),

mini package is my local privite package.

webpack config

  resolve: {
    extensions: ['.js', '.jsx', '.vue', '.json'],
    alias: {
     'vue$': 'vue/dist/vue.esm.js',
      mini: resolve('packages/mini'),
    }
  },

mini.js

require('./boot2.js')
require('jquery')
require('./miniui/miniui-source.js')

export default window.mini