Skip to content

🎥 Make videos programmatically with React

fixed formatting

hunxjunedo4b4d495b8992
diff --git a/packages/cli/src/config/override-webpack.ts b/packages/cli/src/config/override-webpack.ts
index 35e884f90a..924ebdbf97 100644
--- a/packages/cli/src/config/override-webpack.ts
+++ b/packages/cli/src/config/override-webpack.ts
@@ -4,7 +4,6 @@ export type WebpackOverrideFn = (
currentConfiguration: WebpackConfiguration,
) => WebpackConfiguration | Promise<WebpackConfiguration>;
-
export const defaultOverrideFunction: WebpackOverrideFn = (config) => config;
let overrideFn: WebpackOverrideFn = defaultOverrideFunction;
@@ -16,11 +15,12 @@ export const getWebpackOverrideFn = () => {
let invocations = 0;
export const overrideWebpackConfig = (fn: WebpackOverrideFn) => {
- if(invocations > 0){
- throw new Error('You specified the overrideWebpackConfig() multiple times which is incorrect, in such a case, only the function passed in the latest override will be considered. If you want to call more than one functions, pass a single function and then call other functions from inside. Read More: https://www.remotion.dev/docs/config#overridewebpackconfig https://github.com/remotion-dev/remotion/issues/4063 \n')
-
+ if (invocations > 0) {
+ throw new Error(
+ 'You specified the overrideWebpackConfig() multiple times which is incorrect, in such a case, only the function passed in the latest override will be considered. If you want to call more than one functions, pass a single function and then call other functions from inside. Read More: https://www.remotion.dev/docs/config#overridewebpackconfig https://github.com/remotion-dev/remotion/issues/4063 \n',
+ );
}
-
- invocations++
+
+ invocations++;
overrideFn = fn;
};