当前位置:网站首页>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
边栏推荐
- 【数字IC验证快速入门】19、SystemVerilog学习之基本语法6(线程内部通信...内含实践练习)
- [quick start of Digital IC Verification] 18. Basic grammar of SystemVerilog learning 5 (concurrent threads... Including practical exercises)
- Configure mongodb database in window environment
- [quick start of Digital IC Verification] 22. Ahb-sramc of SystemVerilog project practice (2) (Introduction to AMBA bus)
- unnamed prototyped parameters not allowed when body is present
- 【OBS】RTMPSockBuf_ Fill, remote host closed connection.
- 15. Using the text editing tool VIM
- Share the technical details of super signature system construction
- 【數字IC驗證快速入門】20、SystemVerilog學習之基本語法7(覆蓋率驅動...內含實踐練習)
- [Lanzhou University] information sharing of postgraduate entrance examination and re examination
猜你喜欢
Super simple and fully automated generation super signature system (cloud Xiaoduo minclouds.com cloud service instance), free application in-house test app distribution and hosting platform, maintenan
Asynchronous application of generator function
[quick start of Digital IC Verification] 20. Basic grammar of SystemVerilog learning 7 (coverage driven... Including practical exercises)
[quick start of Digital IC Verification] 26. Ahb-sramc of SystemVerilog project practice (6) (basic points of APB protocol)
webgl_ Enter the three-dimensional world (2)
[quick start of Digital IC Verification] 24. AHB sramc of SystemVerilog project practice (4) (AHB continues to deepen)
[follow Jiangke University STM32] stm32f103c8t6_ PWM controlled DC motor_ code
The difference between full-time graduate students and part-time graduate students!
【数字IC验证快速入门】26、SystemVerilog项目实践之AHB-SRAMC(6)(APB协议基本要点)
Starting from 1.5, build a microservice framework link tracking traceid
随机推荐
【数字IC验证快速入门】19、SystemVerilog学习之基本语法6(线程内部通信...内含实践练习)
MongoD管理数据库的方法介绍
Ue4/ue5 multi thread development attachment plug-in download address
[server data recovery] data recovery case of raid failure of a Dell server
Nacos conformance protocol cp/ap/jraft/distro protocol
Zhongang Mining: Fluorite continues to lead the growth of new energy market
Cocos makes Scrollview to realize the effect of zooming in the middle and zooming out on both sides
How to create Apple Developer personal account P8 certificate
After UE4 is packaged, mesh has no material problem
[original] all management without assessment is nonsense!
Yunxiaoduo software internal test distribution test platform description document
全日制研究生和非全日制研究生的区别!
Database exception resolution caused by large table delete data deletion
numpy--疫情数据分析案例
写一篇万字长文《CAS自旋锁》送杰伦的新专辑登顶热榜
【數字IC驗證快速入門】26、SystemVerilog項目實踐之AHB-SRAMC(6)(APB協議基本要點)
Postman generate timestamp, future timestamp
STM32F103C8T6 PWM驱动舵机(SG90)
What are PV and UV? pv、uv
【数字IC验证快速入门】29、SystemVerilog项目实践之AHB-SRAMC(9)(AHB-SRAMC SVTB Overview)