upgrade nextjs from 11 to 12

This commit is contained in:
ycdesu 2022-06-20 22:08:08 +08:00
parent 92882c9da2
commit 6d0a24ccb7
5 changed files with 505 additions and 2236 deletions

View File

@ -1,5 +1,4 @@
/// <reference types="next" /> /// <reference types="next" />
/// <reference types="next/types/global" />
/// <reference types="next/image-types/global" /> /// <reference types="next/image-types/global" />
// NOTE: This file should not be edited // NOTE: This file should not be edited

View File

@ -1,16 +1,9 @@
const withTM = require('next-transpile-modules')([ module.exports = async (phase, { defaultConfig }) => {
'@react-spring/three', /**
'@react-spring/web', * @type {import('next').NextConfig}
]); */
const nextConfig = {
module.exports = withTM({ /* config options here */
// disable webpack 5 to make it compatible with the following rules }
webpack5: false, return nextConfig
webpack: (config, options) => { }
config.module.rules.push({
test: /react-spring/,
sideEffects: true,
});
return config;
},
});

View File

@ -24,12 +24,11 @@
"axios": "^0.22.0", "axios": "^0.22.0",
"classnames": "^2.2.6", "classnames": "^2.2.6",
"isomorphic-fetch": "^3.0.0", "isomorphic-fetch": "^3.0.0",
"next": "^11.1.2", "next": "12",
"qrcode.react": "^3.0.1", "qrcode.react": "^3.0.1",
"react": "^17.0.1", "react": "^18.2.0",
"react-dom": "^17.0.1", "react-dom": "^18.2.0",
"react-number-format": "^4.4.4", "react-number-format": "^4.4.4"
"react-spring": "^9.3.0"
}, },
"devDependencies": { "devDependencies": {
"@types/node": "^14.14.22", "@types/node": "^14.14.22",

View File

@ -1,7 +1,11 @@
{ {
"compilerOptions": { "compilerOptions": {
"target": "es5", "target": "es5",
"lib": ["dom", "dom.iterable", "esnext"], "lib": [
"dom",
"dom.iterable",
"esnext"
],
"allowJs": true, "allowJs": true,
"skipLibCheck": true, "skipLibCheck": true,
"strict": false, "strict": false,
@ -12,8 +16,15 @@
"moduleResolution": "node", "moduleResolution": "node",
"resolveJsonModule": true, "resolveJsonModule": true,
"isolatedModules": true, "isolatedModules": true,
"jsx": "preserve" "jsx": "preserve",
"incremental": true
}, },
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"], "include": [
"exclude": ["node_modules"] "next-env.d.ts",
"**/*.ts",
"**/*.tsx"
],
"exclude": [
"node_modules"
]
} }

File diff suppressed because it is too large Load Diff