@@ -7,6 +7,25 @@ module.exports = {
77 path . resolve ( __dirname , 'node_modules' ) ,
88 'node_modules' ,
99 ] ;
10+ config . resolve . alias = {
11+ ...config . resolve . alias ,
12+ // @notabene /pii-sdk uses axios.interceptors at module load time which
13+ // fails in the browser due to ESM/CJS interop issues. The SDK is only
14+ // used server-side (Fireblocks), so we stub it out in the browser bundle.
15+ '@notabene/pii-sdk' : false ,
16+ } ;
17+ // @svgr /webpack@5.x generates ESM code with `import * as React from 'react'`
18+ // using the classic JSX transform. Webpack 5 strict harmony analysis treats CJS
19+ // modules (React) as having no static exports, causing build errors.
20+ // Downgrade these from errors to warnings since the runtime behavior is correct.
21+ config . module = config . module || { } ;
22+ config . module . parser = {
23+ ...( config . module . parser || { } ) ,
24+ javascript : {
25+ ...( ( config . module . parser || { } ) . javascript || { } ) ,
26+ exportsPresence : 'warn' ,
27+ } ,
28+ } ;
1029 const fallback = config . resolve . fallback || { } ;
1130 Object . assign ( fallback , {
1231 crypto : require . resolve ( 'crypto-browserify' ) ,
0 commit comments