Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug Report] ToastPlugin导致打包体积过大 #58

Open
preinoch opened this issue May 3, 2018 · 1 comment
Open

[Bug Report] ToastPlugin导致打包体积过大 #58

preinoch opened this issue May 3, 2018 · 1 comment

Comments

@preinoch
Copy link

preinoch commented May 3, 2018

vux-loader version

1.2.8

OS/Browsers version

windows 10

Vue version

2.5.16

Code

import Vue from 'vue'
import '@/modules/bootstrap'
import router from '@/router'
import Chest from '@/components/Chest'
import Vuex from 'vuex'
import store from '@/store'
import {getLoginData} from '@/modules/util'

import  { ToastPlugin } from "vux"
Vue.use(ToastPlugin)

getLoginData()

const app = new Vue({
    el: '#app',
    router,
    store,
    template: '<chest></chest>',
    components: { Chest },
});            

Steps to reproduce

其他组件引用正常,但引入ToastPlugin 后打包Console出现警告:

如果你看到这一行,说明 vux-loader 配置有问题或者代码书写规范的原因导致无法解析成按需引入组件,会导致打包体积过大。请升级到最新版本 vux-loader,建议开启 eslint(standard)。

如果注释掉

import  { ToastPlugin } from "vux"
Vue.use(ToastPlugin)

则打包正常

What is Expected?

ToastPlugin 引入正常

What is actually happening?

ToastPlugin 引入不正常

@chenyin151
Copy link

我也遇到这问题,不知道解决了没

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants