Skip to content

🎥 Make videos programmatically with React

default props can be empty object

Jonny Burgerc59d6b63068a
diff --git a/packages/bundler/src/renderEntry.tsx b/packages/bundler/src/renderEntry.tsx
index 0177eb1400..431d94f8f8 100644
--- a/packages/bundler/src/renderEntry.tsx
+++ b/packages/bundler/src/renderEntry.tsx
@@ -98,7 +98,7 @@ const GetVideo = () => {
render(
<Internals.RemotionRoot>
- <Root {...inputProps} />
+ <Root />
<GetVideo />
</Internals.RemotionRoot>,
document.getElementById('container')
diff --git a/packages/bundler/src/webpack-config.ts b/packages/bundler/src/webpack-config.ts
index d5b3badbb7..6050e056d8 100644
--- a/packages/bundler/src/webpack-config.ts
+++ b/packages/bundler/src/webpack-config.ts
@@ -37,7 +37,7 @@ export const webpackConfig = ({
webpackOverride?: WebpackOverrideFn;
onProgressUpdate?: (f: number) => void;
enableCaching?: boolean;
- inputProps?: object | null;
+ inputProps?: object;
}): WebpackConfiguration => {
return webpackOverride({
optimization: {
@@ -54,7 +54,7 @@ export const webpackConfig = ({
cache: enableCaching
? {
type: 'filesystem',
- name: getWebpackCacheName(environment, inputProps ?? null),
+ name: getWebpackCacheName(environment, inputProps ?? {}),
}
: false,
devtool: 'cheap-module-source-map',
@@ -76,7 +76,7 @@ export const webpackConfig = ({
new ReactRefreshPlugin(),
new webpack.HotModuleReplacementPlugin(),
new webpack.DefinePlugin({
- 'process.env.INPUT_PROPS': JSON.stringify(inputProps ?? null),
+ 'process.env.INPUT_PROPS': JSON.stringify(inputProps ?? {}),
}),
]
: [