A Q&A platform software for teams at any scales. Whether it's a community forum, help center, or knowledge management platform, you can always count on Apache Answer.
fix: development warning
shuai1fcf0363e200
diff --git a/ui/config-overrides.js b/ui/config-overrides.jsindex 4ce6f895..7d62b1d8 100644--- a/ui/config-overrides.js+++ b/ui/config-overrides.js@@ -21,7 +21,9 @@ const {addWebpackModuleRule,addWebpackAlias,setWebpackOptimizationSplitChunks,+ addWebpackPlugin,} = require("customize-cra");+const webpack = require('webpack');const path = require("path");const i18nPath = path.resolve(__dirname, "../i18n");@@ -30,7 +32,8 @@ module.exports = {webpack: function(config, env) {addWebpackAlias({"@": path.resolve(__dirname, "src"),- "@i18n": i18nPath+ "@i18n": i18nPath,+ buffer: 'buffer',})(config);addWebpackModuleRule({@@ -38,6 +41,12 @@ module.exports = {use: "yaml-loader"})(config);+ addWebpackPlugin(+ new webpack.ProvidePlugin({+ Buffer: ['buffer', 'Buffer'],+ })+ )(config);+setWebpackOptimizationSplitChunks({maxInitialRequests: 20,minSize: 20 * 1024,diff --git a/ui/package.json b/ui/package.jsonindex fdfe866b..b88fc12d 100644--- a/ui/package.json+++ b/ui/package.json@@ -67,6 +67,7 @@"@types/react-dom": "^18.0.6","@typescript-eslint/eslint-plugin": "^6.11.0","@typescript-eslint/parser": "^6.11.0",+ "buffer": "6.0.3","customize-cra": "^1.0.0","eslint": "^8.53.0","eslint-config-airbnb": "^19.0.4",diff --git a/ui/pnpm-lock.yaml b/ui/pnpm-lock.yamlindex 26b676c9..842009a7 100644--- a/ui/pnpm-lock.yaml+++ b/ui/pnpm-lock.yaml@@ -153,6 +153,9 @@ importers:'@typescript-eslint/parser':specifier: ^6.11.0version: 6.21.0([email protected])([email protected])+ buffer:+ specifier: 6.0.3+ version: 6.0.3customize-cra:specifier: ^1.0.0version: 1.0.0@@ -2303,6 +2306,9 @@ packages:resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==}+ resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==}+resolution: {integrity: sha512-x+VAiMRL6UPkx+kudNvxTl6hB2XNNCG2r+7wixVfIYwu/2HKRXimwQyaumLjMveWvT2Hkd/cAJw+QBMfJ/EKVw==}@@ -2367,6 +2373,9 @@ packages:resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==}+ resolution: {integrity: sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==}+resolution: {integrity: sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==}engines: {node: '>=6'}@@ -3863,6 +3872,9 @@ packages:resolution: {integrity: sha512-00n6YnVHKrinT9t0d9+5yZC6UBNJANpYEQvL2LlX6Ab9lnmxzIRcEmTPuyGScvl1+jKuCICX1Z0Ab1pPKKdikA==}engines: {node: '>=4'}+ resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==}+resolution: {integrity: sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==}engines: {node: '>= 4'}@@ -9765,6 +9777,8 @@ snapshots:+ [email protected]: {}+@@ -9841,6 +9855,11 @@ snapshots:+ dependencies:+ base64-js: 1.5.1+ ieee754: 1.2.1+@@ -11593,6 +11612,8 @@ snapshots:dependencies:harmony-reflect: 1.6.2+ [email protected]: {}+