Skip to content

🎥 Make videos programmatically with React

fixed lint and removed console statement

hunxjunedoffbf8fc39452
diff --git a/packages/cli/src/config/override-webpack.ts b/packages/cli/src/config/override-webpack.ts
index 8aa35bc284..35e884f90a 100644
--- a/packages/cli/src/config/override-webpack.ts
+++ b/packages/cli/src/config/override-webpack.ts
@@ -12,15 +12,15 @@ export const getWebpackOverrideFn = () => {
return overrideFn;
};
-//to warn the user if overrideWebpackConfig is invoked more than once
+// to warn the user if overrideWebpackConfig is invoked more than once
let invocations = 0;
-let warned = false
export const overrideWebpackConfig = (fn: WebpackOverrideFn) => {
- if(invocations > 0 && !warned){
- console.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')
- warned = true
+ 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++
overrideFn = fn;
};