Compare commits

...

4 Commits

Author SHA1 Message Date
Vinícius Lourenço
d044a809c8 Merge remote-tracking branch 'origin/main' into chore/frontend-vite-8 2026-11-26 15:22:47 -03:00
Vinícius Lourenço
0072135229 chore(frontend): require node 22.12 for vite 8 2026-11-26 15:18:35 -03:00
Vinícius Lourenço
c1007a331b perf(frontend): keep the entry's static graph in one chunk on Vite 8 2026-11-23 15:06:26 -03:00
Vinícius Lourenço
ecb413de71 chore(frontend): upgrade vite to 8 2026-11-23 15:06:25 -03:00
5 changed files with 326 additions and 315 deletions

View File

@@ -90,7 +90,7 @@ const config: StorybookConfig = {
build: {
...viteConfig.build,
// `vite.config.ts` sets this for the app; Storybook's builder replaces
// `build` wholesale, which leaves rolldown-vite on its default
// `build` wholesale, which leaves Vite on its default
// lightningcss. That one rejects `:global()` in a plain stylesheet, which
// the app has, and the static build dies in CSS minification.
cssMinify: 'esbuild',

View File

@@ -34,7 +34,7 @@
"build:geo-outlines": "node scripts/geo-outlines/build.mjs"
},
"engines": {
"node": ">=22.0.0",
"node": ">=22.12.0",
"pnpm": ">=10.0.0 <11.0.0"
},
"author": "",
@@ -67,7 +67,7 @@
"@visx/hierarchy": "3.12.0",
"@visx/shape": "3.5.0",
"@visx/tooltip": "3.3.0",
"@vitejs/plugin-react": "5.1.4",
"@vitejs/plugin-react": "6.3.0",
"ansi-to-html": "0.7.2",
"antd": "5.11.0",
"antd-table-saveas-excel": "2.2.1",
@@ -137,7 +137,7 @@
"typescript": "5.9.3",
"uplot": "1.6.31",
"uuid": "14.0.1",
"vite": "npm:rolldown-vite@7.3.1",
"vite": "8.3.8",
"zod": "4.6.7",
"zustand": "5.0.11"
},
@@ -194,6 +194,7 @@
"@types/topojson-client": "3.1.5",
"@types/topojson-specification": "1.0.5",
"@typescript/native-preview": "7.0.0-dev.20260430.1",
"esbuild": "0.28.1",
"eslint-plugin-sonarjs": "4.0.2",
"husky": "^9.1.7",
"jest-environment-jsdom": "29.7.0",
@@ -221,8 +222,7 @@
"use-sync-external-store": "1.6.0",
"vite-plugin-checker": "0.12.0",
"vite-plugin-compression": "0.5.1",
"vite-plugin-image-optimizer": "2.0.3",
"vite-tsconfig-paths": "6.1.1"
"vite-plugin-image-optimizer": "2.0.3"
},
"lint-staged": {
"*.(js|jsx|ts|tsx)": [

597
frontend/pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@@ -40,9 +40,9 @@ overrides:
# remove: blocked. The direct dep is already on 3.4.17, but @grafana/data
# (latest 13.1.0) and monaco-editor (latest 0.55.1) still pin vulnerable versions
dompurify@<=3.4.16: '>=3.4.17 <4'
# via: rolldown-vite@7.3.1 (esbuild ^0.27.0); ts-jest@29.4.9 (~0.27.4)
# remove: blocked on rolldown-vite (7.3.1 is latest, still ^0.27.0);
# orval >=8.20.0 and ts-jest >=29.4.11 already fixed on their side
# via: ts-jest@29.4.9 (~0.27.4)
# remove: blocked on ts-jest; orval >=8.20.0 and ts-jest >=29.4.11 already
# fixed on their side
esbuild@>=0.27.3 <0.28.1: '>=0.28.1 <0.29.0'
# via: @commitlint/cli > @commitlint/config-validator > ajv@8 (fast-uri ^3.0.1)
# remove: blocked — ajv@8 caps fast-uri at ^3, and only 3.1.9 carries the fix

View File

@@ -7,7 +7,6 @@ import { defineConfig, loadEnv } from 'vite';
import vitePluginChecker from 'vite-plugin-checker';
import viteCompression from 'vite-plugin-compression';
import { ViteImageOptimizer } from 'vite-plugin-image-optimizer';
import tsconfigPaths from 'vite-tsconfig-paths';
import type {
Appcues,
Posthog,
@@ -82,7 +81,6 @@ export default defineConfig(({ mode }): UserConfig => {
const basePath = env.VITE_BASE_PATH || '/';
const plugins = [
tsconfigPaths(),
rawMarkdownPlugin(),
devBasePathPlugin(basePath),
devBootDataPlugin(env),
@@ -142,6 +140,7 @@ export default defineConfig(({ mode }): UserConfig => {
return {
plugins,
resolve: {
tsconfigPaths: true,
alias: {
// @grafana/data imports bare CJS `lodash`, whose UMD footer checks for an
// AMD loader before assigning module.exports. Any third-party script that
@@ -149,13 +148,13 @@ export default defineConfig(({ mode }): UserConfig => {
// every lodash method reached through it is undefined at runtime. lodash-es
// is the same version, real ESM, and tree-shakes.
lodash: 'lodash-es',
'@': resolve(__dirname, './src'),
utils: resolve(__dirname, './src/utils'),
types: resolve(__dirname, './src/types'),
constants: resolve(__dirname, './src/constants'),
parser: resolve(__dirname, './src/parser'),
providers: resolve(__dirname, './src/providers'),
lib: resolve(__dirname, './src/lib'),
'@': resolve(import.meta.dirname, './src'),
utils: resolve(import.meta.dirname, './src/utils'),
types: resolve(import.meta.dirname, './src/types'),
constants: resolve(import.meta.dirname, './src/constants'),
parser: resolve(import.meta.dirname, './src/parser'),
providers: resolve(import.meta.dirname, './src/providers'),
lib: resolve(import.meta.dirname, './src/lib'),
},
},
css: {
@@ -188,6 +187,15 @@ export default defineConfig(({ mode }): UserConfig => {
sourcemap: true,
outDir: 'build',
cssMinify: 'esbuild',
rolldownOptions: {
output: {
// Without this group Rolldown splits the entry's static graph into ~300
// chunks, 324 requests on first load.
codeSplitting: {
groups: [{ name: 'initial', tags: ['$initial'] }],
},
},
},
},
server: {
open: true,