File tree Expand file tree Collapse file tree 1 file changed +9
-13
lines changed Expand file tree Collapse file tree 1 file changed +9
-13
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,14 @@ import { defineConfig } from "@rspack/cli";
22import { rspack , type RspackOptions } from "@rspack/core" ;
33import { RsdoctorRspackPlugin } from "@rsdoctor/rspack-plugin" ;
44import { TsCheckerRspackPlugin } from "ts-checker-rspack-plugin" ;
5- // import nodeExternals from "webpack-node-externals";
5+
6+ function nodeExternals ( { context, request } , callback ) {
7+ if ( ! / ^ ( \. | \/ ) / . test ( request ) ) {
8+ return callback ( null , request ) ;
9+ }
10+
11+ callback ( ) ;
12+ }
613
714import { readFile } from "node:fs/promises" ;
815import { execSync } from "node:child_process" ;
@@ -272,18 +279,7 @@ const bootstrapConfig = createGenericConfig({
272279 outputModule : true ,
273280 } ,
274281 target : "node" ,
275- externals : [
276- function ( { context, request } , callback ) {
277- console . log ( request ) ;
278- if ( ! / ^ ( \. | \/ ) / . test ( request ) ) {
279- // Externalize to a commonjs module using the request path
280- return callback ( null , request ) ;
281- }
282-
283- // Continue without externalizing the import
284- callback ( ) ;
285- } ,
286- ] ,
282+ externals : [ nodeExternals ] ,
287283} ) ;
288284
289285const controllerConfig = createGenericConfig ( {
You can’t perform that action at this time.
0 commit comments