猿问

vue-cli run dev正常,运行run build提示出错,webpack已resolve

根据回答,我试了一下将dom7这个modules也加入到webpack的babel-loader:

 {

        test: /\.js$/,

        loader: 'babel-loader',

        include: [resolve('src'), resolve('test'),resolve('node_modules/_dom7@2.0.0@dom7/src')]

      },

接下来显示的却是:

https://img4.mukewang.com/5c75e7a80001ca7811720289.jpg

感觉这样子下去要没完没了了。

然后我再:


      {

        test: /\.js$/,

        loader: 'babel-loader',

        include: [resolve('src'), resolve('test'),resolve('node_modules/_dom7@2.0.0@dom7/src'),resolve('node_modules/_swiper@4.0.0-beta.4@swiper')]

      },

最后



> node build/build.js


⠴ building for production...Killed

这是什么情况?如果我想引入这个插件我应该如何配置这个webpack?


PIPIONE
浏览 904回答 1
1回答

守候你守候我

我是vue-cli架的手脚,我用swiper也是报一样的错误,用这个vue-awesome-swiper,在swiper进行vue封装,用起来一毛一样 压缩不出错,import { swiper, swiperSlide } from 'vue-awesome-swiper'
随时随地看视频慕课网APP

相关分类

JavaScript
我要回答