@module-federation/native-federation-typescript 0.0.0-feat-node-support-1702930274547

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md ADDED
@@ -0,0 +1,308 @@
1
+ # [1.0.0-canary.1](https://github.com/module-federation/universe/compare/native-federation-typescript-0.2.6...native-federation-typescript-1.0.0-canary.1) (2023-11-06)
2
+
3
+ ### Bug Fixes
4
+
5
+ - **deps:** update dependency antd to v4.24.14 ([#1309](https://github.com/module-federation/universe/issues/1309)) ([d0a2314](https://github.com/module-federation/universe/commit/d0a231470e37dbad85a11df1f12695657ba3b984))
6
+ - **deps:** update dependency axios to v1.5.0 ([#1275](https://github.com/module-federation/universe/issues/1275)) ([f163df1](https://github.com/module-federation/universe/commit/f163df1073740bf4218bb35ba57cea5dc409fe43))
7
+ - **deps:** update dependency axios to v1.5.1 ([ae9a06a](https://github.com/module-federation/universe/commit/ae9a06a0cc35fad27a0b493a25370b92617c39fb))
8
+ - **deps:** update dependency core-js to v3.32.2 ([18d2746](https://github.com/module-federation/universe/commit/18d2746763f38fe295a14df3f1bcd4218fade5b8))
9
+ - **deps:** update dependency core-js to v3.33.0 ([30894ca](https://github.com/module-federation/universe/commit/30894cafbe5dea4350dc7c633548038d7ec5f8a8))
10
+ - **deps:** update dependency fast-glob to v3.3.1 ([#1197](https://github.com/module-federation/universe/issues/1197)) ([5743543](https://github.com/module-federation/universe/commit/57435430bd0912e3bf370ce08b46f610b12d00e3))
11
+ - **deps:** update dependency react-router-dom to v6.15.0 ([#1276](https://github.com/module-federation/universe/issues/1276)) ([850e2fa](https://github.com/module-federation/universe/commit/850e2fac60f49b456aef3b5df9827fc3ac5a6006))
12
+ - **deps:** update dependency react-router-dom to v6.16.0 ([0618339](https://github.com/module-federation/universe/commit/061833912f7e5748011cd60ed679a68c1b659f77))
13
+ - **deps:** update dependency typedoc to ^0.25.0 ([#1277](https://github.com/module-federation/universe/issues/1277)) ([8d6a72e](https://github.com/module-federation/universe/commit/8d6a72e18a57b69b2f63802621e8b4b479554fed))
14
+ - **deps:** update dependency typedoc to v0.25.1 ([#1304](https://github.com/module-federation/universe/issues/1304)) ([abf84fe](https://github.com/module-federation/universe/commit/abf84fefd5c20b5de7c9a74d1c49235f44d36dc6))
15
+ - **deps:** update dependency typedoc to v0.25.2 ([46c6524](https://github.com/module-federation/universe/commit/46c65247e187cee9e15625402c1570ac351bb1fe))
16
+ - **deps:** update dependency undici to v5.24.0 ([573e644](https://github.com/module-federation/universe/commit/573e644333da6d24cb4286ce08221a1aa82415e4))
17
+ - **deps:** update dependency undici to v5.25.2 ([da3e539](https://github.com/module-federation/universe/commit/da3e539a41ed23ccb5086b1dd428fbee0f8d652c))
18
+ - **deps:** update dependency undici to v5.25.4 ([1d4f91e](https://github.com/module-federation/universe/commit/1d4f91ec93da4326c8a42eef28f150d5d09738bb))
19
+ - **deps:** update dependency undici to v5.26.2 [security] ([410a8b8](https://github.com/module-federation/universe/commit/410a8b8bd1558dfb5119ae10941d2b3816a0d0e0))
20
+ - **deps:** update dependency unplugin to v1.5.0 ([936b3f8](https://github.com/module-federation/universe/commit/936b3f8d8061fd9d481d1788fb35b88588928d14))
21
+ - Fix call undefined delegate ([#1149](https://github.com/module-federation/universe/issues/1149)) ([87a5896](https://github.com/module-federation/universe/commit/87a5896221a726578c3433071755fba3465824f4)), closes [#1151](https://github.com/module-federation/universe/issues/1151)
22
+ - override semantic-release-plugin-decorators ([18675de](https://github.com/module-federation/universe/commit/18675defef65570d2b3bb6a9caa3fd039badee29))
23
+ - switch to @goestav/nx-semantic-release ([63a3350](https://github.com/module-federation/universe/commit/63a3350a6a1a12235e3c9f1e7c724d54f0476356))
24
+
25
+ ### Features
26
+
27
+ - core package for module federation ([#1093](https://github.com/module-federation/universe/issues/1093)) ([d460400](https://github.com/module-federation/universe/commit/d46040053e9b627321b5fe8e05556c5bb727c238)), closes [#851](https://github.com/module-federation/universe/issues/851) [#864](https://github.com/module-federation/universe/issues/864) [#835](https://github.com/module-federation/universe/issues/835) [#851](https://github.com/module-federation/universe/issues/851) [#864](https://github.com/module-federation/universe/issues/864) [#871](https://github.com/module-federation/universe/issues/871) [#851](https://github.com/module-federation/universe/issues/851) [#864](https://github.com/module-federation/universe/issues/864) [#872](https://github.com/module-federation/universe/issues/872) [#875](https://github.com/module-federation/universe/issues/875) [#884](https://github.com/module-federation/universe/issues/884) [#887](https://github.com/module-federation/universe/issues/887) [#893](https://github.com/module-federation/universe/issues/893) [#885](https://github.com/module-federation/universe/issues/885) [#899](https://github.com/module-federation/universe/issues/899) [#904](https://github.com/module-federation/universe/issues/904) [#932](https://github.com/module-federation/universe/issues/932) [#936](https://github.com/module-federation/universe/issues/936) [#959](https://github.com/module-federation/universe/issues/959) [#960](https://github.com/module-federation/universe/issues/960) [#969](https://github.com/module-federation/universe/issues/969) [#971](https://github.com/module-federation/universe/issues/971) [#1234](https://github.com/module-federation/universe/issues/1234) [#1235](https://github.com/module-federation/universe/issues/1235)
28
+ - Dynamic Filesystem ([#1274](https://github.com/module-federation/universe/issues/1274)) ([2bec98a](https://github.com/module-federation/universe/commit/2bec98a2472b44898a7f14ec6868a2368cfb6d82))
29
+ - fork module federation ([0ad7430](https://github.com/module-federation/universe/commit/0ad7430f6170458a47144be392133b7b2fa1ade0))
30
+ - improved async init ([ae3a450](https://github.com/module-federation/universe/commit/ae3a4503ff9de86492b13029d6334b281ddd9493))
31
+ - native self forming node federation ([#1291](https://github.com/module-federation/universe/issues/1291)) ([1dd5ed1](https://github.com/module-federation/universe/commit/1dd5ed17c981e036336925e807203e94b58c36d6))
32
+ - new actions, remove gpt integration ([370229e](https://github.com/module-federation/universe/commit/370229e02cc352fcfaeaa0f3cf1f9f2d4966d1bb))
33
+ - **node:** node federation demo/testing apps added ([27d545d](https://github.com/module-federation/universe/commit/27d545d99095da7134c392dbcd9fb135a170f6ef))
34
+ - **typedoc-parsetr:** merged main ([cf6e65a](https://github.com/module-federation/universe/commit/cf6e65a4aa895d7c2dba8fdbd8ec22ec7bd8f514))
35
+ - **typedoc-parsetr:** merged main ([2ff0d5a](https://github.com/module-federation/universe/commit/2ff0d5a075df3f241742cc7e516cd0378e8e1b3e))
36
+ - **typedoc-parsetr:** python script implementation ([0a533cb](https://github.com/module-federation/universe/commit/0a533cb60e0c3ca269ab45df740c1367be175e80))
37
+
38
+ ### BREAKING CHANGES
39
+
40
+ - automaticAsyncBoundary option has been removed
41
+
42
+ - fix: exclude specific pages from page map automatically
43
+
44
+ - refactor: conslidate codebase
45
+
46
+ - fix: improve hot reload share recovery
47
+
48
+ - refactor: remove server jsonp template
49
+
50
+ - chore: remove dead code from runtime modules
51
+
52
+ - fix: clean up jsonp getCustomJsonpCode
53
+
54
+ getting chunk loading global from compiler output options
55
+
56
+ - feat: adding cleanInitArrays runtime helper
57
+
58
+ - chore: remove share scope hoist and module hoisting system
59
+
60
+ - chore: cleanup code
61
+
62
+ - chore: remove dead code from add module runtime plugin
63
+
64
+ likely can remove whole plugin in future
65
+
66
+ - chore: remove logs from delegate modules
67
+
68
+ - chore: remove old utils
69
+
70
+ - fix: add warning on auto page stitch
71
+
72
+ - fix: remove commented out code from InvertedContainerPlugin.ts
73
+
74
+ - chore: improve logging to see if its local load or remote load
75
+
76
+ - chore: clean up old custom promises factories
77
+
78
+ - fix: remove container proxy code
79
+
80
+ - fix: remove container proxy code
81
+ - automaticAsyncBoundary option has been removed
82
+
83
+ - fix: exclude specific pages from page map automatically
84
+
85
+ - refactor: conslidate codebase
86
+
87
+ - fix: improve hot reload share recovery
88
+
89
+ - refactor: remove server jsonp template
90
+
91
+ - chore: remove dead code from runtime modules
92
+
93
+ - fix: clean up jsonp getCustomJsonpCode
94
+
95
+ getting chunk loading global from compiler output options
96
+
97
+ - feat: adding cleanInitArrays runtime helper
98
+
99
+ - chore: remove share scope hoist and module hoisting system
100
+
101
+ - chore: cleanup code
102
+
103
+ - chore: remove dead code from add module runtime plugin
104
+
105
+ likely can remove whole plugin in future
106
+
107
+ - chore: remove logs from delegate modules
108
+
109
+ - chore: remove old utils
110
+
111
+ - fix: add warning on auto page stitch
112
+
113
+ - fix: remove commented out code from InvertedContainerPlugin.ts
114
+
115
+ - chore: improve logging to see if its local load or remote load
116
+
117
+ - chore: clean up old custom promises factories
118
+
119
+ - fix: remove container proxy code
120
+
121
+ - fix: remove container proxy code
122
+
123
+ - chore: fix project.json
124
+
125
+ - debugging
126
+
127
+ - fix: resolve backmerge issues with build
128
+
129
+ - Merge branch 'kill_child_compilers' into fix_backmerge_issues
130
+
131
+ # Conflicts:
132
+
133
+ # package-lock.json
134
+
135
+ # package.json
136
+
137
+ # packages/nextjs-mf/src/plugins/NextFederationPlugin/index.ts
138
+
139
+ # packages/nextjs-mf/src/plugins/container/InvertedContainerPlugin.ts
140
+
141
+ # packages/nextjs-mf/src/plugins/container/InvertedContainerRuntimeModule.ts
142
+
143
+ - feat: enable eager sharing
144
+
145
+ - refactor: improve module hooks for eager loading and search
146
+
147
+ - refactor: cleanup custom jsonp and make es5
148
+
149
+ - refactor: cleanup inverted container code
150
+
151
+ - refactor: cleanup inverted container code
152
+ - automaticAsyncBoundary option has been removed
153
+
154
+ - fix: exclude specific pages from page map automatically
155
+
156
+ - refactor: conslidate codebase
157
+
158
+ - fix: improve hot reload share recovery
159
+
160
+ - refactor: remove server jsonp template
161
+
162
+ - chore: remove dead code from runtime modules
163
+
164
+ - fix: clean up jsonp getCustomJsonpCode
165
+
166
+ getting chunk loading global from compiler output options
167
+
168
+ - feat: adding cleanInitArrays runtime helper
169
+
170
+ - chore: remove share scope hoist and module hoisting system
171
+
172
+ - chore: cleanup code
173
+
174
+ - chore: remove dead code from add module runtime plugin
175
+
176
+ likely can remove whole plugin in future
177
+
178
+ - chore: remove logs from delegate modules
179
+
180
+ - chore: remove old utils
181
+
182
+ - fix: add warning on auto page stitch
183
+
184
+ - fix: remove commented out code from InvertedContainerPlugin.ts
185
+
186
+ - chore: improve logging to see if its local load or remote load
187
+
188
+ - chore: clean up old custom promises factories
189
+
190
+ - fix: remove container proxy code
191
+
192
+ - fix: remove container proxy code
193
+
194
+ - fix: resolve backmerge issues with build
195
+
196
+ - Merge branch 'kill_child_compilers' into fix_backmerge_issues
197
+
198
+ # Conflicts:
199
+
200
+ # package-lock.json
201
+
202
+ # package.json
203
+
204
+ # packages/nextjs-mf/src/plugins/NextFederationPlugin/index.ts
205
+
206
+ # packages/nextjs-mf/src/plugins/container/InvertedContainerPlugin.ts
207
+
208
+ # packages/nextjs-mf/src/plugins/container/InvertedContainerRuntimeModule.ts
209
+
210
+ - feat: enable eager sharing
211
+
212
+ - refactor: improve module hooks for eager loading and search
213
+
214
+ - refactor: cleanup custom jsonp and make es5
215
+
216
+ - refactor: cleanup inverted container code
217
+
218
+ - refactor: cleanup inverted container code
219
+
220
+ - ci: fix install step with npm and NX
221
+
222
+ - test: remove tests for now
223
+
224
+ - chore(utils): release version 1.7.3-beta.0
225
+
226
+ - chore(utils): release version 1.7.3
227
+
228
+ - chore(node): release version 0.14.4-beta.0
229
+
230
+ - chore(node): release version 0.14.4
231
+
232
+ - chore(nextjs-mf): release version 6.4.1-beta.4
233
+
234
+ - fix: remove debugging runtime variable
235
+
236
+ - chore(nextjs-mf): release version 6.4.1-beta.5
237
+
238
+ # Changelog
239
+
240
+ This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
241
+
242
+ ## [0.2.6](https://github.com/module-federation/nextjs-mf/compare/native-federation-typescript-0.2.5...native-federation-typescript-0.2.6) (2023-07-01)
243
+
244
+ ## [0.2.5](https://github.com/module-federation/nextjs-mf/compare/native-federation-typescript-0.2.4...native-federation-typescript-0.2.5) (2023-07-01)
245
+
246
+ ## [0.2.4](https://github.com/module-federation/nextjs-mf/compare/native-federation-typescript-0.2.3...native-federation-typescript-0.2.4) (2023-07-01)
247
+
248
+ ## [0.2.3](https://github.com/module-federation/nextjs-mf/compare/native-federation-typescript-0.2.2...native-federation-typescript-0.2.3) (2023-07-01)
249
+
250
+ ## [0.2.2](https://github.com/module-federation/nextjs-mf/compare/native-federation-typescript-0.2.1...native-federation-typescript-0.2.2) (2023-06-28)
251
+
252
+ ### Bug Fixes
253
+
254
+ - .at(-1) ([8dd0520](https://github.com/module-federation/nextjs-mf/commit/8dd0520b5464c49e89c63307c5388450e4bebbf8))
255
+
256
+ ## [0.2.1](https://github.com/module-federation/nextjs-mf/compare/native-federation-typescript-0.2.0...native-federation-typescript-0.2.1) (2023-05-13)
257
+
258
+ ### Bug Fixes
259
+
260
+ - [#857](https://github.com/module-federation/nextjs-mf/issues/857) ([#859](https://github.com/module-federation/nextjs-mf/issues/859)) ([2fb609e](https://github.com/module-federation/nextjs-mf/commit/2fb609efb9a3c8f3e6740e0159510d649c1d229d))
261
+ - downgrade next to v13.3.1 ([0032452](https://github.com/module-federation/nextjs-mf/commit/0032452980c70b211b6c04332326b7973f7c8446))
262
+ - removed lock ([82f578e](https://github.com/module-federation/nextjs-mf/commit/82f578e713734f7f6b06e09b794fab4f66af248a))
263
+
264
+ # [0.2.0](https://github.com/module-federation/nextjs-mf/compare/native-federation-typescript-0.1.1...native-federation-typescript-0.2.0) (2023-04-29)
265
+
266
+ ### Bug Fixes
267
+
268
+ - removed any from error logger type ([fb9fcc3](https://github.com/module-federation/nextjs-mf/commit/fb9fcc3a54a13be36335830f076a86557b75bb4a))
269
+ - subpath ([1548501](https://github.com/module-federation/nextjs-mf/commit/1548501bb4679c0c534c02609cb6bc5459f224a4))
270
+ - subpath ([aaad665](https://github.com/module-federation/nextjs-mf/commit/aaad665307d80b49ee19496a5b8b400df243558e))
271
+
272
+ ### Features
273
+
274
+ - release to npm with next tag to not ruine latest one ([#763](https://github.com/module-federation/nextjs-mf/issues/763)) ([f2d199b](https://github.com/module-federation/nextjs-mf/commit/f2d199b3b3fbbd428514b1ce1f139efc82f7fff0))
275
+
276
+ ## [0.1.1](https://github.com/module-federation/nextjs-mf/compare/native-federation-typescript-0.1.0...native-federation-typescript-0.1.1) (2023-04-12)
277
+
278
+ ### Bug Fixes
279
+
280
+ - native build chunks ([d6c9f8a](https://github.com/module-federation/nextjs-mf/commit/d6c9f8a957ed00a8d92332ccc38ed9780f01d54e))
281
+
282
+ ### Reverts
283
+
284
+ - Revert "chore(native-federation-typescript): release version 0.1.1" ([91786df](https://github.com/module-federation/nextjs-mf/commit/91786df726e5c078ed78e745b6b105e11bd2e39b))
285
+ - Revert "chore(native-federation-typescript): release version 0.1.1" ([097f188](https://github.com/module-federation/nextjs-mf/commit/097f188458835457a2713d98bf3eaf291d5ad102))
286
+
287
+ # 0.1.0 (2023-04-05)
288
+
289
+ ### Bug Fixes
290
+
291
+ - build ([d0b2f72](https://github.com/module-federation/nextjs-mf/commit/d0b2f72f4fc3647825412be1574311c3152cf167))
292
+ - build step ([a217170](https://github.com/module-federation/nextjs-mf/commit/a21717096cbc09bff20d3aeebfea2f3533afb0d7))
293
+ - compiler instance ([e5c249d](https://github.com/module-federation/nextjs-mf/commit/e5c249d41d68339886268337654ff47b31b06a3a))
294
+ - deps ([a378441](https://github.com/module-federation/nextjs-mf/commit/a37844194a3f189cc5863bbdd4776259bce69fa4))
295
+ - dirtree tests ([5cb49fd](https://github.com/module-federation/nextjs-mf/commit/5cb49fd1c6520311a7d2e7d2b37a93389a500715))
296
+ - eslintrc ([0f69dee](https://github.com/module-federation/nextjs-mf/commit/0f69dee253c2c608b2367d545c7d4a57ad0c2ca5))
297
+ - format ([25fb765](https://github.com/module-federation/nextjs-mf/commit/25fb7659481287a791e9de4fe839e980dbf06968))
298
+ - readme ([eaca0b3](https://github.com/module-federation/nextjs-mf/commit/eaca0b311d3b8d9e73309cb92d9a9488f9fc23c0))
299
+ - readme ([fc0e5dc](https://github.com/module-federation/nextjs-mf/commit/fc0e5dc26e617664224e1c10548b151a44f8dff9))
300
+ - README.md ([9159171](https://github.com/module-federation/nextjs-mf/commit/91591712e9a103fff351f0a168c149470c0d69ad))
301
+ - remove changelog ([724918e](https://github.com/module-federation/nextjs-mf/commit/724918ebf888297689b6ed700bd14ec01fd1ef35))
302
+ - ts build ([9ed3a52](https://github.com/module-federation/nextjs-mf/commit/9ed3a527d0ba903b6cfa6023a7ad5da63781970c))
303
+
304
+ ### Features
305
+
306
+ - federated tests plugin ([063ab33](https://github.com/module-federation/nextjs-mf/commit/063ab336c4830aff4f5bd3b9894df60b4651a9be))
307
+ - native-federation-typescript plugin ([#692](https://github.com/module-federation/nextjs-mf/issues/692)) ([b41c5aa](https://github.com/module-federation/nextjs-mf/commit/b41c5aacfeda0fada5b426086658235edfd86cdd))
308
+ - test command ([3ade629](https://github.com/module-federation/nextjs-mf/commit/3ade629488f4ea1549314b82b41caef9a046da9f))
package/README.md ADDED
@@ -0,0 +1,191 @@
1
+ # native-federation-typescript
2
+
3
+ Bundler agnostic plugins to share federated types.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ npm i -D @module-federation/native-federation-typescript
9
+ ```
10
+
11
+ This module provides two plugins:
12
+
13
+ ### NativeFederationTypeScriptRemote
14
+
15
+ This plugin is used to build the federated types.
16
+
17
+ #### Configuration
18
+
19
+ ```typescript
20
+ {
21
+ moduleFederationConfig: any; // the configuration same configuration provided to the module federation plugin, it is MANDATORY
22
+ tsConfigPath?: string; // path where the tsconfig file is located, default is ''./tsconfig.json'
23
+ typesFolder?: string; // folder where all the files will be stored, default is '@mf-types',
24
+ compiledTypesFolder?: string; // folder where the federated modules types will be stored, default is 'compiled-types'
25
+ deleteTypesFolder?: boolean; // indicate if the types folder will be deleted when the job completes, default is 'true'
26
+ additionalFilesToCompile?: string[] // The path of each additional file which should be emitted
27
+ compilerInstance?: 'tsc' | 'vue-tsc' // The compiler to use to emit files, default is 'tsc'
28
+ }
29
+ ```
30
+
31
+ #### Additional configuration
32
+
33
+ Note that, for Webpack, the plugin automatically inject the `devServer.static.directory` configuration.
34
+ For the other bundlers, you should configure it by yourself.
35
+
36
+ ### NativeFederationTypeScriptHost
37
+
38
+ This plugin is used to download the federated types.
39
+
40
+ ### Configuration
41
+
42
+ ```typescript
43
+ {
44
+ moduleFederationConfig: any; // the configuration same configuration provided to the module federation plugin, it is MANDATORY
45
+ typesFolder?: string; // folder where all the files will be stored, default is '@mf-types',
46
+ deleteTypesFolder?: boolean; // indicate if the types folder will be deleted before the job starts, default is 'true'
47
+ }
48
+ ```
49
+
50
+ ## Bundler configuration
51
+
52
+ <details>
53
+ <summary>Vite</summary><br>
54
+
55
+ ```ts
56
+ // vite.config.ts
57
+ import { NativeFederationTypeScriptHost, NativeFederationTypeScriptRemote } from '@module-federation/native-federation-typescript/vite';
58
+
59
+ export default defineConfig({
60
+ plugins: [
61
+ NativeFederationTypeScriptRemote({
62
+ /* options */
63
+ }),
64
+ NativeFederationTypeScriptHost({
65
+ /* options */
66
+ }),
67
+ ],
68
+ /* ... */
69
+ server: {
70
+ // This is needed to emulate the devServer.static.directory of WebPack and correctly serve the zip file
71
+ /* ... */
72
+ proxy: {
73
+ '/@mf-types.zip': {
74
+ target: 'http://localhost:3000',
75
+ changeOrigin: true,
76
+ rewrite: () => `/@fs/${process.cwd()}/dist/@mf-types.zip`,
77
+ },
78
+ },
79
+ fs: {
80
+ /* ... */
81
+ allow: ['./dist'],
82
+ /* ... */
83
+ },
84
+ },
85
+ });
86
+ ```
87
+
88
+ <br>
89
+ </details>
90
+ <details>
91
+ <summary>Rollup</summary><br>
92
+
93
+ ```ts
94
+ // rollup.config.js
95
+ import { NativeFederationTypeScriptHost, NativeFederationTypeScriptRemote } from '@module-federation/native-federation-typescript/rollup';
96
+
97
+ export default {
98
+ plugins: [
99
+ NativeFederationTypeScriptRemote({
100
+ /* options */
101
+ }),
102
+ NativeFederationTypeScriptHost({
103
+ /* options */
104
+ }),
105
+ ],
106
+ };
107
+ ```
108
+
109
+ <br>
110
+ </details>
111
+ <details>
112
+ <summary>Webpack</summary><br>
113
+
114
+ ```ts
115
+ // webpack.config.js
116
+ const { NativeFederationTypeScriptHost, NativeFederationTypeScriptRemote } = require('@module-federation/native-federation-typescript/webpack');
117
+ module.exports = {
118
+ /* ... */
119
+ plugins: [
120
+ NativeFederationTypeScriptRemote({
121
+ /* options */
122
+ }),
123
+ NativeFederationTypeScriptHost({
124
+ /* options */
125
+ }),
126
+ ],
127
+ };
128
+ ```
129
+
130
+ <br>
131
+ </details>
132
+ <details>
133
+ <summary>esbuild</summary><br>
134
+
135
+ ```ts
136
+ // esbuild.config.js
137
+ import { build } from 'esbuild';
138
+ import { NativeFederationTypeScriptHost, NativeFederationTypeScriptRemote } from '@module-federation/native-federation-typescript/esbuild';
139
+
140
+ build({
141
+ plugins: [
142
+ NativeFederationTypeScriptRemote({
143
+ /* options */
144
+ }),
145
+ NativeFederationTypeScriptHost({
146
+ /* options */
147
+ }),
148
+ ],
149
+ });
150
+ ```
151
+
152
+ <br>
153
+ </details>
154
+ <details>
155
+ <summary>Rspack</summary><br>
156
+
157
+ ```ts
158
+ // rspack.config.js
159
+ const { NativeFederationTypeScriptHost, NativeFederationTypeScriptRemote } = require('@module-federation/native-federation-typescript/rspack');
160
+ module.exports = {
161
+ /* ... */
162
+ plugins: [
163
+ NativeFederationTypeScriptRemote({
164
+ /* options */
165
+ }),
166
+ NativeFederationTypeScriptHost({
167
+ /* options */
168
+ }),
169
+ ],
170
+ };
171
+ ```
172
+
173
+ <br>
174
+ </details>
175
+
176
+ ## TypeScript configuration
177
+
178
+ To have the type definitions automatically found for imports, add paths to the `compilerOptions` in the `tsconfig.json`:
179
+
180
+ ```json
181
+ {
182
+ "paths": {
183
+ "*": ["./@mf-types/*"]
184
+ }
185
+ }
186
+ ```
187
+
188
+ ## Examples
189
+
190
+ To use it in a `host` module, refer to [this example](https://github.com/module-federation/module-federation-examples/tree/master/native-federation-tests-typescript-plugins/host).
191
+ To use it in a `remote` module, refer to [this example](https://github.com/module-federation/module-federation-examples/tree/master/native-federation-tests-typescript-plugins/remote).
@@ -0,0 +1,17 @@
1
+ interface HostOptions {
2
+ moduleFederationConfig: any;
3
+ typesFolder?: string;
4
+ deleteTypesFolder?: boolean;
5
+ }
6
+
7
+ interface RemoteOptions {
8
+ moduleFederationConfig: any;
9
+ tsConfigPath?: string;
10
+ typesFolder?: string;
11
+ compiledTypesFolder?: string;
12
+ deleteTypesFolder?: boolean;
13
+ additionalFilesToCompile?: string[];
14
+ compilerInstance?: 'tsc' | 'vue-tsc';
15
+ }
16
+
17
+ export { HostOptions as H, RemoteOptions as R };
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var I=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,o)=>(typeof require<"u"?require:e)[o]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var _ansicolors = require('ansi-colors'); var _ansicolors2 = _interopRequireDefault(_ansicolors);var _promises = require('fs/promises');var _path = require('path');var _rambda = require('rambda');var _unplugin = require('unplugin');var U={typesFolder:"@mf-types",deleteTypesFolder:!0},L=t=>{let e=t.split("@");return e[e.length-1]},z=(t,e)=>{let o=L(e),r=new URL(o),s=r.pathname.split("/").slice(0,-1).join("/");return r.pathname=`${s}/${t.typesFolder}.zip`,r.href},W=t=>Object.entries(t.moduleFederationConfig.remotes).reduce((e,[o,r])=>(e[o]=z(t,r),e),{}),T=t=>{if(!t.moduleFederationConfig)throw new Error("moduleFederationConfig is required");let e={...U,...t},o=W(e);return{hostOptions:e,mapRemotesToDownload:o}};var _fs = require('fs');var _typescript = require('typescript'); var _typescript2 = _interopRequireDefault(_typescript);var M={tsConfigPath:"./tsconfig.json",typesFolder:"@mf-types",compiledTypesFolder:"compiled-types",deleteTypesFolder:!0,additionalFilesToCompile:[],compilerInstance:"tsc"},B=({tsConfigPath:t,typesFolder:e,compiledTypesFolder:o})=>{let r=_path.resolve.call(void 0, t),s=_typescript2.default.readConfigFile(r,_typescript2.default.sys.readFile),i=_typescript2.default.parseJsonConfigFileContent(s.config,_typescript2.default.sys,_path.dirname.call(void 0, r)),p=_path.join.call(void 0, i.options.outDir||"dist",e,o);return{...i.options,emitDeclarationOnly:!0,noEmit:!1,declaration:!0,outDir:p}},X=["ts","tsx","vue","svelte"],R=t=>{let e=process.cwd();for(let o of X){let r=_path.join.call(void 0, e,`${t}.${o}`);if(_fs.existsSync.call(void 0, r))return r}},J=t=>Object.entries(t.moduleFederationConfig.exposes).reduce((e,[o,r])=>(e[o]=R(r)||R(_path.join.call(void 0, r,"index"))||r,e),{}),v=t=>{if(!t.moduleFederationConfig)throw new Error("moduleFederationConfig is required");let e={...M,...t},o=J(e);return{tsConfig:B(e),mapComponentsToExpose:o,remoteOptions:e}};var _admzip = require('adm-zip'); var _admzip2 = _interopRequireDefault(_admzip);var _axios = require('axios'); var _axios2 = _interopRequireDefault(_axios);var Q=/^\//,F=".d.ts",Y=t=>{let{line:e}=t.file.getLineAndCharacterOfPosition(t.start);console.error(_ansicolors2.default.red(`TS Error ${t.code}':' ${_typescript2.default.flattenDiagnosticMessageText(t.messageText,_typescript2.default.sys.newLine)}`)),console.error(_ansicolors2.default.red(` at ${t.file.fileName}:${e+1} typescript.sys.newLine`))},c=(t,e)=>_path.normalize.call(void 0, t.outDir.replace(e.compiledTypesFolder,"")),w=(t,e)=>_path.normalize.call(void 0, t.outDir.replace(e.compiledTypesFolder,"").replace(e.typesFolder,"")),ee=(t,e,o)=>{let r=_typescript2.default.createCompilerHost(e),s=r.writeFile,i=Object.fromEntries(Object.entries(t).map(n=>n.reverse())),p=c(e,o);return r.writeFile=(n,D,f,b,u,N)=>{s(n,D,f,b,u,N);for(let j of u||[]){let y=i[j.fileName];if(y){let g=_path.join.call(void 0, p,`${y}${F}`),A=_path.dirname.call(void 0, g),O=_path.relative.call(void 0, A,n).replace(F,"").replace(Q,"");s(g,`export * from './${O}';
2
+ export { default } from './${O}';`,f)}}},r},te=t=>I("vue-tsc").createProgram(t),oe=(t,e)=>{switch(t.compilerInstance){case"vue-tsc":return te(e);case"tsc":default:return _typescript2.default.createProgram(e)}},x=(t,e,o)=>{let r=ee(t,e,o),i={rootNames:[...Object.values(t),...o.additionalFilesToCompile],host:r,options:e},p=oe(o,i),{diagnostics:n=[]}=p.emit();n.forEach(Y)};var ie=(t,e)=>_path.join.call(void 0, t.replace(e.typesFolder,""),`${e.typesFolder}.zip`),$=async(t,e)=>{let o=c(t,e),r=new _admzip2.default;return r.addLocalFolder(o),r.writeZipPromise(ie(o,e))},ne=(t,e)=>o=>{throw o.message=_ansicolors2.default.red(`Network error: Unable to download federated mocks for '${t}' from '${e}' because '${o.message}', skipping...`),o},H=t=>async([e,o])=>{let r=await _axios2.default.get(o,{responseType:"arraybuffer"}).catch(ne(e,o)),s=_path.join.call(void 0, t.typesFolder,e);new (0, _admzip2.default)(Buffer.from(r.data)).extractAllTo(s,!0)};var Ne=_unplugin.createUnplugin.call(void 0, t=>{let{remoteOptions:e,tsConfig:o,mapComponentsToExpose:r}=v(t);return{name:"native-federation-typescript/remote",async writeBundle(){try{x(r,o,e),await $(o,e),e.deleteTypesFolder&&await _promises.rm.call(void 0, c(o,e),{recursive:!0,force:!0}),console.log(_ansicolors2.default.green("Federated types created correctly"))}catch(s){console.error(_ansicolors2.default.red(`Unable to compile federated types, ${s}`))}},webpack:s=>{s.options.devServer=_rambda.mergeDeepRight.call(void 0, s.options.devServer||{},{static:{directory:_path.resolve.call(void 0, w(o,e))}})}}}),je= exports.b =_unplugin.createUnplugin.call(void 0, t=>{let{hostOptions:e,mapRemotesToDownload:o}=T(t);return{name:"native-federation-typescript/host",async writeBundle(){e.deleteTypesFolder&&await _promises.rm.call(void 0, e.typesFolder,{recursive:!0,force:!0}).catch(i=>console.error(_ansicolors2.default.red(`Unable to remove types folder, ${i}`)));let r=H(e),s=Object.entries(o).map(r);await Promise.allSettled(s),console.log(_ansicolors2.default.green("Federated types extraction completed"))}}});exports.a = Ne; exports.b = je;
@@ -0,0 +1,2 @@
1
+ var I=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,o)=>(typeof require<"u"?require:e)[o]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});import l from"ansi-colors";import{rm as S}from"fs/promises";import{resolve as pe}from"path";import{mergeDeepRight as ce}from"rambda";import{createUnplugin as q}from"unplugin";var U={typesFolder:"@mf-types",deleteTypesFolder:!0},L=t=>{let e=t.split("@");return e[e.length-1]},z=(t,e)=>{let o=L(e),r=new URL(o),s=r.pathname.split("/").slice(0,-1).join("/");return r.pathname=`${s}/${t.typesFolder}.zip`,r.href},W=t=>Object.entries(t.moduleFederationConfig.remotes).reduce((e,[o,r])=>(e[o]=z(t,r),e),{}),T=t=>{if(!t.moduleFederationConfig)throw new Error("moduleFederationConfig is required");let e={...U,...t},o=W(e);return{hostOptions:e,mapRemotesToDownload:o}};import{existsSync as _}from"fs";import{dirname as Z,join as d,resolve as k}from"path";import m from"typescript";var M={tsConfigPath:"./tsconfig.json",typesFolder:"@mf-types",compiledTypesFolder:"compiled-types",deleteTypesFolder:!0,additionalFilesToCompile:[],compilerInstance:"tsc"},B=({tsConfigPath:t,typesFolder:e,compiledTypesFolder:o})=>{let r=k(t),s=m.readConfigFile(r,m.sys.readFile),i=m.parseJsonConfigFileContent(s.config,m.sys,Z(r)),p=d(i.options.outDir||"dist",e,o);return{...i.options,emitDeclarationOnly:!0,noEmit:!1,declaration:!0,outDir:p}},X=["ts","tsx","vue","svelte"],R=t=>{let e=process.cwd();for(let o of X){let r=d(e,`${t}.${o}`);if(_(r))return r}},J=t=>Object.entries(t.moduleFederationConfig.exposes).reduce((e,[o,r])=>(e[o]=R(r)||R(d(r,"index"))||r,e),{}),v=t=>{if(!t.moduleFederationConfig)throw new Error("moduleFederationConfig is required");let e={...M,...t},o=J(e);return{tsConfig:B(e),mapComponentsToExpose:o,remoteOptions:e}};import E from"adm-zip";import re from"ansi-colors";import se from"axios";import{join as P}from"path";import C from"ansi-colors";import{dirname as V,join as G,normalize as h,relative as K}from"path";import a from"typescript";var Q=/^\//,F=".d.ts",Y=t=>{let{line:e}=t.file.getLineAndCharacterOfPosition(t.start);console.error(C.red(`TS Error ${t.code}':' ${a.flattenDiagnosticMessageText(t.messageText,a.sys.newLine)}`)),console.error(C.red(` at ${t.file.fileName}:${e+1} typescript.sys.newLine`))},c=(t,e)=>h(t.outDir.replace(e.compiledTypesFolder,"")),w=(t,e)=>h(t.outDir.replace(e.compiledTypesFolder,"").replace(e.typesFolder,"")),ee=(t,e,o)=>{let r=a.createCompilerHost(e),s=r.writeFile,i=Object.fromEntries(Object.entries(t).map(n=>n.reverse())),p=c(e,o);return r.writeFile=(n,D,f,b,u,N)=>{s(n,D,f,b,u,N);for(let j of u||[]){let y=i[j.fileName];if(y){let g=G(p,`${y}${F}`),A=V(g),O=K(A,n).replace(F,"").replace(Q,"");s(g,`export * from './${O}';
2
+ export { default } from './${O}';`,f)}}},r},te=t=>I("vue-tsc").createProgram(t),oe=(t,e)=>{switch(t.compilerInstance){case"vue-tsc":return te(e);case"tsc":default:return a.createProgram(e)}},x=(t,e,o)=>{let r=ee(t,e,o),i={rootNames:[...Object.values(t),...o.additionalFilesToCompile],host:r,options:e},p=oe(o,i),{diagnostics:n=[]}=p.emit();n.forEach(Y)};var ie=(t,e)=>P(t.replace(e.typesFolder,""),`${e.typesFolder}.zip`),$=async(t,e)=>{let o=c(t,e),r=new E;return r.addLocalFolder(o),r.writeZipPromise(ie(o,e))},ne=(t,e)=>o=>{throw o.message=re.red(`Network error: Unable to download federated mocks for '${t}' from '${e}' because '${o.message}', skipping...`),o},H=t=>async([e,o])=>{let r=await se.get(o,{responseType:"arraybuffer"}).catch(ne(e,o)),s=P(t.typesFolder,e);new E(Buffer.from(r.data)).extractAllTo(s,!0)};var Ne=q(t=>{let{remoteOptions:e,tsConfig:o,mapComponentsToExpose:r}=v(t);return{name:"native-federation-typescript/remote",async writeBundle(){try{x(r,o,e),await $(o,e),e.deleteTypesFolder&&await S(c(o,e),{recursive:!0,force:!0}),console.log(l.green("Federated types created correctly"))}catch(s){console.error(l.red(`Unable to compile federated types, ${s}`))}},webpack:s=>{s.options.devServer=ce(s.options.devServer||{},{static:{directory:pe(w(o,e))}})}}}),je=q(t=>{let{hostOptions:e,mapRemotesToDownload:o}=T(t);return{name:"native-federation-typescript/host",async writeBundle(){e.deleteTypesFolder&&await S(e.typesFolder,{recursive:!0,force:!0}).catch(i=>console.error(l.red(`Unable to remove types folder, ${i}`)));let r=H(e),s=Object.entries(o).map(r);await Promise.allSettled(s),console.log(l.green("Federated types extraction completed"))}}});export{Ne as a,je as b};
@@ -0,0 +1,6 @@
1
+ import { R as RemoteOptions, H as HostOptions } from './RemoteOptions-ce85caac.js';
2
+
3
+ declare const NativeFederationTypeScriptRemote: (options: RemoteOptions) => undefined;
4
+ declare const NativeFederationTypeScriptHost: (options: HostOptions) => undefined;
5
+
6
+ export { NativeFederationTypeScriptHost, NativeFederationTypeScriptRemote };
@@ -0,0 +1,6 @@
1
+ import { R as RemoteOptions, H as HostOptions } from './RemoteOptions-ce85caac.js';
2
+
3
+ declare const NativeFederationTypeScriptRemote: (options: RemoteOptions) => undefined;
4
+ declare const NativeFederationTypeScriptHost: (options: HostOptions) => undefined;
5
+
6
+ export { NativeFederationTypeScriptHost, NativeFederationTypeScriptRemote };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkP5PXJORBjs = require('./chunk-P5PXJORB.js');var i=_chunkP5PXJORBjs.a.esbuild,r= exports.NativeFederationTypeScriptHost =_chunkP5PXJORBjs.b.esbuild;exports.NativeFederationTypeScriptHost = r; exports.NativeFederationTypeScriptRemote = i;
@@ -0,0 +1 @@
1
+ import{a as e,b as t}from"./chunk-ZPCKDOMT.mjs";var i=e.esbuild,r=t.esbuild;export{r as NativeFederationTypeScriptHost,i as NativeFederationTypeScriptRemote};
@@ -0,0 +1,7 @@
1
+ import * as unplugin from 'unplugin';
2
+ import { R as RemoteOptions, H as HostOptions } from './RemoteOptions-ce85caac.js';
3
+
4
+ declare const NativeFederationTypeScriptRemote: unplugin.UnpluginInstance<RemoteOptions, boolean>;
5
+ declare const NativeFederationTypeScriptHost: unplugin.UnpluginInstance<HostOptions, boolean>;
6
+
7
+ export { NativeFederationTypeScriptHost, NativeFederationTypeScriptRemote };
@@ -0,0 +1,7 @@
1
+ import * as unplugin from 'unplugin';
2
+ import { R as RemoteOptions, H as HostOptions } from './RemoteOptions-ce85caac.js';
3
+
4
+ declare const NativeFederationTypeScriptRemote: unplugin.UnpluginInstance<RemoteOptions, boolean>;
5
+ declare const NativeFederationTypeScriptHost: unplugin.UnpluginInstance<HostOptions, boolean>;
6
+
7
+ export { NativeFederationTypeScriptHost, NativeFederationTypeScriptRemote };
package/dist/index.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkP5PXJORBjs = require('./chunk-P5PXJORB.js');exports.NativeFederationTypeScriptHost = _chunkP5PXJORBjs.b; exports.NativeFederationTypeScriptRemote = _chunkP5PXJORBjs.a;
package/dist/index.mjs ADDED
@@ -0,0 +1 @@
1
+ import{a,b}from"./chunk-ZPCKDOMT.mjs";export{b as NativeFederationTypeScriptHost,a as NativeFederationTypeScriptRemote};
@@ -0,0 +1,6 @@
1
+ import { R as RemoteOptions, H as HostOptions } from './RemoteOptions-ce85caac.js';
2
+
3
+ declare const NativeFederationTypeScriptRemote: (options: RemoteOptions) => undefined<any> | undefined<any>[];
4
+ declare const NativeFederationTypeScriptHost: (options: HostOptions) => undefined<any> | undefined<any>[];
5
+
6
+ export { NativeFederationTypeScriptHost, NativeFederationTypeScriptRemote };
@@ -0,0 +1,6 @@
1
+ import { R as RemoteOptions, H as HostOptions } from './RemoteOptions-ce85caac.js';
2
+
3
+ declare const NativeFederationTypeScriptRemote: (options: RemoteOptions) => undefined<any> | undefined<any>[];
4
+ declare const NativeFederationTypeScriptHost: (options: HostOptions) => undefined<any> | undefined<any>[];
5
+
6
+ export { NativeFederationTypeScriptHost, NativeFederationTypeScriptRemote };
package/dist/rollup.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkP5PXJORBjs = require('./chunk-P5PXJORB.js');var r=_chunkP5PXJORBjs.a.rollup,i= exports.NativeFederationTypeScriptHost =_chunkP5PXJORBjs.b.rollup;exports.NativeFederationTypeScriptHost = i; exports.NativeFederationTypeScriptRemote = r;
@@ -0,0 +1 @@
1
+ import{a as e,b as t}from"./chunk-ZPCKDOMT.mjs";var r=e.rollup,i=t.rollup;export{i as NativeFederationTypeScriptHost,r as NativeFederationTypeScriptRemote};
@@ -0,0 +1,6 @@
1
+ import { R as RemoteOptions, H as HostOptions } from './RemoteOptions-ce85caac.js';
2
+
3
+ declare const NativeFederationTypeScriptRemote: (options: RemoteOptions) => RspackPluginInstance;
4
+ declare const NativeFederationTypeScriptHost: (options: HostOptions) => RspackPluginInstance;
5
+
6
+ export { NativeFederationTypeScriptHost, NativeFederationTypeScriptRemote };
@@ -0,0 +1,6 @@
1
+ import { R as RemoteOptions, H as HostOptions } from './RemoteOptions-ce85caac.js';
2
+
3
+ declare const NativeFederationTypeScriptRemote: (options: RemoteOptions) => RspackPluginInstance;
4
+ declare const NativeFederationTypeScriptHost: (options: HostOptions) => RspackPluginInstance;
5
+
6
+ export { NativeFederationTypeScriptHost, NativeFederationTypeScriptRemote };
package/dist/rspack.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkP5PXJORBjs = require('./chunk-P5PXJORB.js');var r=_chunkP5PXJORBjs.a.rspack,a= exports.NativeFederationTypeScriptHost =_chunkP5PXJORBjs.b.rspack;exports.NativeFederationTypeScriptHost = a; exports.NativeFederationTypeScriptRemote = r;
@@ -0,0 +1 @@
1
+ import{a as e,b as t}from"./chunk-ZPCKDOMT.mjs";var r=e.rspack,a=t.rspack;export{a as NativeFederationTypeScriptHost,r as NativeFederationTypeScriptRemote};
@@ -0,0 +1,6 @@
1
+ import { R as RemoteOptions, H as HostOptions } from './RemoteOptions-ce85caac.js';
2
+
3
+ declare const NativeFederationTypeScriptRemote: (options: RemoteOptions) => any;
4
+ declare const NativeFederationTypeScriptHost: (options: HostOptions) => any;
5
+
6
+ export { NativeFederationTypeScriptHost, NativeFederationTypeScriptRemote };
package/dist/vite.d.ts ADDED
@@ -0,0 +1,6 @@
1
+ import { R as RemoteOptions, H as HostOptions } from './RemoteOptions-ce85caac.js';
2
+
3
+ declare const NativeFederationTypeScriptRemote: (options: RemoteOptions) => any;
4
+ declare const NativeFederationTypeScriptHost: (options: HostOptions) => any;
5
+
6
+ export { NativeFederationTypeScriptHost, NativeFederationTypeScriptRemote };
package/dist/vite.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkP5PXJORBjs = require('./chunk-P5PXJORB.js');var i=_chunkP5PXJORBjs.a.vite,p= exports.NativeFederationTypeScriptHost =_chunkP5PXJORBjs.b.vite;exports.NativeFederationTypeScriptHost = p; exports.NativeFederationTypeScriptRemote = i;
package/dist/vite.mjs ADDED
@@ -0,0 +1 @@
1
+ import{a as t,b as e}from"./chunk-ZPCKDOMT.mjs";var i=t.vite,p=e.vite;export{p as NativeFederationTypeScriptHost,i as NativeFederationTypeScriptRemote};
@@ -0,0 +1,6 @@
1
+ import { R as RemoteOptions, H as HostOptions } from './RemoteOptions-ce85caac.js';
2
+
3
+ declare const NativeFederationTypeScriptRemote: (options: RemoteOptions) => undefined;
4
+ declare const NativeFederationTypeScriptHost: (options: HostOptions) => undefined;
5
+
6
+ export { NativeFederationTypeScriptHost, NativeFederationTypeScriptRemote };
@@ -0,0 +1,6 @@
1
+ import { R as RemoteOptions, H as HostOptions } from './RemoteOptions-ce85caac.js';
2
+
3
+ declare const NativeFederationTypeScriptRemote: (options: RemoteOptions) => undefined;
4
+ declare const NativeFederationTypeScriptHost: (options: HostOptions) => undefined;
5
+
6
+ export { NativeFederationTypeScriptHost, NativeFederationTypeScriptRemote };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkP5PXJORBjs = require('./chunk-P5PXJORB.js');var a=_chunkP5PXJORBjs.a.webpack,r= exports.NativeFederationTypeScriptHost =_chunkP5PXJORBjs.b.webpack;exports.NativeFederationTypeScriptHost = r; exports.NativeFederationTypeScriptRemote = a;
@@ -0,0 +1 @@
1
+ import{a as e,b as t}from"./chunk-ZPCKDOMT.mjs";var a=e.webpack,r=t.webpack;export{r as NativeFederationTypeScriptHost,a as NativeFederationTypeScriptRemote};
package/package.json ADDED
@@ -0,0 +1,61 @@
1
+ {
2
+ "name": "@module-federation/native-federation-typescript",
3
+ "version": "0.0.0-feat-node-support-1702930274547",
4
+ "description": "Bundler agnostic unplugin to share federated types",
5
+ "keywords": [
6
+ "module federation",
7
+ "typescript",
8
+ "remote types",
9
+ "federated types"
10
+ ],
11
+ "publishConfig": {
12
+ "access": "public"
13
+ },
14
+ "exports": {
15
+ ".": {
16
+ "import": "./dist/index.mjs",
17
+ "require": "./dist/index.js",
18
+ "types": "./dist/index.d.ts"
19
+ },
20
+ "./rollup": {
21
+ "types": "./dist/rollup.d.ts",
22
+ "require": "./dist/rollup.js",
23
+ "import": "./dist/rollup.mjs"
24
+ },
25
+ "./vite": {
26
+ "types": "./dist/vite.d.ts",
27
+ "require": "./dist/vite.js",
28
+ "import": "./dist/vite.mjs"
29
+ },
30
+ "./webpack": {
31
+ "types": "./dist/webpack.d.ts",
32
+ "require": "./dist/webpack.js",
33
+ "import": "./dist/webpack.mjs"
34
+ },
35
+ "./esbuild": {
36
+ "types": "./dist/esbuild.d.ts",
37
+ "require": "./dist/esbuild.js",
38
+ "import": "./dist/esbuild.mjs"
39
+ },
40
+ "./rspack": {
41
+ "types": "./dist/rspack.d.ts",
42
+ "require": "./dist/rspack.js",
43
+ "import": "./dist/rspack.mjs"
44
+ }
45
+ },
46
+ "main": "./dist/index.js",
47
+ "types": "./dist/index.d.ts",
48
+ "author": "Matteo Pietro Dazzi <matteopietro.dazzi@gmail.com> (https://github.com/ilteoood)",
49
+ "license": "MIT",
50
+ "dependencies": {
51
+ "adm-zip": "^0.5.10",
52
+ "ansi-colors": "^4.1.3",
53
+ "axios": "^1.3.4",
54
+ "rambda": "^7.5.0",
55
+ "unplugin": "^1.3.1"
56
+ },
57
+ "peerDependencies": {
58
+ "typescript": "^4.9.0 || ^5.0.0",
59
+ "vue-tsc": "^1.0.24"
60
+ }
61
+ }