manifest.json设置VUE版本3
根目录新建vite.config.js文件
import { defineConfig } from 'vite'
export default defineConfig({
server: {
port : 3001,
proxy: {
'/api': {
target: 'http://jsonplaceholder.typicode.com',
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, '')
},
}
}
})
运行时报错
10:26:32.866 正在编译中...
10:26:33.062 Port 3000 is in use, trying another one...
10:26:33.064 vite v2.9.5 dev server running at:
10:26:33.065 > Local: http://localhost:3001/
10:26:33.067 > Network: use `--host` to expose
10:26:33.072 ready in 811ms.
10:26:33.117 The following dependencies are imported but could not be resolved:
10:26:33.119 vue (imported by E:/flx-code/uni-app-sxrd/main.js)
10:26:33.121 vuex (imported by E:/flx-code/uni-app-sxrd/store/index.js)
10:26:33.125 Are they installed?