vite+ts+vue3项目中报错提示require is not defined 净风 8852439 发布于 2022-04-28 vue3+ts+vite项目,1、引入@types/node和@types/webpack-env两个插件 2、在tsconfig.json中配置 "compilerOptions": { "types": [ "node", "webpack-env" ] }, 3、引入以下代码 const req = require.context('./...
vite+ts+vue3项目中报错提示require is not defined 净风 8852439 发布于 2022-04-28 vue3+ts+vite项目,1、引入@types/node和@types/webpack-env两个插件 2、在tsconfig.json中配置 "compilerOptions": { "types": [ "node", "webpack-env" ] },...