You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
failed to locate @import file @$/base/style/variable.styl
at CachedPathEvaluator.visitImport (E:\vuedemo\flaskVueLofter\node_modules\stylus-loader\lib\evaluator.js:157:21)
at CachedPathEvaluator.Visitor.visit (E:\vuedemo\flaskVueLofter\node_modules\stylus\lib\visitor\index.js:28:40)
at CachedPathEvaluator.Evaluator.visit (E:\vuedemo\flaskVueLofter\node_modules\stylus\lib\visitor\evaluator.js:160:18)
at CachedPathEvaluator.Evaluator.visitRoot (E:\vuedemo\flaskVueLofter\node_modules\stylus\lib\visitor\evaluator.js:707:27)
at CachedPathEvaluator.Visitor.visit (E:\vuedemo\flaskVueLofter\node_modules\stylus\lib\visitor\index.js:28:40)
at CachedPathEvaluator.Evaluator.visit (E:\vuedemo\flaskVueLofter\node_modules\stylus\lib\visitor\evaluator.js:160:18)
at CachedPathEvaluator.Evaluator.evaluate (E:\vuedemo\flaskVueLofter\node_modules\stylus\lib\visitor\evaluator.js:247:15)
at Renderer.render (E:\vuedemo\flaskVueLofter\node_modules\stylus\lib\renderer.js:86:26)
at E:\vuedemo\flaskVueLofter\node_modules\stylus-loader\index.js:167:12
at tryCatchReject (E:\vuedemo\flaskVueLofter\node_modules\when\lib\makePromise.js:840:30)
at runContinuation1 (E:\vuedemo\flaskVueLofter\node_modules\when\lib\makePromise.js:799:4)
at Fulfilled.when (E:\vuedemo\flaskVueLofter\node_modules\when\lib\makePromise.js:590:4)
at Pending.run (E:\vuedemo\flaskVueLofter\node_modules\when\lib\makePromise.js:481:13)
at Scheduler._drain (E:\vuedemo\flaskVueLofter\node_modules\when\lib\Scheduler.js:62:19)
at Scheduler.drain (E:\vuedemo\flaskVueLofter\node_modules\when\lib\Scheduler.js:27:9)
at _combinedTickCallback (internal/process/next_tick.js:131:7)
Hello, your issue has been closed because it does not conform to our issue requirements. In order to ensure every issue provides the necessary information for us to investigate, we require the use of the Issue Helper when creating new issues. Thank you!
Version
3.0.3
Node and OS info
node: v10.10.0 npm: 6.4.1 win
错误如下:
Module build failed (from ./node_modules/stylus-loader/index.js):
Error: E:\vuedemo\flaskVueLofter\src\views\login\index.vue:31:8
27| font-size $font-size-large-mx
28| }
29| }
30| }
31| }
--------------^
32| }
33| </style>
failed to locate @import file @$/base/style/variable.styl
@ ./node_modules/vue-style-loader??ref--11-oneOf-1-0!./node_modules/css-loader??ref--11-oneOf-1-1!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node
_modules/postcss-loader/lib??ref--11-oneOf-1-2!./node_modules/stylus-loader??ref--11-oneOf-1-3!./node_modules/style-resources-loader/lib??ref--11-oneOf-1-4!./node
_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/login/index.vue?vue&type=style&index=0&id=37dfd6fc&lang=
stylus&scoped=true& 4:14-556 14:3-18:5 15:22-564
@ ./src/views/login/index.vue?vue&type=style&index=0&id=37dfd6fc&lang=stylus&scoped=true&
@ ./src/views/login/index.vue
@ ./src/router.js
@ ./src/main.js
@ multi (webpack)-dev-server/client?http://192.168.1.3:8080/sockjs-node (webpack)/hot/dev-server.js ./src/main.js
出现问题
@import"@$/base/style/variable.styl" 或者@import'~css/index.styl'
使用以上2种方式进行导入,均出现上面的错误
使用在vue.config.js中[我是根据文档方式]如下
module.exports = {
chainWebpack: config => {
const types = ['vue-modules', 'vue', 'normal-modules', 'normal','stylus']
types.forEach(type => addStyleResource(config.module.rule('stylus').oneOf(type)))
},
}
function addStyleResource (rule) {
rule.use('style-resource')
.loader('style-resources-loader')
.options({
patterns: [
path.resolve(__dirname, './src/base/style/variable.styl'),
],
})
}
来导入文件的是可以的,但是会出现,当我修改.styl文件中的页面时,页面未改变,需要重启服务,页面才会改变
我需要的是
<style lang="stylus" scpoe> @import'~css/a.styl' </style>这样的方式进行导入,如果样式修改后,不用重启就能够看到,请问下,哪些朋友遇到过,并解决了这个问题
The text was updated successfully, but these errors were encountered: