SimonZhangITer / vue-typescript-dpapp-demo

:fire: Let's start with TypeScript
MIT License
625 stars 146 forks source link

请问引入组件的时候是怎么写alias的 #7

Closed lznism closed 6 years ago

lznism commented 6 years ago
import header from "@/components/header.vue";
import modules from "@/components/modules.vue";
import headline from "@/components/headline.vue";

我这么写的时候编辑器报错,找不到模块,必须要写成相对路径才可以

jkchao commented 6 years ago

@lznism 在 tsconfig.json 配置 baseUrl 和 paths。

lznism commented 6 years ago

@jkchao thanks!