@module-federation/treeshake-server 0.0.1 → 0.23.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/bin/treeshake-server.js +35 -0
- package/dist/domain/build/normalize-config.d.ts +1 -0
- package/dist/frontend/index.html +1 -1
- package/dist/frontend/static/js/{954.dfe166a3.js → 296.084d1b43.js} +2 -2
- package/dist/frontend/static/js/async/873.21368adc.js +2 -0
- package/dist/frontend/static/js/async/{987.6bf8e9b0.js → 987.86ff6794.js} +2 -2
- package/dist/frontend/static/js/{index.db4e73c6.js → index.5488f626.js} +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +96 -46
- package/dist/index.mjs +92 -44
- package/dist/server.js +94 -44
- package/dist/server.mjs +91 -43
- package/dist/services/buildService.d.ts +2 -2
- package/dist/services/uploadService.d.ts +1 -1
- package/dist/template/re-shake-share/package.json +2 -2
- package/package.json +18 -11
- package/dist/frontend/static/js/async/873.6ccd5409.js +0 -2
- /package/dist/frontend/static/js/{954.dfe166a3.js.LICENSE.txt → 296.084d1b43.js.LICENSE.txt} +0 -0
- /package/dist/frontend/static/js/async/{987.6bf8e9b0.js.LICENSE.txt → 987.86ff6794.js.LICENSE.txt} +0 -0
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Wrapper entry for the CLI.
|
|
4
|
+
*
|
|
5
|
+
* pnpm creates workspace bins during install. If the target is a build artifact
|
|
6
|
+
* (e.g. dist/server.js) and the package hasn't been built yet, install fails
|
|
7
|
+
* with ENOENT. This wrapper keeps installs clean, and still runs the built
|
|
8
|
+
* server when it's available.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
const path = require('path');
|
|
12
|
+
|
|
13
|
+
const entry = path.join(__dirname, '..', 'dist', 'server.js');
|
|
14
|
+
|
|
15
|
+
try {
|
|
16
|
+
// eslint-disable-next-line import/no-dynamic-require, global-require
|
|
17
|
+
require(entry);
|
|
18
|
+
} catch (err) {
|
|
19
|
+
// If dist hasn't been built yet, show a helpful message and exit.
|
|
20
|
+
if (err && (err.code === 'MODULE_NOT_FOUND' || err.code === 'ENOENT')) {
|
|
21
|
+
// eslint-disable-next-line no-console
|
|
22
|
+
console.error(
|
|
23
|
+
[
|
|
24
|
+
'treeshake-server: missing build output at dist/server.js.',
|
|
25
|
+
'',
|
|
26
|
+
'Run:',
|
|
27
|
+
' pnpm --filter @module-federation/treeshake-server build',
|
|
28
|
+
'',
|
|
29
|
+
].join('\n'),
|
|
30
|
+
);
|
|
31
|
+
process.exit(1);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
throw err;
|
|
35
|
+
}
|
package/dist/frontend/index.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><link rel="icon" href="/tree-shaking/favicon.ico"><title>Tree Shaking Visualizer</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><script defer src="/tree-shaking/static/js/lib-react.c59642e3.js"></script><script defer src="/tree-shaking/static/js/lib-router.75e1e689.js"></script><script defer src="/tree-shaking/static/js/
|
|
1
|
+
<!DOCTYPE html><html><head><link rel="icon" href="/tree-shaking/favicon.ico"><title>Tree Shaking Visualizer</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><script defer src="/tree-shaking/static/js/lib-react.c59642e3.js"></script><script defer src="/tree-shaking/static/js/lib-router.75e1e689.js"></script><script defer src="/tree-shaking/static/js/296.084d1b43.js"></script><script defer src="/tree-shaking/static/js/index.5488f626.js"></script><link href="/tree-shaking/static/css/index.16175e0f.css" rel="stylesheet"></head><body><div id="root"></div></body></html>
|