webpack import stylus时被当做一个dependency,如何解决

安装的应该没问题,删了重装也还是这样的

import Vue from 'vue'
import App from './App'
// import router from './router'

import 'common/stylus/index.styl'

Vue.config.productionTip = false

/* eslint-disable no-new */
new Vue({
  el: '#app',
  render: h => h(App)
})

clipboard.png

clipboard.png

阅读 1.8k
2 个回答

import 'common/stylus/index.styl' 这里应该是你的相对路径,不然的化,就会出现你上面的问题

你截了个node_modules的图,然后import的是common/xxx,所以为什么会找得到?

ps:是代码就贴代码,不要贴图

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题