🎥 Make videos programmatically with React
updat webpack
Jonny Burger6a688eb492dc
diff --git a/TESTING.md b/TESTING.mdindex 2f0258fc7d..34ac14aa3e 100644--- a/TESTING.md+++ b/TESTING.md@@ -3,10 +3,10 @@ For general information concerning contribution, please consult [CONTRIBUTION.md### Core Coverage----++++### Running testsdiff --git a/packages/example/remotion.config.ts b/packages/example/remotion.config.tsindex 6ba986450b..de8c2ba154 100644--- a/packages/example/remotion.config.ts+++ b/packages/example/remotion.config.ts@@ -1,6 +1,56 @@import os from 'os';-import {Config} from 'remotion';-import {webpackOverride} from './src/webpack-override';+import path from 'path';+import {Config, WebpackOverrideFn} from 'remotion';++type Bundler = 'webpack' | 'esbuild';++const WEBPACK_OR_ESBUILD = 'esbuild' as Bundler;++export const webpackOverride: WebpackOverrideFn = (currentConfiguration) => {+ const replaced = (() => {+ if (WEBPACK_OR_ESBUILD === 'webpack') {+ const {replaceLoadersWithBabel} = require(path.join(+ __dirname,+ '..',+ '..',+ 'example',+ 'node_modules',+ '@remotion/babel-loader'+ ));+ return replaceLoadersWithBabel(currentConfiguration);+ }+ return currentConfiguration;+ })();+ return {+ ...replaced,+ module: {+ ...replaced.module,+ rules: [+ ...(replaced.module?.rules ?? []),+ {+ test: /\.mdx?$/,+ use: [+ {+ loader: 'babel-loader',+ options: {+ presets: [+ '@babel/preset-env',+ [+ '@babel/preset-react',+ {+ runtime: 'automatic',+ },+ ],+ ],+ },+ },+ 'mdx-loader',+ ],+ },+ ],+ },+ };+};Config.Rendering.setConcurrency(os.cpus().length);Config.Output.setOverwriteOutput(true);