Skip to content

Commit af5f67d

Browse files
committed
feat: close #2376 add babel polyfill
1 parent 30473ec commit af5f67d

File tree

3 files changed

+18
-1
lines changed

3 files changed

+18
-1
lines changed

.babelrc

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"presets": [
3+
[
4+
"next/babel",
5+
{
6+
"preset-env": {
7+
"targets": {
8+
"browsers": ["> 0.25%, not dead"]
9+
}
10+
}
11+
}
12+
]
13+
]
14+
}

app/components/home.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"use client";
22

3-
require("../polyfill");
3+
// require("../polyfill");
44

55
import { useState, useEffect } from "react";
66

next.config.mjs

+3
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ const nextConfig = {
3030
images: {
3131
unoptimized: mode === "export",
3232
},
33+
experimental: {
34+
forceSwcTransforms: true,
35+
},
3336
};
3437

3538
if (mode !== "export") {

0 commit comments

Comments
 (0)