This dependency was not found

来源:3-1 目录结构 & header 组件

慕无忌5058796

2019-08-20

import Vue from 'vue'
import './cube-ui'
import App from './App.vue'
import 'common/stylus/index.styl'
Vue.config.productionTip = false
new Vue({
  render: h => h(App)
}).$mount('#app')

提示:
ERROR Failed to compile with 1 errors 10:38:38
This dependency was not found:

  • common/stylus/index.styl in ./src/main.js
    To install it, you can run: npm install --save common/stylus/index.styl
 chainWebpack(config) {
    config.resolve.alias
      .set('components', resolve('src/components'))
      .set('common', resolve('src/common'))
      .set('api', resolve('src/api'))

    config.plugin('context')
      .use(webpack.ContextReplacementPlugin,
        [/moment[/\\]locale$/, /zh-cn/])
  },
写回答

1回答

ustbhuangyi

2019-08-20

你的 common 目录下有这个文件吗,改成相对路径试试呢?

0
5
ustbhuangyi
回复
慕函数6155682
配置 alias 就可以呀
2019-09-05
共5条回复

Vue.js2.5+cube-ui重构饿了么App(经典再升级)

掌握Vue1.0到2.0再到2.5最全版本应用与迭代,打造极致流畅的WebApp

9868 学习 · 4162 问题

查看课程