File tree Expand file tree Collapse file tree 4 files changed +14
-9
lines changed Expand file tree Collapse file tree 4 files changed +14
-9
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " @angular-architects/native-federation" ,
3
- "version" : " 17.0.6 " ,
3
+ "version" : " 17.0.7 " ,
4
4
"main" : " src/index.js" ,
5
5
"generators" : " ./collection.json" ,
6
6
"builders" : " ./builders.json" ,
Original file line number Diff line number Diff line change @@ -39,6 +39,7 @@ import {
39
39
NgCliAssetResult ,
40
40
} from '../../utils/mem-resuts' ;
41
41
import { JsonObject } from '@angular-devkit/core' ;
42
+ import { createSharedMappingsPlugin } from '../../utils/shared-mappings-plugin' ;
42
43
43
44
export async function * runBuilder (
44
45
nfOptions : NfBuilderSchema ,
@@ -82,6 +83,7 @@ export async function* runBuilder(
82
83
83
84
// options.externalDependencies = externals.filter((e) => e !== 'tslib');
84
85
const plugins = [
86
+ createSharedMappingsPlugin ( config . sharedMappings ) ,
85
87
{
86
88
name : 'externals' ,
87
89
setup ( build ) {
Original file line number Diff line number Diff line change @@ -8,17 +8,20 @@ export function createSharedMappingsPlugin(mappedPaths: MappedPath[]): Plugin {
8
8
setup ( build : PluginBuild ) {
9
9
build . onResolve ( { filter : / ^ [ . ] / } , async ( args ) => {
10
10
let mappedPath : MappedPath | null = null ;
11
- if (
12
- args . path . includes ( 'playground-lib' ) &&
13
- args . kind === 'import-statement'
14
- ) {
11
+ let isSelf = false ;
12
+
13
+ if ( args . kind === 'import-statement' ) {
15
14
const importPath = path . join ( args . resolveDir , args . path ) ;
16
15
mappedPath = mappedPaths . find ( ( p ) =>
17
16
importPath . startsWith ( path . dirname ( p . path ) )
18
17
) ;
19
18
}
20
19
21
20
if ( mappedPath ) {
21
+ isSelf = args . importer . startsWith ( path . dirname ( mappedPath . path ) ) ;
22
+ }
23
+
24
+ if ( mappedPath && ! isSelf ) {
22
25
return {
23
26
path : mappedPath . key ,
24
27
external : true ,
Original file line number Diff line number Diff line change 1
- call npm unpublish @ softarc/native-federation@ 2.0.5 --registry http://localhost:4873
2
- call npm unpublish @ softarc/native-federation-runtime@ 2.0.5 --registry http://localhost:4873
3
- call npm unpublish @ softarc/native-federation-esbuild@ 2.0.5 --registry http://localhost:4873
4
- call npm unpublish @ angular-architects/native-federation@ 17.0.3 --registry http://localhost:4873
1
+ call npm unpublish @ softarc/native-federation@ 2.0.7 --registry http://localhost:4873
2
+ call npm unpublish @ softarc/native-federation-runtime@ 2.0.7 --registry http://localhost:4873
3
+ call npm unpublish @ softarc/native-federation-esbuild@ 2.0.7 --registry http://localhost:4873
4
+ call npm unpublish @ angular-architects/native-federation@ 17.0.7 --registry http://localhost:4873
5
5
6
6
call npx nx build native-federation
7
7
call npx nx build native-federation-core
You can’t perform that action at this time.
0 commit comments