在vue中写@符合不被识别,需要在配置中进行修改,修改内容如下:
resolve: { //别名配置 alias: [ { find: "@", replacement: "/src", }, ], //忽略文件名 extensions: [".mjs", ".js", ".ts", ".jsx", ".tsx", ".json", ".vue"], },
打包时候如果是强制代码必须为ts,但是我们是ts和js混合的代码,打包报错
"build": "cross-env NODE_ENV=production && vite build",
标签:vue,路径,ts,js,build,符合,识别 From: https://www.cnblogs.com/maoshujuan/p/17490798.html