Skip to content

🎥 Make videos programmatically with React

better experience when using old config file import

Jonny Burgera7ee1dbd6f66
diff --git a/packages/core/src/index.ts b/packages/core/src/index.ts
index fc8931fc69..2b4a453e57 100644
--- a/packages/core/src/index.ts
+++ b/packages/core/src/index.ts
@@ -120,20 +120,33 @@ export const Experimental = {
const proxyObj = {};
export const Config = new Proxy(proxyObj, {
- get() {
- console.warn(
- '⚠️ The CLI configuration has been extracted from Remotion Core.'
- );
- console.warn('Update the import from the config file:');
- console.warn();
- console.warn('- Delete:');
- console.warn('import {Config} from "remotion";');
- console.warn('+ Replace:');
- console.warn('import {Config} from "@remotion/cli/config";');
- console.warn();
- console.warn(
- 'For more information, see https://v4.remotion.dev/docs/4-0-migration.'
- );
- process.exit(1);
+ get(_, prop): unknown {
+ if (
+ prop === 'Bundling' ||
+ prop === 'Rendering' ||
+ prop === 'Log' ||
+ prop === 'Puppeteer' ||
+ prop === 'Output'
+ ) {
+ return Config;
+ }
+
+ return () => {
+ console.warn(
+ '⚠️ The CLI configuration has been extracted from Remotion Core.'
+ );
+ console.warn('Update the import from the config file:');
+ console.warn();
+ console.warn('- Delete:');
+ console.warn('import {Config} from "remotion";');
+ console.warn('+ Replace:');
+ console.warn('import {Config} from "@remotion/cli/config";');
+ console.warn();
+ console.warn(
+ 'For more information, see https://v4.remotion.dev/docs/4-0-migration.'
+ );
+
+ process.exit(1);
+ };
},
});