vue-loader@15 with [email protected] Module build failed: CssSyntaxError

Created on 29 Apr 2018  路  1Comment  路  Source: vuejs/vue-loader

Version

15.0.0

Reproduction link

https://codesandbox.io/s/xrpp7xxjmp

Steps to reproduce

install [email protected] [email protected] [email protected],
and run webpack --config webpack.base.conf.js
it report like this.

ERROR in ./src/App.vue?vue&type=style&index=0&lang=css (./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/happypack/loader.js?id=css!./node_modules/vue-loader/lib??vue-loader-options!./src/App.vue?vue&type=style&index=0&lang=css)
Module build failed: CssSyntaxError: .\src\App.vue:5:1: Unknown word
    at Input.error (./node_modules\@vue\component-compiler-utils\node_modules\postcss\lib\input.js:119:22)
    at Parser.unknownWord (./node_modules\@vue\component-compiler-utils\node_modules\postcss\lib\parser.js:506:26)
    at Parser.other (./node_modules\@vue\component-compiler-utils\node_modules\postcss\lib\parser.js:171:18)
    at Parser.parse (./node_modules\@vue\component-compiler-utils\node_modules\postcss\lib\parser.js:84:26)
    at parse (./node_modules\@vue\component-compiler-utils\node_modules\postcss\lib\parse.js:24:16)
    at new LazyResult (./node_modules\@vue\component-compiler-utils\node_modules\postcss\lib\lazy-result.js:70:24)
    at Processor.process (./node_modules\@vue\component-compiler-utils\node_modules\postcss\lib\processor.js:117:12)
    at compileStyle (./node_modules\@vue\component-compiler-utils\dist\compileStyle.js:34:35)
    at Object.module.exports (./node_modules\vue-loader\lib\loaders\stylePostLoader.js:9:33)
 @ ./src/App.vue?vue&type=style&index=0&lang=css 1:0-249 1:265-268 1:270-516 1:270-516
 @ ./src/App.vue
 @ ./src/index.js

but with out happypack it was fine webpack --config webpack.base.conf.nohappypack.js

What is expected?

webpacking good

What is actually happening?

it says CssSyntaxError. Looks like css wasn't compiled by css-loader.

>All comments

vue-loader 15 does not support HappyPack. Use thread-loader instead.

Was this page helpful?
0 / 5 - 0 ratings