vue3 vite @路径修改

1.vite.config.ts

const path = require('path')

resolve: {

alias: {

'@': path.join(__dirname, 'src')

}

}

  1. tsconfig.json

{

"compilerOptions": {

"paths": {

"@/*":["src/*"]

}

},

你可能感兴趣的:(vue,vue.js)