setup proxy for dev

This commit is contained in:
antony
2024-12-23 14:14:44 +07:00
parent 8bacb8406e
commit 5614ed542a
2 changed files with 20 additions and 1 deletions
+10
View File
@@ -10,6 +10,16 @@ export default defineNuxtConfig({
preset: "static"
},
vite: {
server: {
proxy: {
"^/node_modules/.*": {
target: "http://localhost:3000",
changeOrigin: true,
rewrite: (path) =>
path.replace(/^\/node_modules\//, "/_nuxt/node_modules/")
}
}
},
$client: {
plugins: [
topLevelAwait({