我想在.vue檔的<script>中是用stylus
let stylus = require('stylus')
console.log(stylus)
但是失敗了。
This dependency was not found:
* fs in ./~/.0.54.5@stylus/lib/utils.js, ./~/.0.54.5@stylus/lib/middleware.js and 12 others
To install it, you can run: npm install --save fs
This relative module was not found:
* ./lib-cov/stylus in ./~/.0.54.5@stylus/index.js
我新建了個test.js文件,在裡面引用卻沒問題。
我試過在webpack.base.conf.js 中設定這個:
{
test: /\.styl$/,
loader: 'style-loader!css-loader!stylus-loader'
}
沒用。
有人有踩過這個坑或任何想法嗎?
感謝
stylus 無法運作在瀏覽器上,不能引用。