Commit 3e89438 1 parent b4a376f commit 3e89438 Copy full SHA for 3e89438
File tree 1 file changed +16
-0
lines changed
1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ import {
19
19
getPackageManager ,
20
20
getProjectJsonFile ,
21
21
relocateImportsAndRequires ,
22
+ injectFilesInMem ,
22
23
} from '#utils' ;
23
24
import { Messages } from '#constants' ;
24
25
import { vulcan } from '#env' ;
@@ -332,6 +333,21 @@ class Dispatcher {
332
333
config . localCustom = this . custom ;
333
334
334
335
const builderSelected = this . builder || config . builder ;
336
+
337
+ const { injectionDirs, removePathPrefix } = this . memoryFS ;
338
+ if ( injectionDirs && injectionDirs . length > 0 ) {
339
+ const content = await injectFilesInMem ( injectionDirs ) ;
340
+
341
+ const prefix =
342
+ removePathPrefix &&
343
+ typeof removePathPrefix === 'string' &&
344
+ removePathPrefix !== ''
345
+ ? `'${ removePathPrefix } '`
346
+ : `''` ;
347
+
348
+ config . contentToInject = `globalThis.FS_PATH_PREFIX_TO_REMOVE = ${ prefix } ;\n${ content } ` ;
349
+ }
350
+
335
351
let builder ;
336
352
switch ( builderSelected ) {
337
353
case 'webpack' :
You can’t perform that action at this time.
0 commit comments