项目用到了vue,elementUI,结合Webpack打包运行的时候报错

web-im@1.0.0 dev F:\demo\web-im

webpack-dev-server --inline --progress --config build/webpack.dev.conf.js

13% building modules 32/75 modules 43 active
…te&index=0!F:\demo\web-im\src\App.vue{ parser: “babylon” } is
deprecated; we now treat it as { pa rser: “babel” }. 94% asset
optimization

ERROR Failed to compile with 1 errors
10:32:34

error in ./node_modules/element-ui/lib/theme-chalk/index.css

Module build failed: ParseError:
F:\demo\web-im\node_modules\element-ui\lib\theme-chalk\index.css:1:63
1| var escape = require("…/…/…/css-loader/lib/url/escape.js");
--------------------------------------------------------------------^ 2| exports = module.exports =
require("…/…/…/css-loader/lib/css-base.js")(true); 3| // imports
4|

expected “indent”, got “;”

在这里插入图片描述
这里应该是导饿了么css出了问题,解决办法

找到webpack.dev.conf.js文件,
其中有一行

module: {
    rules: utils.styleLoaders({ sourceMap: config.dev.cssSourceMap, usePostCSS: true })
  },

usePostCSS把后面的true改成false就可以了

GitHub 加速计划 / eleme / element
13
1
下载
A Vue.js 2.0 UI Toolkit for Web
最近提交(Master分支:23 天前 )
c345bb45 1 年前
a07f3a59 * Update transition.md * Update table.md * Update transition.md * Update table.md * Update transition.md * Update table.md * Update table.md * Update transition.md * Update popover.md 1 年前
Logo

旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐