Skip to content

🎥 Make videos programmatically with React

Suppress __dirname warning in rspack config

Jonny Burger55a50f25f2f0
diff --git a/packages/bundler/src/rspack-config.ts b/packages/bundler/src/rspack-config.ts
index 2c66a29736..a1133a2b0f 100644
--- a/packages/bundler/src/rspack-config.ts
+++ b/packages/bundler/src/rspack-config.ts
@@ -94,11 +94,11 @@ export const rspackConfig = async ({
// but the TypeScript types differ. Cast through `any` for the override.
const conf = (await webpackOverride({
...getBaseConfig(environment, poll),
- ignoreWarnings: [
- /Circular dependency between chunks with runtime/,
- /Critical dependency: the request of a dependency is an expression/,
- /"__dirname" is used and has been mocked/,
- ],
+ ignoreWarnings: [/"__dirname" is used and has been mocked/],
+ node: {
+ // Suppress the warning in `source-map`
+ __dirname: 'mock',
+ },
entry: [
require.resolve('./setup-environment'),
userDefinedComponent,