lin-xin / vue-toast

A mobile toast plugin for vue2.
https://lin-xin.gitee.io/example/#/vue2-toast/
309 stars 92 forks source link

直接报了这个错 #1

Closed Faithree closed 7 years ago

Faithree commented 7 years ago

你好,我本地生产了一下项目,然后把你这个加进去,一开始是路径import错了,然后我手动 改路径,然后下面css就有问题,注释掉就可以 Uncaught Error: Module parse failed: E:\simple\vue-toast-master\lib\toast.css Unexpected token (1:0) You may need an appropriate loader to handle this file type. | .lx-toast{ | position: fixed; | bottom:100px; at eval (eval at (build.js:1355), :1:7) at Object. (build.js:1355) at webpack_require (build.js:660) at fn (build.js:84) at eval (eval at (build.js:972), :5:90) at Object. (build.js:972) at webpack_require (build.js:660) at fn (build.js:84) at Object. (build.js:1342) at __webpack_require__ (build.js:660)

lin-xin commented 7 years ago

@Faithree 你引入css的代码给我看看

Faithree commented 7 years ago

import '../vue-toast-master/lib/toast.css'; import Toast from'../vue-toast-master/lib/index'; Vue.use(Toast);

Faithree commented 7 years ago

因为npm install vue-toast下载的是一个外国人的项目,所以我就手动下载,然后放到跟目录下

lin-xin commented 7 years ago

你的项目是用vue-cli生成的吗?

Faithree commented 7 years ago

是的

lin-xin commented 7 years ago

那应该已经有配置好解析css的loader啊,怎么你报错信息还提示需要引入loader。 你方便的话可以把文件夹发给我我调试一下吗?

Faithree commented 7 years ago

你试试直接cli生成一个,你QQ多少?

lin-xin commented 7 years ago

2981207131