@module-federation/dts-plugin 0.1.3 → 0.1.4
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/dist/CHANGELOG.md +10 -0
- package/dist/index.js +18 -3
- package/dist/package.json +1 -1
- package/package.json +3 -3
package/dist/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @module-federation/dts-plugin
|
|
2
2
|
|
|
3
|
+
## 0.1.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 8f3a440: fix: detect whether the project is ts
|
|
8
|
+
- Updated dependencies [8f3a440]
|
|
9
|
+
- Updated dependencies [2f697b9]
|
|
10
|
+
- @module-federation/sdk@0.1.4
|
|
11
|
+
- @module-federation/managers@0.1.4
|
|
12
|
+
|
|
3
13
|
## 0.1.3
|
|
4
14
|
|
|
5
15
|
### Patch Changes
|
package/dist/index.js
CHANGED
|
@@ -2063,7 +2063,10 @@ var DevPlugin = class _DevPlugin {
|
|
|
2063
2063
|
const defaultGenerateTypes = { compileInChildProcess: true };
|
|
2064
2064
|
const defaultConsumeTypes = { consumeAPITypes: true };
|
|
2065
2065
|
const normalizedDtsOptions = (0, import_sdk5.normalizeOptions)(
|
|
2066
|
-
isTSProject(
|
|
2066
|
+
isTSProject(
|
|
2067
|
+
typeof dts === "object" ? dts.tsConfigPath : void 0,
|
|
2068
|
+
compiler.context
|
|
2069
|
+
),
|
|
2067
2070
|
{
|
|
2068
2071
|
// remote types dist(.dev-server) not be used currently, so no need to set extractThirdParty etc
|
|
2069
2072
|
generateTypes: defaultGenerateTypes,
|
|
@@ -2073,7 +2076,7 @@ var DevPlugin = class _DevPlugin {
|
|
|
2073
2076
|
"mfOptions.dts"
|
|
2074
2077
|
)(dts);
|
|
2075
2078
|
const normalizedGenerateTypes = (0, import_sdk5.normalizeOptions)(
|
|
2076
|
-
normalizedDtsOptions
|
|
2079
|
+
Boolean(normalizedDtsOptions),
|
|
2077
2080
|
defaultGenerateTypes,
|
|
2078
2081
|
"mfOptions.dts.generateTypes"
|
|
2079
2082
|
)(
|
|
@@ -2105,6 +2108,12 @@ var DevPlugin = class _DevPlugin {
|
|
|
2105
2108
|
...normalizedConsumeTypes
|
|
2106
2109
|
};
|
|
2107
2110
|
const extraOptions = normalizedDtsOptions ? normalizedDtsOptions.extraOptions || {} : {};
|
|
2111
|
+
if (!remote && !host && normalizedDev.disableLiveReload) {
|
|
2112
|
+
return;
|
|
2113
|
+
}
|
|
2114
|
+
if (remote && !(remote == null ? void 0 : remote.tsConfigPath) && typeof normalizedDtsOptions === "object" && normalizedDtsOptions.tsConfigPath) {
|
|
2115
|
+
remote.tsConfigPath = normalizedDtsOptions.tsConfigPath;
|
|
2116
|
+
}
|
|
2108
2117
|
this._devWorker = createDevWorker({
|
|
2109
2118
|
name,
|
|
2110
2119
|
remote,
|
|
@@ -2182,6 +2191,9 @@ var GenerateTypesPlugin = class {
|
|
|
2182
2191
|
},
|
|
2183
2192
|
extraOptions: dtsOptions.extraOptions || {}
|
|
2184
2193
|
};
|
|
2194
|
+
if (dtsOptions.tsConfigPath && !finalOptions.remote.tsConfigPath) {
|
|
2195
|
+
finalOptions.remote.tsConfigPath = dtsOptions.tsConfigPath;
|
|
2196
|
+
}
|
|
2185
2197
|
validateOptions(finalOptions.remote);
|
|
2186
2198
|
const isProd = !isDev();
|
|
2187
2199
|
const getGenerateTypesFn = () => {
|
|
@@ -2256,7 +2268,10 @@ var TypesPlugin = class {
|
|
|
2256
2268
|
};
|
|
2257
2269
|
const defaultConsumeTypes = { abortOnError: false, consumeAPITypes: true };
|
|
2258
2270
|
const normalizedDtsOptions = (0, import_sdk8.normalizeOptions)(
|
|
2259
|
-
isTSProject(
|
|
2271
|
+
isTSProject(
|
|
2272
|
+
typeof options.dts === "object" ? options.dts.tsConfigPath : void 0,
|
|
2273
|
+
compiler.context
|
|
2274
|
+
),
|
|
2260
2275
|
{
|
|
2261
2276
|
generateTypes: defaultGenerateTypes,
|
|
2262
2277
|
consumeTypes: defaultConsumeTypes,
|
package/dist/package.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@module-federation/dts-plugin",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"author": "hanric <hanric.zhang@gmail.com>",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -47,8 +47,8 @@
|
|
|
47
47
|
"log4js": "6.9.1",
|
|
48
48
|
"node-schedule": "2.1.0",
|
|
49
49
|
"ws": "8.5.0",
|
|
50
|
-
"@module-federation/sdk": "0.1.
|
|
51
|
-
"@module-federation/managers": "0.1.
|
|
50
|
+
"@module-federation/sdk": "0.1.4",
|
|
51
|
+
"@module-federation/managers": "0.1.4",
|
|
52
52
|
"@module-federation/third-party-dts-extractor": "0.0.18"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|