wrong with stylus
Opened this issue · 1 comments
exp:
index.vue :
<style lang="stylus" src="./index.styl" scoped></style>
index.styl :
.tz
font-size 20px
use
yarn run build
ERROR in ./node_modules/weex-vue-loader/lib/style-loader.js!./node_modules/stylus-loader?{"sourceMap":false}!./node_modules/weex-vue-loader/lib/style-rewriter.js?id=data-v-e64d6cf0!./src/components/hello/index.styl
Module build failed: CssSyntaxError: D:\Study\Weex\test2\src\components\hello\index.styl:1:1: Unknown word
at Input.error (D:\Study\Weex\test2\node_modules\weex-vue-loader\node_modules\postcss\lib\input.js:113:22)
at Parser.unknownWord (D:\Study\Weex\test2\node_modules\weex-vue-loader\node_modules\postcss\lib\parser.js:506:26)
at Parser.other (D:\Study\Weex\test2\node_modules\weex-vue-loader\node_modules\postcss\lib\parser.js:171:18)
at Parser.parse (D:\Study\Weex\test2\node_modules\weex-vue-loader\node_modules\postcss\lib\parser.js:84:26)
at parse (D:\Study\Weex\test2\node_modules\weex-vue-loader\node_modules\postcss\lib\parse.js:24:16)
at new LazyResult (D:\Study\Weex\test2\node_modules\weex-vue-loader\node_modules\postcss\lib\lazy-result.js:70:24)
at Processor.process (D:\Study\Weex\test2\node_modules\weex-vue-loader\node_modules\postcss\lib\processor.js:117:12)
at Object.module.exports (D:\Study\Weex\test2\node_modules\weex-vue-loader\lib\style-rewriter.js:96:6)
@ ./src/components/hello/index.vue 5:20-212
@ ./src/router.js
@ ./src/entry.js
funny ->
index.styl :
.tz
font-size: 20px
add
:
is ok!
The only solution for the moment is by adding ":", and also ";" at the end of each line. It seems a "strict" mode of stylus have been implemented here.