From 12448d851a041b80a5bb1e01a24b8440c49e05da Mon Sep 17 00:00:00 2001 From: jaywcjlove <398188662@qq.com> Date: Sun, 26 Nov 2023 16:25:11 +0800 Subject: [PATCH] chore: fix failed to parse source map & update dependency. --- example/nextjs/.gitignore | 1 + example/nextjs/package.json | 28 ++++++++++++++-------------- package.json | 10 +++++----- www/.kktrc.ts | 3 +++ www/package.json | 22 +++++++++++----------- 5 files changed, 34 insertions(+), 30 deletions(-) diff --git a/example/nextjs/.gitignore b/example/nextjs/.gitignore index 8f322f0d8..fd3dbb571 100644 --- a/example/nextjs/.gitignore +++ b/example/nextjs/.gitignore @@ -4,6 +4,7 @@ /node_modules /.pnp .pnp.js +.yarn/install-state.gz # testing /coverage diff --git a/example/nextjs/package.json b/example/nextjs/package.json index b7525ff10..5be0a5385 100644 --- a/example/nextjs/package.json +++ b/example/nextjs/package.json @@ -9,21 +9,21 @@ "lint": "next lint" }, "dependencies": { - "@types/node": "~20.8.2", - "@types/react": "^18.2.24", - "@types/react-dom": "^18.2.9", - "autoprefixer": "~10.4.16", - "eslint": "~8.50.0", - "eslint-config-next": "~13.5.4", - "next": "~13.5.4", - "postcss": "~8.4.31", - "react": "~18.2.0", - "react-dom": "~18.2.0", - "tailwindcss": "~3.3.3", - "typescript": "~5.2.2" + "@uiw/react-codemirror": "4.21.20", + "react-codemirror-merge": "4.21.20", + "next": "14.0.3", + "react": "^18", + "react-dom": "^18" }, "devDependencies": { - "@uiw/react-codemirror": "4.21.20", - "react-codemirror-merge": "4.21.20" + "typescript": "^5", + "@types/node": "^20", + "@types/react": "^18", + "@types/react-dom": "^18", + "autoprefixer": "^10.0.1", + "postcss": "^8", + "tailwindcss": "^3.3.0", + "eslint": "^8", + "eslint-config-next": "14.0.3" } } diff --git a/package.json b/package.json index 7ee66fbed..3cec9ab26 100644 --- a/package.json +++ b/package.json @@ -28,15 +28,15 @@ "node": ">=16.0.0" }, "devDependencies": { - "@kkt/less-modules": "^7.2.0", + "@kkt/less-modules": "^7.5.4", "@kkt/ncc": "^1.0.13", "@types/react-test-renderer": "~18.0.0", "husky": "~8.0.0", - "kkt": "^7.2.0", - "lerna": "^7.0.0", - "lint-staged": "^14.0.1", + "kkt": "^7.5.4", + "lerna": "^8.0.0", + "lint-staged": "^15.1.0", "prettier": "^3.0.2", "react-test-renderer": "~18.2.0", - "tsbb": "^4.2.3" + "tsbb": "^4.2.4" } } diff --git a/www/.kktrc.ts b/www/.kktrc.ts index 435d953f0..cfe04765e 100644 --- a/www/.kktrc.ts +++ b/www/.kktrc.ts @@ -18,6 +18,9 @@ export default (conf: Configuration, env: 'production' | 'development', options: }), ); conf.module!.exprContextCritical = false; + /** https://github.com/kktjs/kkt/issues/446 */ + conf.ignoreWarnings = [{ module: /node_modules[\\/]parse5[\\/]/ }]; + if (env === 'production') { conf.optimization = { ...conf.optimization, diff --git a/www/package.json b/www/package.json index b961d8de1..d2336b3e9 100644 --- a/www/package.json +++ b/www/package.json @@ -7,20 +7,20 @@ "author": "kenny wong ", "license": "MIT", "scripts": { - "build": "cross-env GENERATE_SOURCEMAP=false kkt build", + "build": "kkt build", "start": "kkt start", "map": "source-map-explorer build/static/js/*.js --html build/website-result.html" }, "devDependencies": { - "@kkt/less-modules": "^7.2.0", - "@kkt/raw-modules": "^7.2.0", - "@kkt/scope-plugin-options": "^7.2.0", + "@kkt/less-modules": "^7.5.4", + "@kkt/raw-modules": "^7.5.4", + "@kkt/scope-plugin-options": "^7.5.4", "@types/katex": "^0.16.0", "@types/react": "^18.2.0", "@types/react-dom": "^18.2.0", "cross-env": "^7.0.3", - "kkt": "^7.2.0", - "source-map-explorer": "~2.5.2" + "kkt": "^7.5.4", + "source-map-explorer": "~2.5.3" }, "dependencies": { "@codemirror/lang-cpp": "^6.0.0", @@ -83,18 +83,18 @@ "@uiw/react-back-to-top": "^1.1.2", "@uiw/react-codemirror": "4.21.20", "@uiw/react-github-corners": "~1.5.14", - "@uiw/react-markdown-preview": "^4.1.13", + "@uiw/react-markdown-preview": "^5.0.2", "@uiw/react-shields": "^2.0.1", "@wcj/dark-mode": "~1.0.12", "code-example": "^3.3.6", "markdown-react-code-preview-loader": "^2.1.2", "react": "~18.2.0", - "react-code-preview-layout": "^3.0.1", + "react-code-preview-layout": "^3.1.4", "react-codemirror-merge": "4.21.20", "react-dom": "~18.2.0", - "react-router-dom": "^6.14.2", - "rehype-ignore": "^1.0.1", - "styled-components": "6.0.7" + "react-router-dom": "^6.20.0", + "rehype-ignore": "^2.0.1", + "styled-components": "^6.1.1" }, "eslintConfig": { "extends": [