为了账号安全,请及时绑定邮箱和手机立即绑定

nuxt.js 引入vux 报错

nuxt.js 引入vux 报错

慕沐林林 2018-12-20 18:14:32
nuxt.js 引入vux 之后:run generate的时候uglifyJs 报错, run dev 的时候可以成功但是,只要刷新页面就会报 unexpected token importnuxt.config.js代码如下:plugins: [    '~plugins/api'  ],  build: {    vendor: ['axios','vux'],    extend (config, ctx) {      if (ctx.dev && ctx.isClient) {        config.module.rules.push({          enforce: 'pre',          test: /\.(js|vue)$/,          loader: 'eslint-loader',          exclude: /(node_modules)/        })      }      vuxLoader.merge(config,{        options: {          isWebpack2: true        },        plugins: [{          name: 'vux-ui'        }, {          name: 'duplicate-style'        }]      })    },    babel: {      presets: ['es2015', 'stage-0'],      "plugins": ["transform-runtime"]    },    loaders:[{      test:/\.vue$/,      loader: 'vue-loader'    }]  },
查看完整描述

1 回答

  • 1 回答
  • 0 关注
  • 976 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号