Skip to content

Commit bdcd709

Browse files
committed
Make the Blueprints editor component optional for the offline mode
1 parent 9593220 commit bdcd709

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

packages/playground/website/vite.config.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,8 +210,11 @@ export default defineConfig(({ command, mode }) => {
210210
// Split CodeMirror and Lezer packages into separate chunks
211211
// that will be placed in assets/optional/ directory
212212

213-
// Check for specific language extensions FIRST (before general @codemirror check)
214-
// These are lazy-loaded in code-editor.tsx
213+
// Check for specific language extensions FIRST, before the general @codemirror.
214+
// We want to package each of them separately so they can be downloaded on demand
215+
// and not all together.
216+
217+
// These are lazy-loaded in code-editor.tsx:
215218
if (id.includes('node_modules/@codemirror/lang-css')) {
216219
return 'optional/lang-css';
217220
}
@@ -248,6 +251,11 @@ export default defineConfig(({ command, mode }) => {
248251
if (id.includes('node_modules/@lezer/')) {
249252
return 'optional/vendor-lezer';
250253
}
254+
255+
// Optional, lazy loaded Blueprint Editor package
256+
if (id.includes('blueprint-editor')) {
257+
return 'optional/blueprint-editor';
258+
}
251259
},
252260
},
253261
external: [],

0 commit comments

Comments
 (0)