Closed Faithree closed 7 years ago
@Faithree 你引入css的代码给我看看
import '../vue-toast-master/lib/toast.css'; import Toast from'../vue-toast-master/lib/index'; Vue.use(Toast);
因为npm install vue-toast下载的是一个外国人的项目,所以我就手动下载,然后放到跟目录下
你的项目是用vue-cli生成的吗?
是的
那应该已经有配置好解析css的loader啊,怎么你报错信息还提示需要引入loader。 你方便的话可以把文件夹发给我我调试一下吗?
你试试直接cli生成一个,你QQ多少?
2981207131
你好,我本地生产了一下项目,然后把你这个加进去,一开始是路径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)