Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions craco.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/**
* CRACO config — the only customization is suppressing a single benign webpack
* warning from a transitive dependency so the production build doesn't fail.
*
* A dependency in the tree (Sentry/OpenTelemetry-style instrumentation pulled in
* via require-in-the-middle) uses a dynamic `require(expression)`, which webpack
* reports as "Critical dependency: the request of a dependency is an expression."
* It's harmless for the browser bundle, but Create React App escalates any build
* warning to a fatal error when CI=true (as on Vercel). We ignore just this one
* message and keep warning-as-error on for everything else (our own code).
*/
module.exports = {
webpack: {
configure: (webpackConfig) => {
webpackConfig.ignoreWarnings = [
...(webpackConfig.ignoreWarnings || []),
/Critical dependency: the request of a dependency is an expression/,
];
return webpackConfig;
},
},
};
Loading