Skip to content

Commit

Permalink
Remove legacy.proxySsrExternalModules (#36)
Browse files Browse the repository at this point in the history
  • Loading branch information
getCryptoAddress authored Nov 8, 2024
1 parent a3698e8 commit 019a8d2
Show file tree
Hide file tree
Showing 3 changed files with 102 additions and 42 deletions.
134 changes: 96 additions & 38 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
"typescript": "~5.6.3",
"vfonts": "^0.0.3",
"vite": "^5.4.10",
"vite-plugin-cjs-interop": "^2.1.5",
"vite-plugin-csp-guard": "^1.1.3",
"vitest": "^2.1.4",
"vue-tsc": "^2.1.10"
Expand Down
9 changes: 5 additions & 4 deletions vite.config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { fileURLToPath, URL } from "node:url";
import vue from "@vitejs/plugin-vue";
import { defineConfig } from "vite";
import csp from "vite-plugin-csp-guard";
import { cjsInterop } from "vite-plugin-cjs-interop";

process.env.VITE_NONCE = Math.random().toString(36).slice(2);

Expand Down Expand Up @@ -31,6 +32,10 @@ export default defineConfig({
],
},
}),
// https://github.com/vitejs/vite/discussions/14697#discussioncomment-11170750
cjsInterop({
dependencies: ["naive-ui"],
}),
],
build: {
target: "es2022",
Expand Down Expand Up @@ -65,8 +70,4 @@ export default defineConfig({
},
},
},
legacy: {
// todo https:// github. com/ vitejs/ vite/ discussions/ 14697 needs for prerender.mjs
proxySsrExternalModules: true,
},
});

0 comments on commit 019a8d2

Please sign in to comment.