v2dev
V2EX  ›  Vue.js

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

  •  
  •   v2dev · Nov 21, 2018 · 3169 views
    This topic created in 2731 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   ·   3834 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 68ms · UTC 04:28 · PVG 12:28 · LAX 21:28 · JFK 00:28
    ♥ Do have faith in what you're doing.