当前位置:网站首页>Vite path alias @ configuration
Vite path alias @ configuration
2022-07-07 15:48:00 【Sam young】
vite.config.ts
Official configuration details
resolve.alias To configure
const path = require('path');
import {
defineConfig } from 'vite';
import vue from '@vitejs/plugin-vue';
// https://vitejs.dev/config/
export default defineConfig({
plugins: [vue()],
resolve: {
// Configure path alias
alias: {
'@': path.resolve(__dirname, './src'),
},
},
});
tsconfig.json
paths and baseUrl
{
"compilerOptions": {
"experimentalDecorators": true,
"target": "esnext",
"module": "esnext",
"moduleResolution": "node",
"strict": true,
"jsx": "preserve",
"sourceMap": true,
"resolveJsonModule": true,
"esModuleInterop": true,
"lib": ["esnext", "dom"],
"baseUrl": ".",
"paths": {
"@/*": [
"src/*"
]
},
},
"include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"]
}
Just restart it and use it 
边栏推荐
- [wechat applet] Chapter (5): basic API interface of wechat applet
- Asynchronous application of generator function
- Detailed explanation of Cocos creator 2.4.0 rendering process
- Please supervise the 2022 plan
- Whether runnable can be interrupted
- Mathematical modeling -- what is mathematical modeling
- Configure mongodb database in window environment
- 【数字IC验证快速入门】25、SystemVerilog项目实践之AHB-SRAMC(5)(AHB 重点回顾,要点提炼)
- Oracle控制文件丢失恢复归档模式方法
- 15. Using the text editing tool VIM
猜你喜欢

有钱人买房就是不一样
Introduction of mongod management database method
![[server data recovery] a case of RAID data recovery of a brand StorageWorks server](/img/aa/6d820d97e82df1d908dc7aa78fc8bf.png)
[server data recovery] a case of RAID data recovery of a brand StorageWorks server

numpy--数据清洗
![[quick start of Digital IC Verification] 20. Basic grammar of SystemVerilog learning 7 (coverage driven... Including practical exercises)](/img/d3/cab8a1cba3c8d8107ce4a95f328d36.png)
[quick start of Digital IC Verification] 20. Basic grammar of SystemVerilog learning 7 (coverage driven... Including practical exercises)

OpenGL's distinction and understanding of VAO, VBO and EBO

Tkinter after how to refresh data and cancel refreshing

Getting started with webgl (1)

Unity's ASE achieves full screen sand blowing effect

Briefly describe the working principle of kept
随机推荐
【数字IC验证快速入门】25、SystemVerilog项目实践之AHB-SRAMC(5)(AHB 重点回顾,要点提炼)
Implementation of crawling web pages and saving them to MySQL using the scrapy framework
从 1.5 开始搭建一个微服务框架链路追踪 traceId
避坑:Sql中 in 和not in中有null值的情况说明
Oracle控制文件丢失恢复归档模式方法
有一头母牛,它每年年初生一头小母牛。每头小母牛从第四个年头开始,每年年初也生一头小母牛。请编程实现在第n年的时候,共有多少头母牛?
Excerpted words
[quick start of Digital IC Verification] 22. Ahb-sramc of SystemVerilog project practice (2) (Introduction to AMBA bus)
【兰州大学】考研初试复试资料分享
使用Scrapy框架爬取网页并保存到Mysql的实现
Using eating in cocos Creator
2. Heap sort "hard to understand sort"
Spin animation of Cocos performance optimization
【微信小程序】Chapter(5):微信小程序基础API接口
【数字IC验证快速入门】22、SystemVerilog项目实践之AHB-SRAMC(2)(AMBA总线介绍)
Shader Language
How to build your own super signature system (yunxiaoduo)?
Iterator and for of.. loop
Getting started with webgl (2)
Getting started with webgl (4)