File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -3,17 +3,18 @@ const { pathToFileURL } = require('url');
33const RSCWebpackLoader = async function Loader ( source , sourceMap ) {
44 // Mark loader as async since we're doing async operations
55 const callback = this . async ( ) ;
6-
6+
77 try {
88 // Convert file path to URL format
99 const fileUrl = pathToFileURL ( this . resourcePath ) . href ;
1010
11+ // eslint-disable-next-line import/no-unresolved
1112 const { load } = await import ( 'react-server-dom-webpack/node-loader' ) ;
1213 const result = await load ( fileUrl , null , async ( ) => ( {
1314 format : 'module' ,
1415 source,
1516 } ) ) ;
16-
17+
1718 callback ( null , result . source , sourceMap ) ;
1819 } catch ( error ) {
1920 callback ( error ) ;
Original file line number Diff line number Diff line change 1111 "incremental" : true ,
1212 "target" : " es5"
1313 },
14- "include" : [" node_package/src/**/*" ],
14+ "include" : [
15+ " node_package/src/**/*" ,
16+ " node_package/types/**/*"
17+ ],
1518 "exclude" : [" node_package/src/RSCWebpackLoader.js" ]
1619}
You can’t perform that action at this time.
0 commit comments