How to solve the problem when webpack import stylus is treated as a dependency,

installation should be fine, but it will still be the same after deletion and reinstallation

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: "-sharpapp",
  render: h => h(App)
})

clipboard.png

clipboard.png


you capture a picture of node_modules , and then import is common/xxx , so why can you find it?

ps: is code-ready code, do not paste


import 'common/stylus/index.styl' this should be your relative path, otherwise your above problems will appear

Menu