Merge pull request #2406 from Yidadaa/bugfix-0716

feat: close #2376 add babel polyfill
This commit is contained in:
Yifei Zhang 2023-07-16 16:34:45 +08:00 committed by GitHub
commit 62f8cd1db6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 18 additions and 1 deletions

14
.babelrc Normal file
View File

@ -0,0 +1,14 @@
{
"presets": [
[
"next/babel",
{
"preset-env": {
"targets": {
"browsers": ["> 0.25%, not dead"]
}
}
}
]
]
}

View File

@ -1,6 +1,6 @@
"use client";
require("../polyfill");
// require("../polyfill");
import { useState, useEffect } from "react";

View File

@ -30,6 +30,9 @@ const nextConfig = {
images: {
unoptimized: mode === "export",
},
experimental: {
forceSwcTransforms: true,
},
};
if (mode !== "export") {