@module-federation/bridge-react-webpack-plugin 0.2.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/CHANGELOG.md +11 -0
- package/LICENSE +21 -0
- package/README.md +134 -0
- package/dist/index.cjs.d.ts +14 -0
- package/dist/index.cjs.js +50 -0
- package/dist/index.es.js +51 -0
- package/package.json +32 -0
- package/project.json +17 -0
- package/src/index.ts +55 -0
- package/tsconfig.json +42 -0
- package/tsconfig.node.json +11 -0
- package/vite.config.ts +24 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# @module-federation/bridge-react-webpack-plugin
|
|
2
|
+
|
|
3
|
+
## 0.2.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- d2ab821: feat(bridge): Supports exporting and loading of application-level modules (with routing), currently supports react and vue3
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- @module-federation/sdk@0.2.0
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2020 ScriptedAlchemy LLC (Zack Jackson) Zhou Shaw (zhouxiao)
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
# React Bridge
|
|
2
|
+
|
|
3
|
+
React bridge is used to load the routing module in mf, so that the routing module can work properly with the host environment.
|
|
4
|
+
|
|
5
|
+
> When to use
|
|
6
|
+
|
|
7
|
+
* Load the route module
|
|
8
|
+
* Load across the front end framework
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
## How to use
|
|
12
|
+
|
|
13
|
+
# 1. Install the react bridge library
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
pnpm add @module-federation/bridge-react
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
# 2. Configure the react bridge library
|
|
20
|
+
|
|
21
|
+
> Use createBridgeComponent create component provider
|
|
22
|
+
|
|
23
|
+
```jsx
|
|
24
|
+
// ./src/index.tsx
|
|
25
|
+
import { createBridgeComponent } from '@module-federation/bridge-react';
|
|
26
|
+
|
|
27
|
+
function App() {
|
|
28
|
+
return ( <BrowserRouter basename="/">
|
|
29
|
+
<Routes>
|
|
30
|
+
<Route path="/" Component={()=> <div>Home page</div>}>
|
|
31
|
+
<Route path="/detail" Component={()=> <div>Detail page</div>}>
|
|
32
|
+
</Routes>
|
|
33
|
+
</BrowserRouter>)
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export default createBridgeComponent({
|
|
37
|
+
rootComponent: App
|
|
38
|
+
});
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
> set alias to proxy
|
|
42
|
+
|
|
43
|
+
```js
|
|
44
|
+
//rsbuild.config.ts
|
|
45
|
+
export default defineConfig({
|
|
46
|
+
source: {
|
|
47
|
+
alias: {
|
|
48
|
+
'react-router-dom$': path.resolve(
|
|
49
|
+
__dirname,
|
|
50
|
+
'node_modules/@module-federation/bridge-react/dist/router.es.js',
|
|
51
|
+
),
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
server: {
|
|
55
|
+
port: 2001,
|
|
56
|
+
host: 'localhost',
|
|
57
|
+
},
|
|
58
|
+
dev: {
|
|
59
|
+
assetPrefix: 'http://localhost:2001',
|
|
60
|
+
},
|
|
61
|
+
tools: {
|
|
62
|
+
rspack: (config, { appendPlugins }) => {
|
|
63
|
+
delete config.optimization?.splitChunks;
|
|
64
|
+
config.output!.uniqueName = 'remote1';
|
|
65
|
+
appendPlugins([
|
|
66
|
+
new ModuleFederationPlugin({
|
|
67
|
+
name: 'remote1',
|
|
68
|
+
exposes: {
|
|
69
|
+
'./export-app': './src/index.tsx',
|
|
70
|
+
}
|
|
71
|
+
}),
|
|
72
|
+
]);
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
});
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
# 3. Load the module with routing
|
|
79
|
+
|
|
80
|
+
```js
|
|
81
|
+
//rsbuild.config.ts
|
|
82
|
+
export default defineConfig({
|
|
83
|
+
tools: {
|
|
84
|
+
rspack: (config, { appendPlugins }) => {
|
|
85
|
+
config.output!.uniqueName = 'host';
|
|
86
|
+
appendPlugins([
|
|
87
|
+
new ModuleFederationPlugin({
|
|
88
|
+
name: 'host',
|
|
89
|
+
remotes: {
|
|
90
|
+
remote1: 'remote1@http://localhost:2001/mf-manifest.json',
|
|
91
|
+
},
|
|
92
|
+
}),
|
|
93
|
+
]);
|
|
94
|
+
},
|
|
95
|
+
},
|
|
96
|
+
});
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
> Use the module
|
|
100
|
+
|
|
101
|
+
```jsx
|
|
102
|
+
// ./src/index.tsx
|
|
103
|
+
import { createBridgeComponent } from '@module-federation/bridge-react';
|
|
104
|
+
|
|
105
|
+
const Remote1 = createBridgeComponent(()=> import('remote1/export-app'));
|
|
106
|
+
|
|
107
|
+
function App() {
|
|
108
|
+
return ( <BrowserRouter basename="/">
|
|
109
|
+
<ul>
|
|
110
|
+
<li>
|
|
111
|
+
<Link to="/">
|
|
112
|
+
Home
|
|
113
|
+
</Link>
|
|
114
|
+
</li>
|
|
115
|
+
<li>
|
|
116
|
+
<Link to="/remote1">
|
|
117
|
+
Remote1
|
|
118
|
+
</Link>
|
|
119
|
+
</li>
|
|
120
|
+
</ul>
|
|
121
|
+
<Routes>
|
|
122
|
+
<Route path="/" Component={()=> <div>Home page</div>}>
|
|
123
|
+
<Route path="/remote1" Component={()=> <Remote1 />}>
|
|
124
|
+
</Routes>
|
|
125
|
+
</BrowserRouter>)
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
const root = ReactDOM.createRoot(document.getElementById('root')!);
|
|
129
|
+
root.render(
|
|
130
|
+
<App />
|
|
131
|
+
);
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { moduleFederationPlugin } from '@module-federation/sdk';
|
|
2
|
+
|
|
3
|
+
declare class ReactBridgeAliasChangerPlugin {
|
|
4
|
+
alias: string;
|
|
5
|
+
targetFile: string;
|
|
6
|
+
moduleFederationOptions: moduleFederationPlugin.ModuleFederationPluginOptions;
|
|
7
|
+
constructor(info: {
|
|
8
|
+
moduleFederationOptions: moduleFederationPlugin.ModuleFederationPluginOptions;
|
|
9
|
+
});
|
|
10
|
+
apply(compiler: any): void;
|
|
11
|
+
}
|
|
12
|
+
export default ReactBridgeAliasChangerPlugin;
|
|
13
|
+
|
|
14
|
+
export { }
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
4
|
+
var __publicField = (obj, key, value) => {
|
|
5
|
+
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
6
|
+
return value;
|
|
7
|
+
};
|
|
8
|
+
const fs = require("node:fs");
|
|
9
|
+
const path = require("node:path");
|
|
10
|
+
class ReactBridgeAliasChangerPlugin {
|
|
11
|
+
constructor(info) {
|
|
12
|
+
__publicField(this, "alias");
|
|
13
|
+
__publicField(this, "targetFile");
|
|
14
|
+
__publicField(this, "moduleFederationOptions");
|
|
15
|
+
this.moduleFederationOptions = info.moduleFederationOptions;
|
|
16
|
+
this.alias = "react-router-dom$";
|
|
17
|
+
this.targetFile = "@module-federation/bridge-react/dist/router.es.js";
|
|
18
|
+
if (this.moduleFederationOptions.shared) {
|
|
19
|
+
if (Array.isArray(this.moduleFederationOptions.shared)) {
|
|
20
|
+
if (this.moduleFederationOptions.shared.includes("react-router-dom")) {
|
|
21
|
+
throw Error(
|
|
22
|
+
"React-router-dom cannot be set to shared after react bridge is used"
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
} else {
|
|
26
|
+
if (this.moduleFederationOptions.shared["react-router-dom"]) {
|
|
27
|
+
throw Error(
|
|
28
|
+
"React-router-dom cannot be set to shared after react bridge is used"
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
apply(compiler) {
|
|
35
|
+
compiler.hooks.afterEnvironment.tap("ReactBridgeAliasPlugin", () => {
|
|
36
|
+
const nodeModulesPath = path.resolve(compiler.context, "node_modules");
|
|
37
|
+
const targetFilePath = path.join(nodeModulesPath, this.targetFile);
|
|
38
|
+
if (fs.existsSync(targetFilePath)) {
|
|
39
|
+
const originalResolve = compiler.options.resolve || {};
|
|
40
|
+
const originalAlias = originalResolve.alias || {};
|
|
41
|
+
const updatedAlias = { ...originalAlias, [this.alias]: targetFilePath };
|
|
42
|
+
compiler.options.resolve = {
|
|
43
|
+
...originalResolve,
|
|
44
|
+
alias: updatedAlias
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
module.exports = ReactBridgeAliasChangerPlugin;
|
package/dist/index.es.js
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
|
+
var __publicField = (obj, key, value) => {
|
|
4
|
+
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5
|
+
return value;
|
|
6
|
+
};
|
|
7
|
+
import fs from "node:fs";
|
|
8
|
+
import path from "node:path";
|
|
9
|
+
class ReactBridgeAliasChangerPlugin {
|
|
10
|
+
constructor(info) {
|
|
11
|
+
__publicField(this, "alias");
|
|
12
|
+
__publicField(this, "targetFile");
|
|
13
|
+
__publicField(this, "moduleFederationOptions");
|
|
14
|
+
this.moduleFederationOptions = info.moduleFederationOptions;
|
|
15
|
+
this.alias = "react-router-dom$";
|
|
16
|
+
this.targetFile = "@module-federation/bridge-react/dist/router.es.js";
|
|
17
|
+
if (this.moduleFederationOptions.shared) {
|
|
18
|
+
if (Array.isArray(this.moduleFederationOptions.shared)) {
|
|
19
|
+
if (this.moduleFederationOptions.shared.includes("react-router-dom")) {
|
|
20
|
+
throw Error(
|
|
21
|
+
"React-router-dom cannot be set to shared after react bridge is used"
|
|
22
|
+
);
|
|
23
|
+
}
|
|
24
|
+
} else {
|
|
25
|
+
if (this.moduleFederationOptions.shared["react-router-dom"]) {
|
|
26
|
+
throw Error(
|
|
27
|
+
"React-router-dom cannot be set to shared after react bridge is used"
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
apply(compiler) {
|
|
34
|
+
compiler.hooks.afterEnvironment.tap("ReactBridgeAliasPlugin", () => {
|
|
35
|
+
const nodeModulesPath = path.resolve(compiler.context, "node_modules");
|
|
36
|
+
const targetFilePath = path.join(nodeModulesPath, this.targetFile);
|
|
37
|
+
if (fs.existsSync(targetFilePath)) {
|
|
38
|
+
const originalResolve = compiler.options.resolve || {};
|
|
39
|
+
const originalAlias = originalResolve.alias || {};
|
|
40
|
+
const updatedAlias = { ...originalAlias, [this.alias]: targetFilePath };
|
|
41
|
+
compiler.options.resolve = {
|
|
42
|
+
...originalResolve,
|
|
43
|
+
alias: updatedAlias
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
export {
|
|
50
|
+
ReactBridgeAliasChangerPlugin as default
|
|
51
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@module-federation/bridge-react-webpack-plugin",
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"publishConfig": {
|
|
5
|
+
"access": "public"
|
|
6
|
+
},
|
|
7
|
+
"author": "zhouxiao <codingzx@gmail.com>",
|
|
8
|
+
"main": "./dist/index.cjs.js",
|
|
9
|
+
"module": "./dist/index.esm.js",
|
|
10
|
+
"types": "./dist/index.cjs.d.ts",
|
|
11
|
+
"exports": {
|
|
12
|
+
".": {
|
|
13
|
+
"types": "./dist/index.cjs.d.ts",
|
|
14
|
+
"import": "./dist/index.esm.js",
|
|
15
|
+
"require": "./dist/index.cjs.js"
|
|
16
|
+
},
|
|
17
|
+
"./*": "./*"
|
|
18
|
+
},
|
|
19
|
+
"dependencies": {
|
|
20
|
+
"@module-federation/sdk": "0.2.0"
|
|
21
|
+
},
|
|
22
|
+
"devDependencies": {
|
|
23
|
+
"typescript": "^5.2.2",
|
|
24
|
+
"vite": "^5.2.0",
|
|
25
|
+
"vite-plugin-dts": "^3.9.1"
|
|
26
|
+
},
|
|
27
|
+
"scripts": {
|
|
28
|
+
"dev": "vite",
|
|
29
|
+
"build": "vite build",
|
|
30
|
+
"preview": "vite preview"
|
|
31
|
+
}
|
|
32
|
+
}
|
package/project.json
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "bridge-react-webpack-plugin",
|
|
3
|
+
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
|
4
|
+
"sourceRoot": "packages/bridge/bridge-react-webpack-plugin/src",
|
|
5
|
+
"projectType": "library",
|
|
6
|
+
"targets": {
|
|
7
|
+
"build": {
|
|
8
|
+
"executor": "nx:run-commands",
|
|
9
|
+
"options": {
|
|
10
|
+
"commands": [
|
|
11
|
+
"npm run build --prefix packages/bridge/bridge-react-webpack-plugin"
|
|
12
|
+
]
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"tags": ["type:pkg"]
|
|
17
|
+
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import fs from 'node:fs';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
import type { moduleFederationPlugin } from '@module-federation/sdk';
|
|
4
|
+
|
|
5
|
+
class ReactBridgeAliasChangerPlugin {
|
|
6
|
+
alias: string;
|
|
7
|
+
targetFile: string;
|
|
8
|
+
moduleFederationOptions: moduleFederationPlugin.ModuleFederationPluginOptions;
|
|
9
|
+
constructor(info: {
|
|
10
|
+
moduleFederationOptions: moduleFederationPlugin.ModuleFederationPluginOptions;
|
|
11
|
+
}) {
|
|
12
|
+
this.moduleFederationOptions = info.moduleFederationOptions;
|
|
13
|
+
this.alias = 'react-router-dom$';
|
|
14
|
+
this.targetFile = '@module-federation/bridge-react/dist/router.es.js';
|
|
15
|
+
if (this.moduleFederationOptions.shared) {
|
|
16
|
+
if (Array.isArray(this.moduleFederationOptions.shared)) {
|
|
17
|
+
if (this.moduleFederationOptions.shared.includes('react-router-dom')) {
|
|
18
|
+
throw Error(
|
|
19
|
+
'React-router-dom cannot be set to shared after react bridge is used',
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
} else {
|
|
23
|
+
if (this.moduleFederationOptions.shared['react-router-dom']) {
|
|
24
|
+
throw Error(
|
|
25
|
+
'React-router-dom cannot be set to shared after react bridge is used',
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
apply(compiler: any) {
|
|
33
|
+
compiler.hooks.afterEnvironment.tap('ReactBridgeAliasPlugin', () => {
|
|
34
|
+
// Gets the path to the node_modules directory
|
|
35
|
+
const nodeModulesPath = path.resolve(compiler.context, 'node_modules');
|
|
36
|
+
const targetFilePath = path.join(nodeModulesPath, this.targetFile);
|
|
37
|
+
|
|
38
|
+
if (fs.existsSync(targetFilePath)) {
|
|
39
|
+
const originalResolve = compiler.options.resolve || {};
|
|
40
|
+
const originalAlias = originalResolve.alias || {};
|
|
41
|
+
|
|
42
|
+
// Update alias
|
|
43
|
+
const updatedAlias = { ...originalAlias, [this.alias]: targetFilePath };
|
|
44
|
+
|
|
45
|
+
// Update the webpack configuration
|
|
46
|
+
compiler.options.resolve = {
|
|
47
|
+
...originalResolve,
|
|
48
|
+
alias: updatedAlias,
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export default ReactBridgeAliasChangerPlugin;
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"useDefineForClassFields": true,
|
|
4
|
+
|
|
5
|
+
/* Bundler mode */
|
|
6
|
+
"allowImportingTsExtensions": true,
|
|
7
|
+
"resolveJsonModule": true,
|
|
8
|
+
|
|
9
|
+
"declarationDir": "./dist/types",
|
|
10
|
+
"rootDir": "./src",
|
|
11
|
+
"module": "commonjs",
|
|
12
|
+
"target": "es5",
|
|
13
|
+
|
|
14
|
+
/* Linting */
|
|
15
|
+
"noUnusedLocals": true,
|
|
16
|
+
"noUnusedParameters": true,
|
|
17
|
+
"noFallthroughCasesInSwitch": true,
|
|
18
|
+
"declaration": true,
|
|
19
|
+
"emitDeclarationOnly": true,
|
|
20
|
+
"outDir": "dist",
|
|
21
|
+
"skipLibCheck": true,
|
|
22
|
+
"strict": true,
|
|
23
|
+
"moduleResolution": "node",
|
|
24
|
+
"lib": ["esnext", "dom"],
|
|
25
|
+
"jsx": "preserve",
|
|
26
|
+
"esModuleInterop": true,
|
|
27
|
+
"allowSyntheticDefaultImports": true,
|
|
28
|
+
"sourceMap": true,
|
|
29
|
+
"baseUrl": ".",
|
|
30
|
+
"paths": {
|
|
31
|
+
"@/*": ["src/*"]
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"include": [
|
|
35
|
+
"src/**/*.ts",
|
|
36
|
+
"src/**/*.tsx",
|
|
37
|
+
"src/**/*.vue",
|
|
38
|
+
"src/remoteApp.tsx",
|
|
39
|
+
"src/create.ts"
|
|
40
|
+
],
|
|
41
|
+
"references": [{ "path": "./tsconfig.node.json" }]
|
|
42
|
+
}
|
package/vite.config.ts
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { defineConfig } from 'vite';
|
|
2
|
+
import path from 'path';
|
|
3
|
+
import dts from 'vite-plugin-dts';
|
|
4
|
+
|
|
5
|
+
export default defineConfig({
|
|
6
|
+
plugins: [
|
|
7
|
+
dts({
|
|
8
|
+
rollupTypes: true,
|
|
9
|
+
}),
|
|
10
|
+
],
|
|
11
|
+
build: {
|
|
12
|
+
lib: {
|
|
13
|
+
entry: {
|
|
14
|
+
index: path.resolve(__dirname, 'src/index.ts'),
|
|
15
|
+
},
|
|
16
|
+
formats: ['cjs', 'es'],
|
|
17
|
+
fileName: (format, entryName) => `${entryName}.${format}.js`,
|
|
18
|
+
},
|
|
19
|
+
rollupOptions: {
|
|
20
|
+
external: ['node:fs', 'node:path'],
|
|
21
|
+
},
|
|
22
|
+
minify: false,
|
|
23
|
+
},
|
|
24
|
+
});
|