v2dev
V2EX  ›  Vue.js

小白求问,为什么在 vue-cli3.0 中无法使用路径别名?

  •  
  •   v2dev · Nov 21, 2018 · 3320 views
    This topic created in 2797 days ago, the information mentioned may be changed or developed.

    按照网上的教程,在 vue.config.js 中进行了配置:

    module.exports = { chainWebpack: config => { config.resolve.alias .set('@', resolve('src')) .set('assets', resolve('src/assets')) .set('components', resolve('src/components')) } } 此时鼠标放在 chainWebpack 上,idea 会提示 Unused property chainWebpack, 然后在页面上使用 import xxx from ‘@/xxx ’ 无效,求大佬帮助!!感谢!!

    1 replies    2018-11-21 17:35:05 +08:00
    muamua
        1
    muamua  
       Nov 21, 2018 via Android
    idea 的问题吧
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2746 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 11:50 · PVG 19:50 · LAX 04:50 · JFK 07:50
    ♥ Do have faith in what you're doing.