airyland / vux-loader

hack into vue-loader
64 stars 37 forks source link

关于以插件形式调用 ConfirmPlugin , 会导致Vux打包过大的问题 #31

Closed cnlinjie closed 7 years ago

cnlinjie commented 7 years ago

vux 和vux-loader版本:

"vux": "^2.5.0"
"vux-loader": "^1.1.1",

目前已经在webpack.base.js 里面配置:

module.exports = vuxLoader.merge(webpackBaseConf, {
  plugins: ['vux-ui','progress-bar', 'duplicate-style']
})

已经生效,开发了一个月多月一直没什么问题。 今天想使用ConfirmPlugin 插件时,发现在单独一个页面引入的会失败,后在根据文档示例

import  { ConfirmPlugin } from 'vux'
Vue.use(ConfirmPlugin)

然后在页面调用

this.$vux.confirm.show({
                    title: 'title',
                    content: 'content。',
                    onConfirm () {
                       alert('yes');
                    }
                });

则可以使用,但是会console 会提示

image

cnlinjie commented 7 years ago

额,提问错地方了,我放到vux