Skip to content

Commit

Permalink
Merge pull request #2406 from Yidadaa/bugfix-0716
Browse files Browse the repository at this point in the history
feat: close #2376 add babel polyfill
  • Loading branch information
Yidadaa authored Jul 16, 2023
2 parents 13424a8 + af5f67d commit 62f8cd1
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
14 changes: 14 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"presets": [
[
"next/babel",
{
"preset-env": {
"targets": {
"browsers": ["> 0.25%, not dead"]
}
}
}
]
]
}
2 changes: 1 addition & 1 deletion app/components/home.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use client";

require("../polyfill");
// require("../polyfill");

import { useState, useEffect } from "react";

Expand Down
3 changes: 3 additions & 0 deletions next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ const nextConfig = {
images: {
unoptimized: mode === "export",
},
experimental: {
forceSwcTransforms: true,
},
};

if (mode !== "export") {
Expand Down

0 comments on commit 62f8cd1

Please sign in to comment.