Skip to content

Commit 03702dd

Browse files
authored
Merge pull request #4770 from ClickHouse/vercel-build-investigation
Vercel preview build failure investigation
2 parents 19062f9 + 7324658 commit 03702dd

File tree

4 files changed

+43
-4
lines changed

4 files changed

+43
-4
lines changed

docusaurus.config.en.js

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,42 @@ const config = {
322322
},
323323
};
324324
},
325+
// Webpack optimization plugin for large sites
326+
function webpackOptimizationPlugin(context, options) {
327+
return {
328+
name: 'webpack-optimization-plugin',
329+
configureWebpack(config, isServer) {
330+
331+
const isVercel = process.env.VERCEL === '1';
332+
333+
if (!isServer && isVercel) {
334+
return {
335+
optimization: {
336+
splitChunks: {
337+
chunks: 'all',
338+
cacheGroups: {
339+
vendor: {
340+
chunks: 'all',
341+
test: /node_modules/,
342+
priority: 20,
343+
},
344+
common: {
345+
minChunks: 2,
346+
chunks: 'all',
347+
priority: 10,
348+
reuseExistingChunk: true,
349+
enforce: true,
350+
},
351+
},
352+
maxSize: 244000,
353+
},
354+
},
355+
};
356+
}
357+
return {};
358+
},
359+
};
360+
},
325361
// [
326362
// N.B - If you need to redirect a page please do so from vercel.json
327363
// '@docusaurus/plugin-client-redirects',
@@ -371,7 +407,7 @@ const config = {
371407
]
372408
],
373409
customFields: {
374-
blogSidebarLink: "/docs/knowledgebase", // Used for KB article page
410+
blogSidebarLink: "/docs/knowledgebase",
375411
galaxyApiEndpoint:
376412
process.env.NEXT_PUBLIC_GALAXY_API_ENDPOINT || "http://localhost:3000",
377413
},

scripts/changelog/cloud-changelog-rss.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
#!/bin/bash
22

33
# Configuration
4+
export LC_ALL=C
5+
export LANG=C
6+
47
CHANGELOG_FILE="docs/cloud/reference/01_changelog/01_changelog.md"
58
OUTPUT_FILE="static/cloud/changelog-rss.xml"
69
FEED_URL="https://clickhouse.com/docs/cloud/changelog-rss.xml"

src/components/CodeViewer/CodeInterpreter.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Button, Icon, RadioGroup, Tooltip } from '@clickhouse/click-ui/bundled'
22
import { createClient as createWebClient } from '@clickhouse/client-web'
3-
import JSON5 from 'json5'
3+
import json5 from 'json5';
44
import { useEffect, useState } from 'react'
55
import short from 'short-uuid'
66
import CodeResults, { DefaultView } from './CodeResults'
@@ -90,7 +90,7 @@ function CodeInterpreter({
9090
params.forEach((param) => {
9191
if (param.type && /^(Array|Map|Tuple|Nested)/.test(param.type)) {
9292
try {
93-
query_params[param.name] = JSON5.parse(param.value)
93+
query_params[param.name] = json5.parse(param.value)
9494
} catch (e) {
9595
// just send and let clickhouse error
9696
query_params[param.name] = param.value

src/css/custom.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1458,7 +1458,7 @@ input::-ms-input-placeholder { /* Microsoft Edge */
14581458
display: flex;
14591459
}
14601460

1461-
@media (max-width: breakpoints.$laptop-breakpoint) {
1461+
@media (max-width: #{breakpoints.$laptop-breakpoint}) {
14621462
.installContainer {
14631463
flex-wrap: wrap;
14641464
}

0 commit comments

Comments
 (0)