From 6d4132da503ddc2d35b04eae4b6a251bd152b51b Mon Sep 17 00:00:00 2001 From: Dominic Tran Date: Wed, 19 Nov 2025 11:49:53 -0600 Subject: [PATCH 1/7] fixing json5 error in build --- src/components/CodeViewer/CodeInterpreter.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/CodeViewer/CodeInterpreter.tsx b/src/components/CodeViewer/CodeInterpreter.tsx index b0b51f278cf..d254fbbd538 100644 --- a/src/components/CodeViewer/CodeInterpreter.tsx +++ b/src/components/CodeViewer/CodeInterpreter.tsx @@ -1,6 +1,6 @@ import { Button, Icon, RadioGroup, Tooltip } from '@clickhouse/click-ui/bundled' import { createClient as createWebClient } from '@clickhouse/client-web' -import { parse } from 'json5' +import json5 from 'json5'; import { useEffect, useState } from 'react' import short from 'short-uuid' import CodeResults, { DefaultView } from './CodeResults' @@ -90,7 +90,7 @@ function CodeInterpreter({ params.forEach((param) => { if (param.type && /^(Array|Map|Tuple|Nested)/.test(param.type)) { try { - query_params[param.name] = parse(param.value) + query_params[param.name] = json5.parse(param.value) } catch (e) { // just send and let clickhouse error query_params[param.name] = param.value From fbc5921f2b5de113578b00e0a18cd5a8b537e94b Mon Sep 17 00:00:00 2001 From: Dominic Tran Date: Wed, 19 Nov 2025 12:13:17 -0600 Subject: [PATCH 2/7] adding webpack splitchunks --- docusaurus.config.en.js | 33 ++++++++++++++++++++++++++++++--- 1 file changed, 30 insertions(+), 3 deletions(-) diff --git a/docusaurus.config.en.js b/docusaurus.config.en.js index 1c3c8c3b473..9b16b54f260 100644 --- a/docusaurus.config.en.js +++ b/docusaurus.config.en.js @@ -308,7 +308,7 @@ const config = { defaultMode: "dark", }, }), - + plugins: [ "docusaurus-plugin-sass", function (context, options) { @@ -371,11 +371,38 @@ const config = { ] ], customFields: { - blogSidebarLink: "/docs/knowledgebase", // Used for KB article page + blogSidebarLink: "/docs/knowledgebase", galaxyApiEndpoint: process.env.NEXT_PUBLIC_GALAXY_API_ENDPOINT || "http://localhost:3000", }, - + webpack: (config, { isServer }) => { + if (!isServer) { + config.optimization = { + ...config.optimization, + splitChunks: { + chunks: 'all', + cacheGroups: { + vendor: { + name: 'vendors', + chunks: 'all', + test: /node_modules/, + priority: 20, + }, + common: { + name: 'common', + minChunks: 2, + chunks: 'all', + priority: 10, + reuseExistingChunk: true, + enforce: true, + }, + }, + maxSize: 244000, + }, + }; + } + return config; + }, }; module.exports = config; From edcc29e251ce772aae10dd3baf216b1970f397ac Mon Sep 17 00:00:00 2001 From: Dominic Tran Date: Wed, 19 Nov 2025 12:28:43 -0600 Subject: [PATCH 3/7] wrapping webpack into a plugin --- docusaurus.config.en.js | 66 +++++++++++++++++++++++------------------ 1 file changed, 37 insertions(+), 29 deletions(-) diff --git a/docusaurus.config.en.js b/docusaurus.config.en.js index 9b16b54f260..fbbfa6f7499 100644 --- a/docusaurus.config.en.js +++ b/docusaurus.config.en.js @@ -308,7 +308,7 @@ const config = { defaultMode: "dark", }, }), - + plugins: [ "docusaurus-plugin-sass", function (context, options) { @@ -322,6 +322,41 @@ const config = { }, }; }, + // Webpack optimization plugin for large sites + function webpackOptimizationPlugin(context, options) { + return { + name: 'webpack-optimization-plugin', + configureWebpack(config, isServer) { + if (!isServer) { + return { + optimization: { + splitChunks: { + chunks: 'all', + cacheGroups: { + vendor: { + name: 'vendors', + chunks: 'all', + test: /node_modules/, + priority: 20, + }, + common: { + name: 'common', + minChunks: 2, + chunks: 'all', + priority: 10, + reuseExistingChunk: true, + enforce: true, + }, + }, + maxSize: 244000, + }, + }, + }; + } + return {}; + }, + }; + }, // [ // N.B - If you need to redirect a page please do so from vercel.json // '@docusaurus/plugin-client-redirects', @@ -375,34 +410,7 @@ const config = { galaxyApiEndpoint: process.env.NEXT_PUBLIC_GALAXY_API_ENDPOINT || "http://localhost:3000", }, - webpack: (config, { isServer }) => { - if (!isServer) { - config.optimization = { - ...config.optimization, - splitChunks: { - chunks: 'all', - cacheGroups: { - vendor: { - name: 'vendors', - chunks: 'all', - test: /node_modules/, - priority: 20, - }, - common: { - name: 'common', - minChunks: 2, - chunks: 'all', - priority: 10, - reuseExistingChunk: true, - enforce: true, - }, - }, - maxSize: 244000, - }, - }; - } - return config; - }, + }; module.exports = config; From f36ab27968f91a01f7f4f6fbe75721b9ab95a27e Mon Sep 17 00:00:00 2001 From: Dominic Tran Date: Wed, 19 Nov 2025 12:52:09 -0600 Subject: [PATCH 4/7] getting rid of a few warnings, testing the build still works --- scripts/changelog/cloud-changelog-rss.sh | 3 +++ src/css/custom.scss | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/changelog/cloud-changelog-rss.sh b/scripts/changelog/cloud-changelog-rss.sh index 5f08af45de3..4153ba88b38 100755 --- a/scripts/changelog/cloud-changelog-rss.sh +++ b/scripts/changelog/cloud-changelog-rss.sh @@ -1,6 +1,9 @@ #!/bin/bash # Configuration +export LC_ALL=C +export LANG=C + CHANGELOG_FILE="docs/cloud/reference/01_changelog/01_changelog.md" OUTPUT_FILE="static/cloud/changelog-rss.xml" FEED_URL="https://clickhouse.com/docs/cloud/changelog-rss.xml" diff --git a/src/css/custom.scss b/src/css/custom.scss index e0d86b12b1a..cb994edc07d 100644 --- a/src/css/custom.scss +++ b/src/css/custom.scss @@ -1458,7 +1458,7 @@ input::-ms-input-placeholder { /* Microsoft Edge */ display: flex; } -@media (max-width: breakpoints.$laptop-breakpoint) { +@media (max-width: #{breakpoints.$laptop-breakpoint}) { .installContainer { flex-wrap: wrap; } From 44c2da419731022968ab6f81bffbf717af6ecc4b Mon Sep 17 00:00:00 2001 From: Dominic Tran Date: Wed, 19 Nov 2025 14:46:13 -0600 Subject: [PATCH 5/7] only doing custom yarn bundling for non-local development, otherwise it breaks. --- docusaurus.config.en.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docusaurus.config.en.js b/docusaurus.config.en.js index fbbfa6f7499..fca1e31c016 100644 --- a/docusaurus.config.en.js +++ b/docusaurus.config.en.js @@ -327,7 +327,10 @@ const config = { return { name: 'webpack-optimization-plugin', configureWebpack(config, isServer) { - if (!isServer) { + + const isVercel = process.env.VERCEL === '1'; + + if (!isServer && isVercel) { return { optimization: { splitChunks: { From f2792cda60af7b867e0a433353cc4e865f036758 Mon Sep 17 00:00:00 2001 From: Dominic Tran Date: Wed, 19 Nov 2025 15:31:52 -0600 Subject: [PATCH 6/7] adjusting config to avoid console errors --- docusaurus.config.en.js | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/docusaurus.config.en.js b/docusaurus.config.en.js index fca1e31c016..a6a61de5589 100644 --- a/docusaurus.config.en.js +++ b/docusaurus.config.en.js @@ -336,19 +336,15 @@ const config = { splitChunks: { chunks: 'all', cacheGroups: { - vendor: { - name: 'vendors', - chunks: 'all', - test: /node_modules/, + defaultVendors: { + test: /[\\/]node_modules[\\/]/, priority: 20, + reuseExistingChunk: true, }, - common: { - name: 'common', + default: { minChunks: 2, - chunks: 'all', priority: 10, reuseExistingChunk: true, - enforce: true, }, }, maxSize: 244000, From 7324658ae4e7bc82cfdd5cd1fd260cc8d65023da Mon Sep 17 00:00:00 2001 From: Dominic Tran Date: Wed, 19 Nov 2025 16:26:44 -0600 Subject: [PATCH 7/7] adjusting config --- docusaurus.config.en.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/docusaurus.config.en.js b/docusaurus.config.en.js index a6a61de5589..9371cd2e08f 100644 --- a/docusaurus.config.en.js +++ b/docusaurus.config.en.js @@ -336,15 +336,17 @@ const config = { splitChunks: { chunks: 'all', cacheGroups: { - defaultVendors: { - test: /[\\/]node_modules[\\/]/, + vendor: { + chunks: 'all', + test: /node_modules/, priority: 20, - reuseExistingChunk: true, }, - default: { + common: { minChunks: 2, + chunks: 'all', priority: 10, reuseExistingChunk: true, + enforce: true, }, }, maxSize: 244000,