【发布时间】:2019-08-14 14:53:55
【问题描述】:
我正在尝试找到一种方法来告诉 WebStorm 2019.1.4 在基于 Nuxt 的应用程序中的 ES6 导入中使用绝对路径。在 WebStorm 中进行自动导入时,例如:
import GlassPane from '../components/GlassPane'
我想在导入中有一个绝对路径(或基于别名的路径),如下:
import GlassPane from '~/components/GlassPane'
甚至:
import GlassPane from '/components/GlassPane'
有可能吗?
注意 Nuxt 应用程序中没有 webpack.config.js 文件,而只有一个包装它的 nuxt.config.js .
【问题讨论】:
标签: ecmascript-6 webstorm nuxt.js