• /node_modules/vue2-toast/lib/toast.css Module build failed: Unknown word


     

    mpvuedemo whpc$ npm run devH5

    > mpvuedemo@1.0.0 devH5 /Users/whpc/Desktop/workSpace/mpvuedemo
    > webpack-dev-server --inline --progress --config buildH5/webpack.devH5.conf.js

    94% asset optimization

    ERROR Failed to compile with 1 errors 10:33:35 AM

    error in ./node_modules/vue2-toast/lib/toast.css

    Module build failed: Unknown word (5:1)

    3 | // load the styles
    4 | var content = require("!!../../css-loader/index.js??ref--7-1!./toast.css");
    > 5 | if(typeof content === 'string') content = [[module.id, content, '']];
    | ^
    6 | if(content.locals) module.exports = content.locals;
    7 | // add the styles to the DOM
    8 | var add = require("!../../vue-style-loader/lib/addStylesClient.js").default


    @ ./node_modules/vue2-toast/lib/toast.css 4:14-132 14:3-18:5 15:22-140
    @ ./src/mainH5.js
    @ multi (webpack)-dev-server/client?http://localhost:8085 webpack/hot/dev-server ./src/mainH5.js

    原因就是无法加载 .css文件;

    在webpack.baseH5.config.js中调换css-loader和style-loader位置也不行;

    最终注释这片代码就行了,如下图;

     

  • 相关阅读:
    Vue路由跳转时修改页面标题
    Vue整合Quill富文本编辑器
    XML中的转义字符
    整合SSM框架环境搭建
    Android搞定权限申请
    Android实现秒开效果
    tail -f 与tail -F的区别
    druid 启动报错
    sqoop flume学习笔记
    20180911
  • 原文地址:https://www.cnblogs.com/gznuhaoge/p/10318635.html
Copyright © 2020-2023  润新知