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 1313 "incremental" : true ,
1414 "target" : " es2020"
1515 },
16- "include" : [" node_package/src/**/*" ],
16+ "include" : [
17+ " node_package/src/**/*" ,
18+ " node_package/types/**/*"
19+ ],
1720 "exclude" : [" node_package/src/RSCWebpackLoader.js" ]
1821}
You can’t perform that action at this time.
0 commit comments