当前位置:网站首页>[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
边栏推荐
- Custom tag - JSP tag Foundation
- 2022 Gdevops全球敏捷运维峰会-广州站精华回放(附ppt下载)
- Sequential representation and implementation of sequencelist -- linear structure
- Cookie和Session入门
- GPIO初识
- Redis学习笔记—数据类型:哈希(hash)
- 全局快门和卷帘快门的区别
- Lua的基本使用
- June 22, 2022: golang multiple choice question, what does the following golang code output? A:3; B:1; C:4; D: Compilation failed.
- Embedded system overview (learning notes)
猜你喜欢
![[極客大挑戰 2019]HardSQL](/img/73/ebfb410296b8e950c9ac0cf00adc17.png)
[極客大挑戰 2019]HardSQL

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
[nanopi2 trial experience] the first step of bare metal

Cesium加载正射影像方案

UEFI source code learning 3.7 - norflashdxe
![[MRCTF2020]Ez_bypass](/img/cd/bd6fe5dfc3f1942a9959a9dab9e7e0.png)
[MRCTF2020]Ez_bypass

JSP入门总结
![[SUCTF 2019]CheckIn](/img/0e/75bb14e7a3e55ddc5126581a663bfb.png)
[SUCTF 2019]CheckIn
Redis learning notes - AOF of persistence mechanism

The sliding window of the force button "step by step" (209. sub array with the smallest length, 904. fruit basket)
随机推荐
Redis学习笔记—慢查询分析
玩转NanoPi 2 裸机教程编程-01点亮User LED难点解析
cooding代码库的使用笔记
[nanopi2 trial experience] the first step of bare metal
【CTF】bjdctf_2020_babyrop
Chain representation and implementation of linklist ---- linear structure
Chain implementation of stack -- linear structure
[geek Challenge 2019] hardsql
Map接口的注意事项
栈(Stack)的链式实现详解----线性结构
4sum of leetcode topic analysis
[CISCN2019 华北赛区 Day2 Web1]Hack World
A method of realizing video call and interactive live broadcast in small programs
Basic use of lua
线性表(SequenceList)的顺序表示与实现----线性结构
Redis学习笔记—数据类型:哈希(hash)
swagger UI :%E2%80%8B
Structure binary tree from preorder and inorder traversal for leetcode topic analysis
薄膜干涉数据处理
Redis learning notes - slow query analysis