Javascript – Seltsam. require('stylus') in der .vue-Datei schlägt fehl
大家讲道理
大家讲道理 2017-06-12 09:23:07
0
1
709

Ich möchte im <Skript> der .vue-Datei einen Stift verwenden

let stylus = require('stylus')
console.log(stylus)

Aber es ist gescheitert.

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

Ich habe eine neue test.js-Datei erstellt und darin ohne Probleme darauf verwiesen.

Ich habe versucht, dies in webpack.base.conf.js festzulegen:

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

Es ist nutzlos.

Hat jemand diese Gefahr erlebt oder hat er eine Idee?

Danke

大家讲道理
大家讲道理

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

Antworte allen(1)
淡淡烟草味

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

Neueste Downloads
Mehr>
Web-Effekte
Quellcode der Website
Website-Materialien
Frontend-Vorlage