当前位置:网站首页>[plugin:vite:import-analysis]Failed to resolve import “@/“ from ““.Does the file exist
[plugin:vite:import-analysis]Failed to resolve import “@/“ from ““.Does the file exist
2022-06-23 09:28:00 【风如也】
报错截图:
报错原因:未配置@符号为指定路径别名,导致直接使用导致
解决方案:
先安装path模块
npm install --save-dev @types/node
修改vite.config.js文件
import {
defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import path from 'path'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [vue()],
resolve: {
alias: {
'@': path.resolve(__dirname, 'src')
}
}
})
重新运行项目
npm run dev
边栏推荐
猜你喜欢

What is a closure function

A 32KB cache with direct mapping Memory exercises after class
![[geek Challenge 2019] hardsql](/img/73/ebfb410296b8e950c9ac0cf00adc17.png)
[geek Challenge 2019] hardsql

设CPU有16根地址线,8根数据线,并用MREQ作为访存控制线号......存储器与CPU的连接

学习SCI论文绘制技巧(F)
Redis learning notes pipeline

Redis学习笔记—持久化机制之RDB

Sequential representation and implementation of sequencelist -- linear structure
![[MRCTF2020]Ez_bypass](/img/cd/bd6fe5dfc3f1942a9959a9dab9e7e0.png)
[MRCTF2020]Ez_bypass

基于mediapipe的手势数字识别
随机推荐
Map接口的注意事项
Set the CPU to have 16 address lines and 8 data lines, and use mreq as the access control line number Connection between memory and CPU
【CTF】bjdctf_ 2020_ babyrop
基于mediapipe的手势数字识别
cooding代码库的使用笔记
Redis学习笔记—redis-benchmark详解
How to use matrix analysis to build your thinking scaffold in flowus, notation and other note taking software
UEFI源码学习3.7 - NorFlashDxe
Implementation of s5p4418 bare metal programming (replace 2ndboot)
三层架构与SSM之间的对应关系
Redis learning notes master-slave copy
Common English explanations in arm
Redis learning notes RDB of persistence mechanism
GPIO初识
【CTF】 2018_ rop
Custom tags - JSP tag enhancements
Combination sum III of leetcode topic analysis
Learn SCI thesis drawing skills (E)
Jog运动模式
Leetcode topic analysis contains duplicate III