From be2c63d303b02dd0caffe64e23fe7ae61a61ac68 Mon Sep 17 00:00:00 2001 From: Thomas Bouffard <27200110+tbouffard@users.noreply.github.com> Date: Sun, 18 Aug 2024 23:56:38 +0200 Subject: [PATCH 1/7] feat: add a vanilla TS project built with Rsbuild MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use the same shared code as in other project. The dev server and the build process are very fast! ``` Rsbuild v1.0.1-beta.14 ● web ━━━━━━━━━━━━━━━━━━━━━━━━━ (100%) emitting after emit ready Compiled in 0.47 s (web) info Production file sizes for web: File Size Gzipped dist/index.html 0.37 kB 0.25 kB dist/static/js/index.18915e19.js 3.4 kB 1.6 kB dist/static/css/index.143c2b7c.css 4.6 kB 1.5 kB dist/static/js/843.89efea31.js 431.3 kB 116.3 kB Total size: 439.6 kB Gzipped size: 119.7 kB ``` --- .../workflows/check-typescript-projects.yml | 1 + package-lock.json | 271 +++++++++++++++++- projects/rsbuild-ts/.gitignore | 13 + projects/rsbuild-ts/README.md | 20 ++ projects/rsbuild-ts/package.json | 11 + projects/rsbuild-ts/rsbuild.config.ts | 3 + projects/rsbuild-ts/src/index.ts | 23 ++ projects/rsbuild-ts/tsconfig.json | 18 ++ 8 files changed, 356 insertions(+), 4 deletions(-) create mode 100644 projects/rsbuild-ts/.gitignore create mode 100644 projects/rsbuild-ts/README.md create mode 100644 projects/rsbuild-ts/package.json create mode 100644 projects/rsbuild-ts/rsbuild.config.ts create mode 100644 projects/rsbuild-ts/src/index.ts create mode 100644 projects/rsbuild-ts/tsconfig.json diff --git a/.github/workflows/check-typescript-projects.yml b/.github/workflows/check-typescript-projects.yml index 37ac31b..095aa26 100644 --- a/.github/workflows/check-typescript-projects.yml +++ b/.github/workflows/check-typescript-projects.yml @@ -56,6 +56,7 @@ jobs: - lit-ts - parcel-ts - rollup-ts + - rsbuild-ts - sveltekit-ts - vitejs-ts npm-package: ['release', 'development'] diff --git a/package-lock.json b/package-lock.json index b0c2da8..f8dac9d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -625,6 +625,45 @@ "node": ">=12.0.0" } }, + "node_modules/@module-federation/runtime": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/@module-federation/runtime/-/runtime-0.2.3.tgz", + "integrity": "sha512-N+ZxBUb1mkmfO9XT1BwgYQgShtUTlijHbukqQ4afFka5lRAT+ayC7RKfHJLz0HbuexKPCmPBDfdmCnErR5WyTQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@module-federation/sdk": "0.2.3" + } + }, + "node_modules/@module-federation/runtime-tools": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/@module-federation/runtime-tools/-/runtime-tools-0.2.3.tgz", + "integrity": "sha512-capN8CVTCEqNAjnl102girrkevczoQfnQYyiYC4WuyKsg7+LUqfirIe1Eiyv6VSE2UgvOTZDnqvervA6rBOlmg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@module-federation/runtime": "0.2.3", + "@module-federation/webpack-bundler-runtime": "0.2.3" + } + }, + "node_modules/@module-federation/sdk": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/@module-federation/sdk/-/sdk-0.2.3.tgz", + "integrity": "sha512-W9zrPchLocyCBc/B8CW21akcfJXLl++9xBe1L1EtgxZGfj/xwHt0GcBWE/y+QGvYTL2a1iZjwscbftbUhxgxXg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@module-federation/webpack-bundler-runtime": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/@module-federation/webpack-bundler-runtime/-/webpack-bundler-runtime-0.2.3.tgz", + "integrity": "sha512-L/jt2uJ+8dwYiyn9GxryzDR6tr/Wk8rpgvelM2EBeLIhu7YxCHSmSjQYhw3BTux9zZIr47d1K9fGjBFsVRd/SQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@module-federation/runtime": "0.2.3", + "@module-federation/sdk": "0.2.3" + } + }, "node_modules/@msgpackr-extract/msgpackr-extract-darwin-arm64": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/@msgpackr-extract/msgpackr-extract-darwin-arm64/-/msgpackr-extract-darwin-arm64-3.0.2.tgz", @@ -2968,6 +3007,207 @@ "win32" ] }, + "node_modules/@rsbuild/core": { + "version": "1.0.1-beta.14", + "resolved": "https://registry.npmjs.org/@rsbuild/core/-/core-1.0.1-beta.14.tgz", + "integrity": "sha512-dUeEao3/QClKUqUltPFNfBCyLKyK3v/GBu3CKii8IZi61Aky4Sua/lKGX+vz9OesBXFKvbSpWg2B+33Il4n/eA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@rspack/core": "1.0.0-beta.5", + "@rspack/lite-tapable": "1.0.0", + "@swc/helpers": "0.5.11", + "caniuse-lite": "^1.0.30001651", + "core-js": "~3.38.0" + }, + "bin": { + "rsbuild": "bin/rsbuild.js" + }, + "engines": { + "node": ">=16.7.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + } + }, + "node_modules/@rspack/binding": { + "version": "1.0.0-beta.5", + "resolved": "https://registry.npmjs.org/@rspack/binding/-/binding-1.0.0-beta.5.tgz", + "integrity": "sha512-GT0cxYzD4jrXaB4eaGu1N/l32InSWelDREvqg1MDjZAYZlYreN2yFiA8Ds5+RqPz53csup1WWHFMqYcNH9KipQ==", + "dev": true, + "license": "MIT", + "optionalDependencies": { + "@rspack/binding-darwin-arm64": "1.0.0-beta.5", + "@rspack/binding-darwin-x64": "1.0.0-beta.5", + "@rspack/binding-linux-arm64-gnu": "1.0.0-beta.5", + "@rspack/binding-linux-arm64-musl": "1.0.0-beta.5", + "@rspack/binding-linux-x64-gnu": "1.0.0-beta.5", + "@rspack/binding-linux-x64-musl": "1.0.0-beta.5", + "@rspack/binding-win32-arm64-msvc": "1.0.0-beta.5", + "@rspack/binding-win32-ia32-msvc": "1.0.0-beta.5", + "@rspack/binding-win32-x64-msvc": "1.0.0-beta.5" + } + }, + "node_modules/@rspack/binding-darwin-arm64": { + "version": "1.0.0-beta.5", + "resolved": "https://registry.npmjs.org/@rspack/binding-darwin-arm64/-/binding-darwin-arm64-1.0.0-beta.5.tgz", + "integrity": "sha512-lHiQ5cZrBQEpoh7Cd0AY3ggzlfBy9HiK4T0x2VdtsT2ZMc81hPBJ23hB8WIA+CTfOwbeLUBi0Ypfo26jls+dBw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rspack/binding-darwin-x64": { + "version": "1.0.0-beta.5", + "resolved": "https://registry.npmjs.org/@rspack/binding-darwin-x64/-/binding-darwin-x64-1.0.0-beta.5.tgz", + "integrity": "sha512-uEWJe2Egs0LawG/8pnfHIyZeJWLMCZkQjZM1PY8iH7jVLXh1rELQJbGlMHNFbYvM4cU8Xfk9si2Vi4mPRepzlQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rspack/binding-linux-arm64-gnu": { + "version": "1.0.0-beta.5", + "resolved": "https://registry.npmjs.org/@rspack/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.0.0-beta.5.tgz", + "integrity": "sha512-DHyd2f+H5Y1F12fH5aN1Rx341E6cvH86pGnqcbdsVaOgM+8GM55LIr4p90XIdrjK2vH5PYROFM8g/d6CGzX3VQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rspack/binding-linux-arm64-musl": { + "version": "1.0.0-beta.5", + "resolved": "https://registry.npmjs.org/@rspack/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.0.0-beta.5.tgz", + "integrity": "sha512-QG9NYVcwpaDqkUT1Ny1yr+RAgSmdN8AswqLkLbtD42Q/P+DKlvKUa48BxU7irQgYe21AKEg4E7EnLCXaeSwRFw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rspack/binding-linux-x64-gnu": { + "version": "1.0.0-beta.5", + "resolved": "https://registry.npmjs.org/@rspack/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.0.0-beta.5.tgz", + "integrity": "sha512-r3KB58qDZvTh9zoAdZG0F6soh9f7MtCbhZzhLAiFb8E5J+QBK3dN+hn6LLtap8istZaU0nq9UdYiKDPOthhPiQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rspack/binding-linux-x64-musl": { + "version": "1.0.0-beta.5", + "resolved": "https://registry.npmjs.org/@rspack/binding-linux-x64-musl/-/binding-linux-x64-musl-1.0.0-beta.5.tgz", + "integrity": "sha512-/IDw2JI273wQXCoQQvnX2sthNglChMhQDig8XxFU3fLQmaPB8zxGFCxowstOQPjN/McSddHGdISGlv6RKh8rCQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rspack/binding-win32-arm64-msvc": { + "version": "1.0.0-beta.5", + "resolved": "https://registry.npmjs.org/@rspack/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.0.0-beta.5.tgz", + "integrity": "sha512-HhT79VMinXof1sI7SWBRNBamSUUcwgZwlfhcQlaRtm06YzmK0wieJAWi1Gunr6/tlDPa4UNM+y3le6K5kibwfQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rspack/binding-win32-ia32-msvc": { + "version": "1.0.0-beta.5", + "resolved": "https://registry.npmjs.org/@rspack/binding-win32-ia32-msvc/-/binding-win32-ia32-msvc-1.0.0-beta.5.tgz", + "integrity": "sha512-oYXpiXpoVBL7v3biBHeUlkrW0EVceG3PsBPcBg/AuVqbpogePu1xN6gRdaN9CYK/uRNcDyFC3QWDOq+Cn3KExg==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rspack/binding-win32-x64-msvc": { + "version": "1.0.0-beta.5", + "resolved": "https://registry.npmjs.org/@rspack/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.0.0-beta.5.tgz", + "integrity": "sha512-tXYOIThPgiIvKKoV91GN/+P405DGFcuhdZZ+i0AhrRrtbK7mpkIRdde8aVMXNbTA6NnKAcOSAvJ2bVUVq3F2rQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rspack/core": { + "version": "1.0.0-beta.5", + "resolved": "https://registry.npmjs.org/@rspack/core/-/core-1.0.0-beta.5.tgz", + "integrity": "sha512-X8amU6N26FE4/3JPs+asTIeBZlESrfCC4jlfEOc6bsjLCiMK8NkF3r84xFG7qpGBe178c+yXwmBluyHUkMGHqg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@module-federation/runtime-tools": "0.2.3", + "@rspack/binding": "1.0.0-beta.5", + "@rspack/lite-tapable": "1.0.0", + "caniuse-lite": "^1.0.30001616" + }, + "engines": { + "node": ">=16.0.0" + }, + "peerDependencies": { + "@swc/helpers": ">=0.5.1" + }, + "peerDependenciesMeta": { + "@swc/helpers": { + "optional": true + } + } + }, + "node_modules/@rspack/lite-tapable": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@rspack/lite-tapable/-/lite-tapable-1.0.0.tgz", + "integrity": "sha512-7MZf4lburSUZoEenwazwUDKHhqyfnLCGnQ/tKcUtztfmVzfjZfRn/EaiT0AKkYGnL2U8AGsw89oUeVyvaOLVCw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=16.0.0" + } + }, "node_modules/@sveltejs/adapter-auto": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/@sveltejs/adapter-auto/-/adapter-auto-2.1.1.tgz", @@ -3748,9 +3988,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001614", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001614.tgz", - "integrity": "sha512-jmZQ1VpmlRwHgdP1/uiKzgiAuGOfLEJsYFP4+GBou/QQ4U6IOJCB4NP1c+1p9RGLpwObcT94jA5/uO+F1vBbog==", + "version": "1.0.30001651", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001651.tgz", + "integrity": "sha512-9Cf+Xv1jJNe1xPZLGuUXLNkE1BoDkqRqYyFJ9TDYSqhduqA4hu4oR9HluGoWYQC/aj8WHjsGVV+bwkh0+tegRg==", "dev": true, "funding": [ { @@ -3765,7 +4005,8 @@ "type": "github", "url": "https://github.com/sponsors/ai" } - ] + ], + "license": "CC-BY-4.0" }, "node_modules/chalk": { "version": "2.4.2", @@ -4182,6 +4423,18 @@ "copyup": "copyfiles" } }, + "node_modules/core-js": { + "version": "3.38.0", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.38.0.tgz", + "integrity": "sha512-XPpwqEodRljce9KswjZShh95qJ1URisBeKCjUdq27YdenkslVe7OO0ZJhlYXAChW7OhXaRLl8AAba7IBfoIHug==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/core-js" + } + }, "node_modules/core-util-is": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", @@ -6092,6 +6345,10 @@ "resolved": "projects/rollup-ts", "link": true }, + "node_modules/maxgraph-ts-example-built-with-rsbuild": { + "resolved": "projects/rsbuild-ts", + "link": true + }, "node_modules/maxgraph-ts-example-built-with-sveltekit": { "resolved": "projects/sveltekit-ts", "link": true @@ -8481,6 +8738,12 @@ "tslib": "~2.6.3" } }, + "projects/rsbuild-ts": { + "name": "maxgraph-ts-example-built-with-rsbuild", + "devDependencies": { + "@rsbuild/core": "1.0.1-beta.14" + } + }, "projects/sveltekit-ts": { "name": "maxgraph-ts-example-built-with-sveltekit", "devDependencies": { diff --git a/projects/rsbuild-ts/.gitignore b/projects/rsbuild-ts/.gitignore new file mode 100644 index 0000000..38d7344 --- /dev/null +++ b/projects/rsbuild-ts/.gitignore @@ -0,0 +1,13 @@ +# Local +.DS_Store +*.local +*.log* + +# Dist +node_modules +dist/ + +# IDE +.vscode/* +!.vscode/extensions.json +.idea diff --git a/projects/rsbuild-ts/README.md b/projects/rsbuild-ts/README.md new file mode 100644 index 0000000..d5f5d30 --- /dev/null +++ b/projects/rsbuild-ts/README.md @@ -0,0 +1,20 @@ +# Rsbuild Project + +A vanilla TypeScript project built with https://rsbuild.dev + +Initialized by following https://rsbuild.dev/guide/start/quick-start: +- `npm create rsbuild@latest` +- this used create-rsbuild@1.0.1-beta.14 + +## Setup + +From the repository root, run `npm install`. For more details, see the [root README](../../README.md#setup). + +If you want to use the maxGraph development version (built locally), see the [root README](../../README.md#maxgraph-dev-version) about maxGraph integration. + +## Running the project + +From the repository root, run `npm run dev -w projects/rsbuild-ts` and go to http://localhost:3000/ + +If you want to bundle the application, run `npm run build -w projects/rsbuild-ts` and then run `npm run preview -w projects/rsbuild-ts` +to access to a preview of the bundled application. diff --git a/projects/rsbuild-ts/package.json b/projects/rsbuild-ts/package.json new file mode 100644 index 0000000..f4dec4a --- /dev/null +++ b/projects/rsbuild-ts/package.json @@ -0,0 +1,11 @@ +{ + "name": "maxgraph-ts-example-built-with-rsbuild", + "scripts": { + "dev": "rsbuild dev --open", + "build": "rsbuild build", + "preview": "rsbuild preview" + }, + "devDependencies": { + "@rsbuild/core": "1.0.1-beta.14" + } +} diff --git a/projects/rsbuild-ts/rsbuild.config.ts b/projects/rsbuild-ts/rsbuild.config.ts new file mode 100644 index 0000000..03f85e1 --- /dev/null +++ b/projects/rsbuild-ts/rsbuild.config.ts @@ -0,0 +1,3 @@ +import { defineConfig } from '@rsbuild/core'; + +export default defineConfig({}); diff --git a/projects/rsbuild-ts/src/index.ts b/projects/rsbuild-ts/src/index.ts new file mode 100644 index 0000000..1114803 --- /dev/null +++ b/projects/rsbuild-ts/src/index.ts @@ -0,0 +1,23 @@ +import '@maxgraph/core/css/common.css'; +import 'maxgraph-examples-shared/css/rubber-band.css' +import 'maxgraph-examples-shared/css/general-style.css' + +import {Client} from "@maxgraph/core"; +import {initializeGraph} from 'maxgraph-examples-shared'; + +document.querySelector('#root')!.innerHTML = ` +

maxGraph Rsbuild TypeScript example

+

Display a test graph. Activated behaviours:

+ +
+ +`; + +const footer = document.querySelector('footer')!; +footer.innerText = `Built with maxGraph ${Client.VERSION}`; + +// Creates the graph inside the given container +initializeGraph(document.querySelector('#graph-container')); diff --git a/projects/rsbuild-ts/tsconfig.json b/projects/rsbuild-ts/tsconfig.json new file mode 100644 index 0000000..65773d6 --- /dev/null +++ b/projects/rsbuild-ts/tsconfig.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "target": "ES2020", + "lib": ["DOM", "ES2020"], + "module": "ESNext", + "noEmit": true, + "strict": true, + "skipLibCheck": true, + "isolatedModules": true, + "resolveJsonModule": true, + "moduleResolution": "bundler", + "useDefineForClassFields": true, + "allowImportingTsExtensions": true + }, + "include": [ + "src" + ] +} From 9fb3353c6d466911ceb8a3b7468747fd29124ad3 Mon Sep 17 00:00:00 2001 From: Thomas Bouffard <27200110+tbouffard@users.noreply.github.com> Date: Mon, 19 Aug 2024 00:42:03 +0200 Subject: [PATCH 2/7] add rsbuild favicon --- projects/rsbuild-ts/assets/favicon-128x128.png | Bin 0 -> 7122 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 projects/rsbuild-ts/assets/favicon-128x128.png diff --git a/projects/rsbuild-ts/assets/favicon-128x128.png b/projects/rsbuild-ts/assets/favicon-128x128.png new file mode 100644 index 0000000000000000000000000000000000000000..2733cb2c88750167c8ccacf7c1b334cd3b4a4503 GIT binary patch literal 7122 zcmV;@8!hCCP)C0008|P)t-s0000{ zKs;4KK~+LPR6##aJ3UoGK~g|IR6##hLqS$UKvY6MS3^NnLO@nSK~+LQRzpEmLO@nS zK~_USR6##hLqS$UK~_USRYE{kLqS$TK~_USRzpEnLP1tTLG{0(|NsA1LqWHCr3qFqWzT1Z7& zMMF?MJGQj6^oC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m=lT`Z8hs#liP znv=(7Um}wZ1~Xy7diV3hN&L^ChY|}}EWuD>5fZ^#P4;@_IvzRKwq-biclY;qF-8o> zc|7?-m6|}2Cp*(#xm1B5b|iuji8LB3l6CUM#0mThR!2DW#zL>JB?Kbn)@rJEn*|Z@ zaRxMjp3(GN?a?v}oPr{CLDj`7suJc|Ozdf3r+{#D@?_!3#9#e?*P0TeX}SUekj5Y4 zQn53+6hcx=(iy&I*HC{zD6xL}Ra`q&P0RbDt;SU6(V#@mV!*P#e`n-N* zb%;^tp#kxdogmD3B+k%&c5wNcAR$x#VSPBFW9V6gT!b*h1tNj3>fBEYY$0b<6v(Qd z)&zf0-#RE3{0id2QKvIwYw@dbZ)pVsCF_TiK~6 zXA$CjkO1i>Sb(28V0wC+1&Y5&2Zq~9d4`Ne5Gg9Ko?4(T+cHsr6Otll7#bY8qPd0; z$Oa~pcL7vza|f9XJ$-r|Bk;MflV;%qet>M(_ID<%)6JBo0pNtMA^JRs`FMe028LTE z8ucJI(iy03%Ao5p_1zr0+zm0L*MMb?C0|U;)?~Vz?!j Date: Mon, 19 Aug 2024 00:57:57 +0200 Subject: [PATCH 3/7] give a try to chunk "split-by-module" --- projects/rsbuild-ts/rsbuild.config.ts | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/projects/rsbuild-ts/rsbuild.config.ts b/projects/rsbuild-ts/rsbuild.config.ts index 03f85e1..8042ead 100644 --- a/projects/rsbuild-ts/rsbuild.config.ts +++ b/projects/rsbuild-ts/rsbuild.config.ts @@ -1,3 +1,15 @@ import { defineConfig } from '@rsbuild/core'; -export default defineConfig({}); +export default defineConfig({ + // enforce a chunk per module to better track the size of the maxGraph chunk. + // We don't need it here because we have a single dependency, so the chunk automatically generated only includes the maxGraph module. + // In addition, this also split chunks for the CSS files, which is not what we want (at least for now). + // https://rsbuild.dev/guide/optimization/split-chunk#split-by-module + // performance: { + // chunkSplit: { + // strategy: 'split-by-module', + // }, + // }, +}); + + From 0969f92401a6248803e7a2781a31f38d327b54b0 Mon Sep 17 00:00:00 2001 From: Thomas Bouffard <27200110+tbouffard@users.noreply.github.com> Date: Mon, 19 Aug 2024 01:05:26 +0200 Subject: [PATCH 4/7] configure favicon --- projects/rsbuild-ts/rsbuild.config.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/projects/rsbuild-ts/rsbuild.config.ts b/projects/rsbuild-ts/rsbuild.config.ts index 8042ead..79ea98f 100644 --- a/projects/rsbuild-ts/rsbuild.config.ts +++ b/projects/rsbuild-ts/rsbuild.config.ts @@ -1,6 +1,9 @@ import { defineConfig } from '@rsbuild/core'; export default defineConfig({ + html: { + favicon: './assets/favicon-128x128.png', + }, // enforce a chunk per module to better track the size of the maxGraph chunk. // We don't need it here because we have a single dependency, so the chunk automatically generated only includes the maxGraph module. // In addition, this also split chunks for the CSS files, which is not what we want (at least for now). From a59a104a8d6a1c1ae6a47ffe92e5bdbff58c1a11 Mon Sep 17 00:00:00 2001 From: Thomas Bouffard <27200110+tbouffard@users.noreply.github.com> Date: Mon, 19 Aug 2024 01:06:58 +0200 Subject: [PATCH 5/7] configure page title --- projects/rsbuild-ts/rsbuild.config.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/projects/rsbuild-ts/rsbuild.config.ts b/projects/rsbuild-ts/rsbuild.config.ts index 79ea98f..8ab8318 100644 --- a/projects/rsbuild-ts/rsbuild.config.ts +++ b/projects/rsbuild-ts/rsbuild.config.ts @@ -3,6 +3,7 @@ import { defineConfig } from '@rsbuild/core'; export default defineConfig({ html: { favicon: './assets/favicon-128x128.png', + title: 'maxGraph Rsbuild TypeScript example', }, // enforce a chunk per module to better track the size of the maxGraph chunk. // We don't need it here because we have a single dependency, so the chunk automatically generated only includes the maxGraph module. From 01bb7d6ca9ec8a67e8729826188a2ec7fbe380b8 Mon Sep 17 00:00:00 2001 From: Thomas Bouffard <27200110+tbouffard@users.noreply.github.com> Date: Mon, 19 Aug 2024 01:15:42 +0200 Subject: [PATCH 6/7] correctly load assets when app not deployed in the root context of the server --- projects/rsbuild-ts/rsbuild.config.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/projects/rsbuild-ts/rsbuild.config.ts b/projects/rsbuild-ts/rsbuild.config.ts index 8ab8318..31d62dc 100644 --- a/projects/rsbuild-ts/rsbuild.config.ts +++ b/projects/rsbuild-ts/rsbuild.config.ts @@ -5,6 +5,10 @@ export default defineConfig({ favicon: './assets/favicon-128x128.png', title: 'maxGraph Rsbuild TypeScript example', }, + output: { + // ensure assets are correctly loaded when the application is not at the root of the server, for examples when it is deployed on GitHub pages. + assetPrefix: 'auto', + } // enforce a chunk per module to better track the size of the maxGraph chunk. // We don't need it here because we have a single dependency, so the chunk automatically generated only includes the maxGraph module. // In addition, this also split chunks for the CSS files, which is not what we want (at least for now). From 80fa459f873959d7d70af58b663ecce6192801df Mon Sep 17 00:00:00 2001 From: Thomas Bouffard <27200110+tbouffard@users.noreply.github.com> Date: Mon, 19 Aug 2024 01:24:19 +0200 Subject: [PATCH 7/7] move favicon --- projects/rsbuild-ts/rsbuild.config.ts | 2 +- .../rsbuild-ts/{ => src}/assets/favicon-128x128.png | Bin 2 files changed, 1 insertion(+), 1 deletion(-) rename projects/rsbuild-ts/{ => src}/assets/favicon-128x128.png (100%) diff --git a/projects/rsbuild-ts/rsbuild.config.ts b/projects/rsbuild-ts/rsbuild.config.ts index 31d62dc..1020c09 100644 --- a/projects/rsbuild-ts/rsbuild.config.ts +++ b/projects/rsbuild-ts/rsbuild.config.ts @@ -2,7 +2,7 @@ import { defineConfig } from '@rsbuild/core'; export default defineConfig({ html: { - favicon: './assets/favicon-128x128.png', + favicon: './src/assets/favicon-128x128.png', title: 'maxGraph Rsbuild TypeScript example', }, output: { diff --git a/projects/rsbuild-ts/assets/favicon-128x128.png b/projects/rsbuild-ts/src/assets/favicon-128x128.png similarity index 100% rename from projects/rsbuild-ts/assets/favicon-128x128.png rename to projects/rsbuild-ts/src/assets/favicon-128x128.png