@module-federation/esbuild 0.0.100 → 0.0.101
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.
|
@@ -97,7 +97,8 @@ function commonjs_commonjs({ filter = /\.c?js$/, transform = true, transformConf
|
|
|
97
97
|
name: 'commonjs',
|
|
98
98
|
setup ({ onLoad, esbuild, initialOptions }) {
|
|
99
99
|
let esbuild_shim;
|
|
100
|
-
const require_esbuild = ()
|
|
100
|
+
const require_esbuild = ()=>// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
101
|
+
esbuild || (esbuild_shim ||= __webpack_require__("esbuild"));
|
|
101
102
|
const read = external_fs_namespaceObject.promises.readFile;
|
|
102
103
|
const lexer = new external_lexer_js_namespaceObject.Lexer();
|
|
103
104
|
//@ts-ignore
|
|
@@ -55,7 +55,8 @@ function commonjs_commonjs({ filter = /\.c?js$/, transform = true, transformConf
|
|
|
55
55
|
name: 'commonjs',
|
|
56
56
|
setup ({ onLoad, esbuild, initialOptions }) {
|
|
57
57
|
let esbuild_shim;
|
|
58
|
-
const require_esbuild = ()
|
|
58
|
+
const require_esbuild = ()=>// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
59
|
+
esbuild || (esbuild_shim ||= __webpack_require__("esbuild"));
|
|
59
60
|
const read = promises.readFile;
|
|
60
61
|
const lexer = new Lexer();
|
|
61
62
|
//@ts-ignore
|
|
@@ -64,14 +64,10 @@ const external_path_namespaceObject = require("path");
|
|
|
64
64
|
var external_path_default = /*#__PURE__*/__webpack_require__.n(external_path_namespaceObject);
|
|
65
65
|
;// CONCATENATED MODULE: external "./collect-exports.js"
|
|
66
66
|
const external_collect_exports_js_namespaceObject = require("./collect-exports.js");
|
|
67
|
-
;// CONCATENATED MODULE: external "@module-federation/esbuild/package.json"
|
|
68
|
-
const package_json_namespaceObject = require("@module-federation/esbuild/package.json");
|
|
69
67
|
;// CONCATENATED MODULE: ./src/adapters/lib/manifest.ts
|
|
70
68
|
|
|
71
69
|
|
|
72
70
|
|
|
73
|
-
//@ts-expect-error
|
|
74
|
-
|
|
75
71
|
const writeRemoteManifest = async (config, result)=>{
|
|
76
72
|
var _result_metafile, _result_metafile1;
|
|
77
73
|
if (result.errors && result.errors.length > 0) {
|
|
@@ -81,6 +77,7 @@ const writeRemoteManifest = async (config, result)=>{
|
|
|
81
77
|
let packageJson;
|
|
82
78
|
try {
|
|
83
79
|
const packageJsonPath = await (0,external_collect_exports_js_namespaceObject.resolve)(process.cwd(), '/package.json') || '';
|
|
80
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
84
81
|
packageJson = require(packageJsonPath);
|
|
85
82
|
} catch (e) {
|
|
86
83
|
packageJson = {
|
|
@@ -209,7 +206,7 @@ const writeRemoteManifest = async (config, result)=>{
|
|
|
209
206
|
},
|
|
210
207
|
types,
|
|
211
208
|
globalName: config.name,
|
|
212
|
-
pluginVersion:
|
|
209
|
+
pluginVersion: "0.0.101",
|
|
213
210
|
publicPath
|
|
214
211
|
},
|
|
215
212
|
shared,
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import fs from "fs";
|
|
2
2
|
import path from "path";
|
|
3
3
|
import { resolve } from "./collect-exports.mjs";
|
|
4
|
-
import { version as package_json_version } from "@module-federation/esbuild/package.json";
|
|
5
4
|
|
|
6
5
|
;// CONCATENATED MODULE: external "fs"
|
|
7
6
|
|
|
@@ -9,14 +8,10 @@ import { version as package_json_version } from "@module-federation/esbuild/pack
|
|
|
9
8
|
|
|
10
9
|
;// CONCATENATED MODULE: external "./collect-exports.mjs"
|
|
11
10
|
|
|
12
|
-
;// CONCATENATED MODULE: external "@module-federation/esbuild/package.json"
|
|
13
|
-
|
|
14
11
|
;// CONCATENATED MODULE: ./src/adapters/lib/manifest.ts
|
|
15
12
|
|
|
16
13
|
|
|
17
14
|
|
|
18
|
-
//@ts-expect-error
|
|
19
|
-
|
|
20
15
|
const writeRemoteManifest = async (config, result)=>{
|
|
21
16
|
var _result_metafile, _result_metafile1;
|
|
22
17
|
if (result.errors && result.errors.length > 0) {
|
|
@@ -26,6 +21,7 @@ const writeRemoteManifest = async (config, result)=>{
|
|
|
26
21
|
let packageJson;
|
|
27
22
|
try {
|
|
28
23
|
const packageJsonPath = await resolve(process.cwd(), '/package.json') || '';
|
|
24
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
29
25
|
packageJson = require(packageJsonPath);
|
|
30
26
|
} catch (e) {
|
|
31
27
|
packageJson = {
|
|
@@ -154,7 +150,7 @@ const writeRemoteManifest = async (config, result)=>{
|
|
|
154
150
|
},
|
|
155
151
|
types,
|
|
156
152
|
globalName: config.name,
|
|
157
|
-
pluginVersion:
|
|
153
|
+
pluginVersion: "0.0.101",
|
|
158
154
|
publicPath
|
|
159
155
|
},
|
|
160
156
|
shared,
|
|
@@ -139,7 +139,8 @@ const cjsToEsmPlugin = {
|
|
|
139
139
|
}, async (args)=>{
|
|
140
140
|
var _build_initialOptions_external;
|
|
141
141
|
let esbuild_shim;
|
|
142
|
-
const require_esbuild = ()
|
|
142
|
+
const require_esbuild = ()=>// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
143
|
+
build.esbuild || (esbuild_shim ||= __webpack_require__("esbuild"));
|
|
143
144
|
const packageBuilder = await require_esbuild().build({
|
|
144
145
|
...build.initialOptions,
|
|
145
146
|
external: (_build_initialOptions_external = build.initialOptions.external) === null || _build_initialOptions_external === void 0 ? void 0 : _build_initialOptions_external.filter((e)=>{
|
|
@@ -92,7 +92,8 @@ const cjsToEsmPlugin = {
|
|
|
92
92
|
}, async (args)=>{
|
|
93
93
|
var _build_initialOptions_external;
|
|
94
94
|
let esbuild_shim;
|
|
95
|
-
const require_esbuild = ()
|
|
95
|
+
const require_esbuild = ()=>// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
96
|
+
build.esbuild || (esbuild_shim ||= __webpack_require__("esbuild"));
|
|
96
97
|
const packageBuilder = await require_esbuild().build({
|
|
97
98
|
...build.initialOptions,
|
|
98
99
|
external: (_build_initialOptions_external = build.initialOptions.external) === null || _build_initialOptions_external === void 0 ? void 0 : _build_initialOptions_external.filter((e)=>{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@module-federation/esbuild",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.101",
|
|
4
4
|
"author": "Zack Jackson (@ScriptedAlchemy)",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -58,9 +58,9 @@
|
|
|
58
58
|
"esbuild": "^0.25.0",
|
|
59
59
|
"json5": "^2.2.3",
|
|
60
60
|
"npmlog": "^7.0.1",
|
|
61
|
-
"@module-federation/sdk": "2.2.
|
|
62
|
-
"@module-federation/runtime": "2.2.
|
|
63
|
-
"@module-federation/webpack-bundler-runtime": "2.2.
|
|
61
|
+
"@module-federation/sdk": "2.2.3",
|
|
62
|
+
"@module-federation/runtime": "2.2.3",
|
|
63
|
+
"@module-federation/webpack-bundler-runtime": "2.2.3"
|
|
64
64
|
},
|
|
65
65
|
"devDependencies": {
|
|
66
66
|
"@rslib/core": "^0.12.4"
|