javascript - 奇怪。 require('stylus') in .vue file 失败
大家讲道理
大家讲道理 2017-06-12 09:23:07
0
1
710

我想在.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'
        }
        

没用。

有人有踩过这个坑或者任何想法吗?

感谢

大家讲道理
大家讲道理

光阴似箭催人老,日月如移越少年。

全部回复(1)
淡淡烟草味

stylus 无法运行在浏览器上,不能引用。

热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板