@softarc/native-federation-esbuild 1.1.1 → 2.0.0

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/package.json CHANGED
@@ -1,21 +1,22 @@
1
1
  {
2
2
  "name": "@softarc/native-federation-esbuild",
3
- "version": "1.1.1",
3
+ "version": "2.0.0",
4
4
  "type": "commonjs",
5
5
  "dependencies": {
6
6
  "@rollup/plugin-commonjs": "^22.0.2",
7
7
  "@rollup/plugin-node-resolve": "^13.3.0",
8
8
  "@rollup/plugin-replace": "^4.0.0",
9
- "rollup": "^2.79.0",
10
- "rollup-plugin-node-externals": "^4.1.1",
9
+ "acorn": "^8.8.1",
11
10
  "esbuild": "^0.15.5",
12
11
  "npmlog": "^6.0.2",
13
- "acorn": "^8.8.1"
12
+ "process": "0.11.10",
13
+ "rollup": "^2.79.0",
14
+ "rollup-plugin-node-externals": "^4.1.1"
14
15
  },
15
- "main": "./src/index.js",
16
- "typings": "./src/index.d.ts",
17
16
  "peerDependencies": {
18
- "@softarc/native-federation": "1.1.1",
19
- "@softarc/native-federation-runtime": "1.1.1"
20
- }
17
+ "@softarc/native-federation": "2.0.0",
18
+ "@softarc/native-federation-runtime": "2.0.0"
19
+ },
20
+ "main": "./src/index.js",
21
+ "types": "./src/index.d.ts"
21
22
  }
package/src/index.d.ts CHANGED
@@ -1 +1 @@
1
- export * from './lib/adapter';
1
+ export * from './lib/adapter';
package/src/index.js CHANGED
@@ -1,5 +1,5 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- tslib_1.__exportStar(require("./lib/adapter"), exports);
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./lib/adapter"), exports);
5
5
  //# sourceMappingURL=index.js.map
@@ -1,16 +1,16 @@
1
- import { BuildAdapter, BuildAdapterOptions } from '@softarc/native-federation/build';
2
- import * as esbuild from 'esbuild';
3
- export declare const esBuildAdapter: BuildAdapter;
4
- export declare type ReplacementConfig = {
5
- file: string;
6
- };
7
- export interface EsBuildAdapterConfig {
8
- plugins: esbuild.Plugin[];
9
- fileReplacements?: Record<string, string | ReplacementConfig>;
10
- skipRollup?: boolean;
11
- compensateExports?: RegExp[];
12
- loader?: {
13
- [ext: string]: esbuild.Loader;
14
- };
15
- }
16
- export declare function createEsBuildAdapter(config: EsBuildAdapterConfig): (options: BuildAdapterOptions) => Promise<void>;
1
+ import { BuildAdapter, BuildAdapterOptions, BuildResult } from '@softarc/native-federation/build';
2
+ import * as esbuild from 'esbuild';
3
+ export declare const esBuildAdapter: BuildAdapter;
4
+ export type ReplacementConfig = {
5
+ file: string;
6
+ };
7
+ export interface EsBuildAdapterConfig {
8
+ plugins: esbuild.Plugin[];
9
+ fileReplacements?: Record<string, string | ReplacementConfig>;
10
+ skipRollup?: boolean;
11
+ compensateExports?: RegExp[];
12
+ loader?: {
13
+ [ext: string]: esbuild.Loader;
14
+ };
15
+ }
16
+ export declare function createEsBuildAdapter(config: EsBuildAdapterConfig): (options: BuildAdapterOptions) => Promise<BuildResult[]>;
@@ -1,133 +1,147 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.createEsBuildAdapter = exports.esBuildAdapter = void 0;
4
- const tslib_1 = require("tslib");
5
- const build_1 = require("@softarc/native-federation/build");
6
- const esbuild = require("esbuild");
7
- const rollup_1 = require("rollup");
8
- const plugin_node_resolve_1 = require("@rollup/plugin-node-resolve");
9
- const rollup_plugin_node_externals_1 = require("rollup-plugin-node-externals");
10
- const collect_exports_1 = require("./collect-exports");
11
- const fs = require("fs");
12
- // eslint-disable-next-line @typescript-eslint/no-var-requires
13
- const commonjs = require('@rollup/plugin-commonjs');
14
- // eslint-disable-next-line @typescript-eslint/no-var-requires
15
- const replace = require('@rollup/plugin-replace');
16
- exports.esBuildAdapter = createEsBuildAdapter({
17
- plugins: [],
18
- });
19
- function createEsBuildAdapter(config) {
20
- if (!config.compensateExports) {
21
- config.compensateExports = [new RegExp('/react/')];
22
- }
23
- return (options) => tslib_1.__awaiter(this, void 0, void 0, function* () {
24
- var _a;
25
- const { entryPoint, external, outfile, watch } = options;
26
- const isPkg = entryPoint.includes('node_modules');
27
- const pkgName = isPkg ? inferePkgName(entryPoint) : '';
28
- const tmpFolder = `node_modules/.tmp/${pkgName}`;
29
- if (isPkg) {
30
- yield prepareNodePackage(entryPoint, external, tmpFolder, config, !!options.dev);
31
- }
32
- yield esbuild.build({
33
- entryPoints: [isPkg ? tmpFolder : entryPoint],
34
- external,
35
- outfile,
36
- loader: config.loader,
37
- bundle: true,
38
- sourcemap: options.dev,
39
- minify: !options.dev,
40
- watch: !watch
41
- ? false
42
- : {
43
- onRebuild: (err) => {
44
- if (err) {
45
- build_1.logger.error('Error rebuilding ' + entryPoint);
46
- }
47
- else {
48
- build_1.logger.info('Rebuilt ' + entryPoint);
49
- }
50
- },
51
- },
52
- format: 'esm',
53
- target: ['esnext'],
54
- plugins: [...config.plugins],
55
- });
56
- const normEntryPoint = entryPoint.replace(/\\/g, '/');
57
- if (isPkg && ((_a = config === null || config === void 0 ? void 0 : config.compensateExports) === null || _a === void 0 ? void 0 : _a.find(regExp => regExp.exec(normEntryPoint)))) {
58
- build_1.logger.verbose('compensate exports for ' + tmpFolder);
59
- compensateExports(tmpFolder, outfile);
60
- }
61
- });
62
- }
63
- exports.createEsBuildAdapter = createEsBuildAdapter;
64
- function compensateExports(entryPoint, outfile) {
65
- const inExports = (0, collect_exports_1.collectExports)(entryPoint);
66
- const outExports = outfile ? (0, collect_exports_1.collectExports)(outfile) : inExports;
67
- if (!outExports.hasDefaultExport || outExports.hasFurtherExports) {
68
- return;
69
- }
70
- const defaultName = outExports.defaultExportName;
71
- let exports = '/*Try to compensate missing exports*/\n\n';
72
- for (const exp of inExports.exports) {
73
- exports += `let ${exp}$softarc = ${defaultName}.${exp};\n`;
74
- exports += `export { ${exp}$softarc as ${exp} };\n`;
75
- }
76
- const target = outfile !== null && outfile !== void 0 ? outfile : entryPoint;
77
- fs.appendFileSync(target, exports, 'utf-8');
78
- }
79
- function prepareNodePackage(entryPoint, external, tmpFolder, config, dev) {
80
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
81
- if (config.fileReplacements) {
82
- entryPoint = replaceEntryPoint(entryPoint, normalize(config.fileReplacements));
83
- }
84
- const env = dev ? 'development' : 'production';
85
- const result = yield (0, rollup_1.rollup)({
86
- input: entryPoint,
87
- plugins: [
88
- commonjs(),
89
- (0, rollup_plugin_node_externals_1.externals)({ include: external }),
90
- (0, plugin_node_resolve_1.default)(),
91
- replace({
92
- preventAssignment: true,
93
- values: {
94
- 'process.env.NODE_ENV': `"${env}"`,
95
- },
96
- }),
97
- ],
98
- });
99
- yield result.write({
100
- format: 'esm',
101
- file: tmpFolder,
102
- sourcemap: dev,
103
- exports: 'named',
104
- });
105
- });
106
- }
107
- function inferePkgName(entryPoint) {
108
- return entryPoint
109
- .replace(/.*?node_modules/g, '')
110
- .replace(/[^A-Za-z0-9.]/g, '_');
111
- }
112
- function normalize(config) {
113
- const result = {};
114
- for (const key in config) {
115
- if (typeof config[key] === 'string') {
116
- result[key] = {
117
- file: config[key],
118
- };
119
- }
120
- else {
121
- result[key] = config[key];
122
- }
123
- }
124
- return result;
125
- }
126
- function replaceEntryPoint(entryPoint, fileReplacements) {
127
- entryPoint = entryPoint.replace(/\\/g, '/');
128
- for (const key in fileReplacements) {
129
- entryPoint = entryPoint.replace(new RegExp(`${key}$`), fileReplacements[key].file);
130
- }
131
- return entryPoint;
132
- }
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createEsBuildAdapter = exports.esBuildAdapter = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const esbuild = tslib_1.__importStar(require("esbuild"));
6
+ const rollup_1 = require("rollup");
7
+ const plugin_node_resolve_1 = tslib_1.__importDefault(require("@rollup/plugin-node-resolve"));
8
+ const rollup_plugin_node_externals_1 = require("rollup-plugin-node-externals");
9
+ const collect_exports_1 = require("./collect-exports");
10
+ const fs = tslib_1.__importStar(require("fs"));
11
+ const path_1 = tslib_1.__importDefault(require("path"));
12
+ // eslint-disable-next-line @typescript-eslint/no-var-requires
13
+ const commonjs = require('@rollup/plugin-commonjs');
14
+ // eslint-disable-next-line @typescript-eslint/no-var-requires
15
+ const replace = require('@rollup/plugin-replace');
16
+ exports.esBuildAdapter = createEsBuildAdapter({
17
+ plugins: [],
18
+ });
19
+ function createEsBuildAdapter(config) {
20
+ if (!config.compensateExports) {
21
+ config.compensateExports = [new RegExp('/react/')];
22
+ }
23
+ return (options) => tslib_1.__awaiter(this, void 0, void 0, function* () {
24
+ const { entryPoints, external, outdir, hash } = options;
25
+ // TODO: Do we need to prepare packages anymore as esbuild has evolved?
26
+ for (const entryPoint of entryPoints) {
27
+ const isPkg = entryPoint.fileName.includes('node_modules');
28
+ const pkgName = isPkg ? inferePkgName(entryPoint.fileName) : '';
29
+ const tmpFolder = `node_modules/.tmp/${pkgName}`;
30
+ if (isPkg) {
31
+ yield prepareNodePackage(entryPoint.fileName, external, tmpFolder, config, !!options.dev);
32
+ entryPoint.fileName = tmpFolder;
33
+ }
34
+ }
35
+ const ctx = yield esbuild.context({
36
+ entryPoints: entryPoints.map((ep) => ({
37
+ in: ep.fileName,
38
+ out: path_1.default.parse(ep.outName).name,
39
+ })),
40
+ write: false,
41
+ outdir,
42
+ entryNames: hash ? '[name]-[hash]' : '[name]',
43
+ external,
44
+ loader: config.loader,
45
+ bundle: true,
46
+ sourcemap: options.dev,
47
+ minify: !options.dev,
48
+ format: 'esm',
49
+ target: ['esnext'],
50
+ plugins: [...config.plugins],
51
+ });
52
+ const result = yield ctx.rebuild();
53
+ const writtenFiles = writeResult(result, outdir);
54
+ ctx.dispose();
55
+ return writtenFiles.map((fileName) => ({ fileName }));
56
+ // const normEntryPoint = entryPoint.replace(/\\/g, '/');
57
+ // if (
58
+ // isPkg &&
59
+ // config?.compensateExports?.find((regExp) => regExp.exec(normEntryPoint))
60
+ // ) {
61
+ // logger.verbose('compensate exports for ' + tmpFolder);
62
+ // compensateExports(tmpFolder, outfile);
63
+ // }
64
+ });
65
+ }
66
+ exports.createEsBuildAdapter = createEsBuildAdapter;
67
+ function writeResult(result, outdir) {
68
+ const outputFiles = result.outputFiles || [];
69
+ const writtenFiles = [];
70
+ for (const outFile of outputFiles) {
71
+ const fileName = path_1.default.basename(outFile.path);
72
+ const filePath = path_1.default.join(outdir, fileName);
73
+ fs.writeFileSync(filePath, outFile.text);
74
+ writtenFiles.push(filePath);
75
+ }
76
+ return writtenFiles;
77
+ }
78
+ function compensateExports(entryPoint, outfile) {
79
+ const inExports = (0, collect_exports_1.collectExports)(entryPoint);
80
+ const outExports = outfile ? (0, collect_exports_1.collectExports)(outfile) : inExports;
81
+ if (!outExports.hasDefaultExport || outExports.hasFurtherExports) {
82
+ return;
83
+ }
84
+ const defaultName = outExports.defaultExportName;
85
+ let exports = '/*Try to compensate missing exports*/\n\n';
86
+ for (const exp of inExports.exports) {
87
+ exports += `let ${exp}$softarc = ${defaultName}.${exp};\n`;
88
+ exports += `export { ${exp}$softarc as ${exp} };\n`;
89
+ }
90
+ const target = outfile !== null && outfile !== void 0 ? outfile : entryPoint;
91
+ fs.appendFileSync(target, exports, 'utf-8');
92
+ }
93
+ function prepareNodePackage(entryPoint, external, tmpFolder, config, dev) {
94
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
95
+ if (config.fileReplacements) {
96
+ entryPoint = replaceEntryPoint(entryPoint, normalize(config.fileReplacements));
97
+ }
98
+ const env = dev ? 'development' : 'production';
99
+ const result = yield (0, rollup_1.rollup)({
100
+ input: entryPoint,
101
+ plugins: [
102
+ commonjs(),
103
+ (0, rollup_plugin_node_externals_1.externals)({ include: external }),
104
+ (0, plugin_node_resolve_1.default)(),
105
+ replace({
106
+ preventAssignment: true,
107
+ values: {
108
+ 'process.env.NODE_ENV': `"${env}"`,
109
+ },
110
+ }),
111
+ ],
112
+ });
113
+ yield result.write({
114
+ format: 'esm',
115
+ file: tmpFolder,
116
+ sourcemap: dev,
117
+ exports: 'named',
118
+ });
119
+ });
120
+ }
121
+ function inferePkgName(entryPoint) {
122
+ return entryPoint
123
+ .replace(/.*?node_modules/g, '')
124
+ .replace(/[^A-Za-z0-9.]/g, '_');
125
+ }
126
+ function normalize(config) {
127
+ const result = {};
128
+ for (const key in config) {
129
+ if (typeof config[key] === 'string') {
130
+ result[key] = {
131
+ file: config[key],
132
+ };
133
+ }
134
+ else {
135
+ result[key] = config[key];
136
+ }
137
+ }
138
+ return result;
139
+ }
140
+ function replaceEntryPoint(entryPoint, fileReplacements) {
141
+ entryPoint = entryPoint.replace(/\\/g, '/');
142
+ for (const key in fileReplacements) {
143
+ entryPoint = entryPoint.replace(new RegExp(`${key}$`), fileReplacements[key].file);
144
+ }
145
+ return entryPoint;
146
+ }
133
147
  //# sourceMappingURL=adapter.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"adapter.js","sourceRoot":"","sources":["../../../../../libs/native-federation-esbuild/src/lib/adapter.ts"],"names":[],"mappings":";;;;AAAA,4DAI0C;AAC1C,mCAAmC;AACnC,mCAAgC;AAChC,qEAAkD;AAClD,+EAAyD;AACzD,uDAAmD;AACnD,yBAAyB;AAEzB,8DAA8D;AAC9D,MAAM,QAAQ,GAAG,OAAO,CAAC,yBAAyB,CAAC,CAAC;AAEpD,8DAA8D;AAC9D,MAAM,OAAO,GAAG,OAAO,CAAC,wBAAwB,CAAC,CAAC;AAErC,QAAA,cAAc,GAAiB,oBAAoB,CAAC;IAC/D,OAAO,EAAE,EAAE;CACZ,CAAC,CAAC;AAcH,SAAgB,oBAAoB,CAAC,MAA4B;IAE/D,IAAI,CAAC,MAAM,CAAC,iBAAiB,EAAE;QAC7B,MAAM,CAAC,iBAAiB,GAAG,CAAC,IAAI,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC;KACpD;IAED,OAAO,CAAO,OAA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kD;IAElD,MAAM,MAAM,GAAsC,EAAE,CAAC;IACrD,KAAK,MAAM,GAAG,IAAI,MAAM,EAAE;QACxB,IAAI,OAAO,MAAM,CAAC,GAAG,CAAC,KAAK,QAAQ,EAAE;YACnC,MAAM,CAAC,GAAG,CAAC,GAAG;gBACZ,IAAI,EAAE,MAAM,CAAC,GAAG,CAAW;aAC5B,CAAC;SACH;aAAM;YACL,MAAM,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,GAAG,CAAsB,CAAC;SAChD;KACF;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,SAAS,iBAAiB,CACxB,UAAkB,EAClB,gBAAmD;IAEnD,UAAU,GAAG,UAAU,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IAE5C,KAAK,MAAM,GAAG,IAAI,gBAAgB,EAAE;QAClC,UAAU,GAAG,UAAU,CAAC,OAAO,CAC7B,IAAI,MAAM,CAAC,GAAG,GAAG,GAAG,CAAC,EACrB,gBAAgB,CAAC,GAAG,CAAC,CAAC,IAAI,CAC3B,CAAC;KACH;IAED,OAAO,UAAU,CAAC;AACpB,CAAC"}
@@ -1,6 +1,6 @@
1
- export declare function collectExports(path: string): {
2
- hasDefaultExport: boolean;
3
- hasFurtherExports: boolean;
4
- defaultExportName: string;
5
- exports: string[];
6
- };
1
+ export declare function collectExports(path: string): {
2
+ hasDefaultExport: boolean;
3
+ hasFurtherExports: boolean;
4
+ defaultExportName: string;
5
+ exports: string[];
6
+ };
@@ -1,72 +1,73 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.collectExports = void 0;
4
- const fs = require("fs");
5
- const acorn_1 = require("acorn");
6
- function collectExports(path) {
7
- const src = fs.readFileSync(path, "utf8");
8
- const parseTree = (0, acorn_1.parse)(src, {
9
- ecmaVersion: "latest",
10
- allowHashBang: true,
11
- sourceType: "module",
12
- });
13
- let hasDefaultExport = false;
14
- let hasFurtherExports = false;
15
- let defaultExportName = "";
16
- const exports = new Set();
17
- traverse(parseTree, (node) => {
18
- var _a, _b, _c, _d;
19
- if (node.type === "AssignmentExpression" &&
20
- ((_b = (_a = node === null || node === void 0 ? void 0 : node.left) === null || _a === void 0 ? void 0 : _a.object) === null || _b === void 0 ? void 0 : _b.name) === "exports" // &&
21
- ) {
22
- exports.add((_c = node.left.property) === null || _c === void 0 ? void 0 : _c.name);
23
- return;
24
- }
25
- if (hasDefaultExport && hasFurtherExports) {
26
- return;
27
- }
28
- if (node.type !== "ExportNamedDeclaration") {
29
- return;
30
- }
31
- if (!node.specifiers) {
32
- hasFurtherExports = true;
33
- return;
34
- }
35
- for (const s of node.specifiers) {
36
- if (isDefaultExport(s)) {
37
- defaultExportName = (_d = s === null || s === void 0 ? void 0 : s.local) === null || _d === void 0 ? void 0 : _d.name;
38
- hasDefaultExport = true;
39
- }
40
- else {
41
- hasFurtherExports = true;
42
- }
43
- }
44
- });
45
- return {
46
- hasDefaultExport,
47
- hasFurtherExports,
48
- defaultExportName,
49
- exports: [...exports],
50
- };
51
- }
52
- exports.collectExports = collectExports;
53
- function traverse(node, visit) {
54
- visit(node);
55
- for (const key in node) {
56
- const prop = node[key];
57
- if (prop && typeof prop === "object") {
58
- traverse(prop, visit);
59
- }
60
- else if (Array.isArray(prop)) {
61
- for (const sub of prop) {
62
- traverse(sub, visit);
63
- }
64
- }
65
- }
66
- }
67
- function isDefaultExport(exportSpecifier) {
68
- var _a, _b;
69
- return (((_a = exportSpecifier.exported) === null || _a === void 0 ? void 0 : _a.type) === "Identifier" &&
70
- ((_b = exportSpecifier.exported) === null || _b === void 0 ? void 0 : _b.name) === "default");
71
- }
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.collectExports = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const fs = tslib_1.__importStar(require("fs"));
6
+ const acorn_1 = require("acorn");
7
+ function collectExports(path) {
8
+ const src = fs.readFileSync(path, 'utf8');
9
+ const parseTree = (0, acorn_1.parse)(src, {
10
+ ecmaVersion: 'latest',
11
+ allowHashBang: true,
12
+ sourceType: 'module',
13
+ });
14
+ let hasDefaultExport = false;
15
+ let hasFurtherExports = false;
16
+ let defaultExportName = '';
17
+ const exports = new Set();
18
+ traverse(parseTree, (node) => {
19
+ var _a, _b, _c, _d;
20
+ if (node.type === 'AssignmentExpression' &&
21
+ ((_b = (_a = node === null || node === void 0 ? void 0 : node.left) === null || _a === void 0 ? void 0 : _a.object) === null || _b === void 0 ? void 0 : _b.name) === 'exports' // &&
22
+ ) {
23
+ exports.add((_c = node.left.property) === null || _c === void 0 ? void 0 : _c.name);
24
+ return;
25
+ }
26
+ if (hasDefaultExport && hasFurtherExports) {
27
+ return;
28
+ }
29
+ if (node.type !== 'ExportNamedDeclaration') {
30
+ return;
31
+ }
32
+ if (!node.specifiers) {
33
+ hasFurtherExports = true;
34
+ return;
35
+ }
36
+ for (const s of node.specifiers) {
37
+ if (isDefaultExport(s)) {
38
+ defaultExportName = (_d = s === null || s === void 0 ? void 0 : s.local) === null || _d === void 0 ? void 0 : _d.name;
39
+ hasDefaultExport = true;
40
+ }
41
+ else {
42
+ hasFurtherExports = true;
43
+ }
44
+ }
45
+ });
46
+ return {
47
+ hasDefaultExport,
48
+ hasFurtherExports,
49
+ defaultExportName,
50
+ exports: [...exports],
51
+ };
52
+ }
53
+ exports.collectExports = collectExports;
54
+ function traverse(node, visit) {
55
+ visit(node);
56
+ for (const key in node) {
57
+ const prop = node[key];
58
+ if (prop && typeof prop === 'object') {
59
+ traverse(prop, visit);
60
+ }
61
+ else if (Array.isArray(prop)) {
62
+ for (const sub of prop) {
63
+ traverse(sub, visit);
64
+ }
65
+ }
66
+ }
67
+ }
68
+ function isDefaultExport(exportSpecifier) {
69
+ var _a, _b;
70
+ return (((_a = exportSpecifier.exported) === null || _a === void 0 ? void 0 : _a.type) === 'Identifier' &&
71
+ ((_b = exportSpecifier.exported) === null || _b === void 0 ? void 0 : _b.name) === 'default');
72
+ }
72
73
  //# sourceMappingURL=collect-exports.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"collect-exports.js","sourceRoot":"","sources":["../../../../../libs/native-federation-esbuild/src/lib/collect-exports.ts"],"names":[],"mappings":";;;AAAA,yBAAyB;AACzB,iCAA8B;AAM9B,SAAgB,cAAc,CAAC,IAAY;IACzC,MAAM,GAAG,GAAG,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IAE1C,MAAM,SAAS,GAAG,IAAA,aAAK,EAAC,GAAG,EAAE;QAC3B,WAAW,EAAE,QAAQ;QACrB,aAAa,EAAE,IAAI;QACnB,UAAU,EAAE,QAAQ;KACrB,CAAC,CAAC;IAEH,IAAI,gBAAgB,GAAG,KAAK,CAAC;IAC7B,IAAI,iBAAiB,GAAG,KAAK,CAAC;IAC9B,IAAI,iBAAiB,GAAG,EAAE,CAAC;IAC3B,MAAM,OAAO,GAAG,IAAI,GAAG,EAAU,CAAC;IAElC,QAAQ,CAAC,SAAS,EAAE,CAAC,IAAI,EAAE,EAAE;;QAC3B,IACE,IAAI,CAAC,IAAI,KAAK,sBAAsB;YACpC,CAAA,MAAA,MAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,IAAI,0CAAE,MAAM,0CAAE,IAAI,MAAK,SAAS,CAAC,KAAK;UAC5C;YACA,OAAO,CAAC,GAAG,CAAC,MAAA,IAAI,CAAC,IAAI,CAAC,QAAQ,0CAAE,IAAI,CAAC,CAAC;YACtC,OAAO;SACR;QAED,IAAI,gBAAgB,IAAI,iBAAiB,EAAE;YACzC,OAAO;SACR;QAED,IAAI,IAAI,CAAC,IAAI,KAAK,wBAAwB,EAAE;YAC1C,OAAO;SACR;QAED,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE;YACpB,iBAAiB,GAAG,IAAI,CAAC;YACzB,OAAO;SACR;QAED,KAAK,MAAM,CAAC,IAAI,IAAI,CAAC,UAAU,EAAE;YAC/B,IAAI,eAAe,CAAC,CAAC,CAAC,EAAE;gBACtB,iBAAiB,GAAG,MAAA,CAAC,aAAD,CAAC,uBAAD,CAAC,CAAE,KAAK,0CAAE,IAAI,CAAC;gBACnC,gBAAgB,GAAG,IAAI,CAAC;aACzB;iBAAM;gBACL,iBAAiB,GAAG,IAAI,CAAC;aAC1B;SACF;IACH,CAAC,CAAC,CAAC;IAEH,OAAO;QACL,gBAAgB;QAChB,iBAAiB;QACjB,iBAAiB;QACjB,OAAO,EAAE,CAAC,GAAG,OAAO,CAAC;KACtB,CAAC;AACJ,CAAC;AApDD,wCAoDC;AAED,SAAS,QAAQ,CAAC,IAAU,EAAE,KAAc;IAC1C,KAAK,CAAC,IAAI,CAAC,CAAC;IACZ,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE;QACtB,MAAM,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC;QACvB,IAAI,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;YACpC,QAAQ,CAAC,IAAY,EAAE,KAAK,CAAC,CAAC;SAC/B;aAAM,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;YAC9B,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE;gBACtB,QAAQ,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;aACtB;SACF;KACF;AACH,CAAC;AAED,SAAS,eAAe,CAAC,eAAqB;;IAC1C,OAAO,CACL,CAAA,MAAA,eAAe,CAAC,QAAQ,0CAAE,IAAI,MAAK,YAAY;QAC/C,CAAA,MAAA,eAAe,CAAC,QAAQ,0CAAE,IAAI,MAAK,SAAS,CAC7C,CAAC;AACN,CAAC"}
1
+ {"version":3,"file":"collect-exports.js","sourceRoot":"","sources":["../../../../../libs/native-federation-esbuild/src/lib/collect-exports.ts"],"names":[],"mappings":";;;;AAAA,+CAAyB;AACzB,iCAA8B;AAM9B,SAAgB,cAAc,CAAC,IAAY;IACzC,MAAM,GAAG,GAAG,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,CA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QACjB,OAAO,EAAE,CAAC,GAAG,OAAO,CAAC;KACtB,CAAC;AACJ,CAAC;AApDD,wCAoDC;AAED,SAAS,QAAQ,CAAC,IAAU,EAAE,KAAc;IAC1C,KAAK,CAAC,IAAI,CAAC,CAAC;IACZ,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE;QACtB,MAAM,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC;QACvB,IAAI,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;YACpC,QAAQ,CAAC,IAAY,EAAE,KAAK,CAAC,CAAC;SAC/B;aAAM,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;YAC9B,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE;gBACtB,QAAQ,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;aACtB;SACF;KACF;AACH,CAAC;AAED,SAAS,eAAe,CAAC,eAAqB;;IAC5C,OAAO,CACL,CAAA,MAAA,eAAe,CAAC,QAAQ,0CAAE,IAAI,MAAK,YAAY;QAC/C,CAAA,MAAA,eAAe,CAAC,QAAQ,0CAAE,IAAI,MAAK,SAAS,CAC7C,CAAC;AACJ,CAAC"}
@@ -1,2 +1,2 @@
1
- import { ReplacementConfig } from './adapter';
2
- export declare const reactReplacements: Record<string, Record<string, ReplacementConfig>>;
1
+ import { ReplacementConfig } from './adapter';
2
+ export declare const reactReplacements: Record<string, Record<string, ReplacementConfig>>;
@@ -1,34 +1,34 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.reactReplacements = void 0;
4
- exports.reactReplacements = {
5
- dev: {
6
- 'node_modules/react/index.js': {
7
- file: 'node_modules/react/cjs/react.development.js',
8
- },
9
- 'node_modules/react/jsx-dev-runtime.js': {
10
- file: 'node_modules/react/cjs/react-jsx-dev-runtime.development.js',
11
- },
12
- 'node_modules/react/jsx-runtime.js': {
13
- file: 'node_modules/react/cjs/react-jsx-runtime.development.js',
14
- },
15
- 'node_modules/react-dom/index.js': {
16
- file: 'node_modules/react-dom/cjs/react-dom.development.js'
17
- }
18
- },
19
- prod: {
20
- 'node_modules/react/index.js': {
21
- file: 'node_modules/react/cjs/react.production.min.js',
22
- },
23
- 'node_modules/react/jsx-dev-runtime.js': {
24
- file: 'node_modules/react/cjs/react-jsx-dev-runtime.production.min.js',
25
- },
26
- 'node_modules/react/jsx-runtime.js': {
27
- file: 'node_modules/react/cjs/react-jsx-runtime.production.min.js',
28
- },
29
- 'node_modules/react-dom/index.js': {
30
- file: 'node_modules/react-dom/cjs/react-dom.production.min.js'
31
- },
32
- },
33
- };
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.reactReplacements = void 0;
4
+ exports.reactReplacements = {
5
+ dev: {
6
+ 'node_modules/react/index.js': {
7
+ file: 'node_modules/react/cjs/react.development.js',
8
+ },
9
+ 'node_modules/react/jsx-dev-runtime.js': {
10
+ file: 'node_modules/react/cjs/react-jsx-dev-runtime.development.js',
11
+ },
12
+ 'node_modules/react/jsx-runtime.js': {
13
+ file: 'node_modules/react/cjs/react-jsx-runtime.development.js',
14
+ },
15
+ 'node_modules/react-dom/index.js': {
16
+ file: 'node_modules/react-dom/cjs/react-dom.development.js',
17
+ },
18
+ },
19
+ prod: {
20
+ 'node_modules/react/index.js': {
21
+ file: 'node_modules/react/cjs/react.production.min.js',
22
+ },
23
+ 'node_modules/react/jsx-dev-runtime.js': {
24
+ file: 'node_modules/react/cjs/react-jsx-dev-runtime.production.min.js',
25
+ },
26
+ 'node_modules/react/jsx-runtime.js': {
27
+ file: 'node_modules/react/cjs/react-jsx-runtime.production.min.js',
28
+ },
29
+ 'node_modules/react-dom/index.js': {
30
+ file: 'node_modules/react-dom/cjs/react-dom.production.min.js',
31
+ },
32
+ },
33
+ };
34
34
  //# sourceMappingURL=react-replacements.js.map