mirror of
				https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
				synced 2025-11-04 16:23:41 +08:00 
			
		
		
		
	Merge pull request #2406 from Yidadaa/bugfix-0716
feat: close #2376 add babel polyfill
This commit is contained in:
		
							
								
								
									
										14
									
								
								.babelrc
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								.babelrc
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,14 @@
 | 
			
		||||
{
 | 
			
		||||
  "presets": [
 | 
			
		||||
    [
 | 
			
		||||
      "next/babel",
 | 
			
		||||
      {
 | 
			
		||||
        "preset-env": {
 | 
			
		||||
          "targets": {
 | 
			
		||||
            "browsers": ["> 0.25%, not dead"]
 | 
			
		||||
          }
 | 
			
		||||
        }
 | 
			
		||||
      }
 | 
			
		||||
    ]
 | 
			
		||||
  ]
 | 
			
		||||
}
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
"use client";
 | 
			
		||||
 | 
			
		||||
require("../polyfill");
 | 
			
		||||
// require("../polyfill");
 | 
			
		||||
 | 
			
		||||
import { useState, useEffect } from "react";
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -30,6 +30,9 @@ const nextConfig = {
 | 
			
		||||
  images: {
 | 
			
		||||
    unoptimized: mode === "export",
 | 
			
		||||
  },
 | 
			
		||||
  experimental: {
 | 
			
		||||
    forceSwcTransforms: true,
 | 
			
		||||
  },
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
if (mode !== "export") {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user