Element: 引入CSS问题,按照star里面改了也是报错,请帮忙看看!

Created on 24 Nov 2016  ·  5Comments  ·  Source: ElemeFE/element

ElementUI version

"element-ui": "^1.0.2",

OS/Browers version

Chrome

Vue version

"vue": "^2.1.0",

Reproduction Link

Steps to reproduce

"webpack": "^1.13.3"
{
test: /.css$/,
loader: 'style!css',
exclude: /node_modules/
},
{
test: /.(eot|svg|ttf|woff|woff2)(\?\S*)?$/,
loader: 'file'
},

.babelrc:
{
"presets": [
"es2015",
"stage-1"
],
"plugins": [
"transform-runtime"
],
"comments": false
}

编译报错:
ERROR in ./~/element-ui/lib/theme-default/index.css
Module parse failed: D:\Workspace\storm\weddingnode_modules\element-ui\lib\theme-default\index.css Unexpected character '@' (1:0)
You may need an appropriate loader to handle this file type.
SyntaxError: Unexpected character '@' (1:0)

What is Expected?

What is actually happening?

question

Most helpful comment

好像文档给的 css 配置并没有 exclude: /node_modules/ 🌚

{
  test: /\.css$/,
  loader: 'style-loader!css-loader'
}

All 5 comments

请提供个 repo 地址

方便加个QQ吗?421156722

好像文档给的 css 配置并没有 exclude: /node_modules/ 🌚

{
  test: /\.css$/,
  loader: 'style-loader!css-loader'
}

sorry,加这个是因为之前报错加的,改了之后忘记去掉了,太着急了,去掉可以了,谢谢!

Was this page helpful?
0 / 5 - 0 ratings