Skip to content

Commit

Permalink
build: no legacy chunks
Browse files Browse the repository at this point in the history
  • Loading branch information
dongchengjie committed Jun 5, 2024
1 parent 23668ee commit 0bf8807
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,12 @@ export default defineConfig({
svgr(),
react(),
legacy({
targets: ["edge>=109", "safari>=13"],
renderLegacyChunks: false,
modernTargets: ["edge>=109", "safari>=13"],
modernPolyfills: true,
polyfills: ["web.structured-clone"],
additionalModernPolyfills: [
"core-js/modules/es.object.has-own.js",
"core-js/modules/web.structured-clone.js",
path.resolve("./src/polyfills/matchMedia.js"),
path.resolve("./src/polyfills/WeakRef.js"),
path.resolve("./src/polyfills/RegExp.js"),
Expand Down

0 comments on commit 0bf8807

Please sign in to comment.