File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed
packages/dts-plugin/src/core/lib Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ ' @module-federation/dts-plugin ' : patch
3+ ---
4+
5+ use ` cwd ` to create Module Federation tsconfig
Original file line number Diff line number Diff line change @@ -62,13 +62,14 @@ function writeTempTsConfig(
6262 tsConfig : TsConfigJson ,
6363 context : string ,
6464 name : string ,
65+ cwd ?: string ,
6566) {
6667 const createHash = ( contents : string ) => {
6768 return crypto . createHash ( 'md5' ) . update ( contents ) . digest ( 'hex' ) ;
6869 } ;
6970 const hash = createHash ( `${ JSON . stringify ( tsConfig ) } ${ name } ${ Date . now ( ) } ` ) ;
7071 const tempTsConfigJsonPath = resolve (
71- context ,
72+ cwd ?? context ,
7273 'node_modules' ,
7374 TEMP_DIR ,
7475 `tsconfig.${ hash } .json` ,
@@ -170,6 +171,9 @@ export const compileTs = async (
170171 tsConfig ,
171172 remoteOptions . context ,
172173 remoteOptions . moduleFederationConfig . name || 'mf' ,
174+ typeof remoteOptions . moduleFederationConfig . dts !== 'boolean'
175+ ? ( remoteOptions . moduleFederationConfig . dts ?. cwd ?? undefined )
176+ : undefined ,
173177 ) ;
174178 try {
175179 const mfTypePath = retrieveMfTypesPath ( tsConfig , remoteOptions ) ;
You can’t perform that action at this time.
0 commit comments