当前位置:网站首页>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 
边栏推荐
- A need to review all the knowledge, H5 form is blocked by the keyboard, event agent, event delegation
- 【原创】一切不谈考核的管理都是扯淡!
- [quick start of Digital IC Verification] 18. Basic grammar of SystemVerilog learning 5 (concurrent threads... Including practical exercises)
- LeetCode2_ Add two numbers
- Using eating in cocos Creator
- Pit avoidance: description of null values in in and not in SQL
- 大表delete删数据导致数据库异常解决
- Cocos uses custom material to display problems
- 使用cpolar建立一个商业网站(2)
- [data mining] visual pattern mining: hog feature + cosine similarity /k-means clustering
猜你喜欢

numpy--疫情数据分析案例

15. Using the text editing tool VIM

numpy--数据清洗

webgl_ Enter the three-dimensional world (2)

There is a cow, which gives birth to a heifer at the beginning of each year. Each heifer has a heifer at the beginning of each year since the fourth year. Please program how many cows are there in the

Postman generate timestamp, future timestamp

Getting started with webgl (2)

如何在opensea批量发布NFT(Rinkeby测试网)

Steps to create P8 certificate and warehousing account

LeetCode2_ Add two numbers
随机推荐
Ida Pro reverse tool finds the IP and port of the socket server
2022 all open source enterprise card issuing network repair short website and other bugs_ 2022 enterprise level multi merchant card issuing platform source code
【数字IC验证快速入门】19、SystemVerilog学习之基本语法6(线程内部通信...内含实践练习)
./ Functions of configure, make and make install
[quick start of Digital IC Verification] 24. AHB sramc of SystemVerilog project practice (4) (AHB continues to deepen)
【微信小程序】Chapter(5):微信小程序基础API接口
大表delete删数据导致数据库异常解决
Oracle控制文件丢失恢复归档模式方法
Gd32 F3 pin mapping problem SW interface cannot be burned
After UE4 is packaged, mesh has no material problem
Actually changed from 408 to self proposition! 211 North China Electric Power University (Beijing)
MongoDB数据库基础知识整理
Unity's ASE achieves full screen sand blowing effect
There is a cow, which gives birth to a heifer at the beginning of each year. Each heifer has a heifer at the beginning of each year since the fourth year. Please program how many cows are there in the
[deep learning] image hyperspectral experiment: srcnn/fsrcnn
Do you know the relationship between the most important indicators of two strong wind control and the quality of the customer base
Webcodecs parameter settings -avc1.42e01e meaning
The "go to definition" in VS2010 does not respond or prompts the solution of "symbol not found"
How to create Apple Developer personal account P8 certificate
Database exception resolution caused by large table delete data deletion