🎥 Make videos programmatically with React
Enable incremental Rspack chunk graph builds
Jonny Burgera5478dfd3ee6
diff --git a/packages/bundler/src/rspack-config.ts b/packages/bundler/src/rspack-config.tsindex 15fc1fdd37..70ae413daf 100644--- a/packages/bundler/src/rspack-config.ts+++ b/packages/bundler/src/rspack-config.ts@@ -79,8 +79,15 @@ export const rspackConfig = async ({},};+ const sharedBaseConfig = getBaseConfig(environment, poll);const baseConfig = {- ...getBaseConfig(environment, poll),+ ...sharedBaseConfig,+ experiments: {+ ...sharedBaseConfig.experiments,+ ...(environment === 'development'+ ? {incremental: {buildChunkGraph: true}}+ : {}),+ },// Remove once https://github.com/huggingface/transformers.js/issues/1759 is resolved.ignoreWarnings: [{diff --git a/packages/bundler/src/test/override-order.test.ts b/packages/bundler/src/test/override-order.test.tsindex 988b95af5b..fb897ba219 100644--- a/packages/bundler/src/test/override-order.test.ts+++ b/packages/bundler/src/test/override-order.test.ts@@ -59,6 +59,17 @@ test('applies the shared override before the Rspack override', async () => {expect(config.name).toBe('shared-rspack-rspack');});+test('enables incremental chunk graphs for Rspack development builds', async () => {+ const [, config] = await rspackConfig({+ ...baseOptions,+ environment: 'development',+ bundlerOverride: (configuration) => configuration,+ rspackOverride: (configuration) => configuration,+ });++ expect(config.experiments?.incremental).toEqual({buildChunkGraph: true});+});+test('includes React Scan only in an explicitly enabled development bundle', async () => {const previousEndpoint = process.env.REMOTION_REACT_SCAN_ENDPOINT;const previousEntryPoint = process.env.REMOTION_REACT_SCAN_ENTRY_POINT;