@rsbuild/plugin-node-polyfill 0.7.5 → 0.7.7
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/index.cjs +4 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +3 -1
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -62,6 +62,7 @@ var init_ProtocolImportsPlugin = __esm({
|
|
|
62
62
|
// src/index.ts
|
|
63
63
|
var src_exports = {};
|
|
64
64
|
__export(src_exports, {
|
|
65
|
+
PLUGIN_NODE_POLYFILL_NAME: () => PLUGIN_NODE_POLYFILL_NAME,
|
|
65
66
|
pluginNodePolyfill: () => pluginNodePolyfill
|
|
66
67
|
});
|
|
67
68
|
module.exports = __toCommonJS(src_exports);
|
|
@@ -169,10 +170,11 @@ var getProvideGlobals = async (globals) => {
|
|
|
169
170
|
}
|
|
170
171
|
return result;
|
|
171
172
|
};
|
|
173
|
+
var PLUGIN_NODE_POLYFILL_NAME = "rsbuild:node-polyfill";
|
|
172
174
|
function pluginNodePolyfill(options = {}) {
|
|
173
175
|
const { protocolImports = true } = options;
|
|
174
176
|
return {
|
|
175
|
-
name:
|
|
177
|
+
name: PLUGIN_NODE_POLYFILL_NAME,
|
|
176
178
|
setup(api) {
|
|
177
179
|
api.modifyBundlerChain(async (chain, { CHAIN_ID, isServer, bundler }) => {
|
|
178
180
|
if (isServer) {
|
|
@@ -193,5 +195,6 @@ function pluginNodePolyfill(options = {}) {
|
|
|
193
195
|
}
|
|
194
196
|
// Annotate the CommonJS export names for ESM import in node:
|
|
195
197
|
0 && (module.exports = {
|
|
198
|
+
PLUGIN_NODE_POLYFILL_NAME,
|
|
196
199
|
pluginNodePolyfill
|
|
197
200
|
});
|
package/dist/index.d.ts
CHANGED
|
@@ -21,6 +21,7 @@ type PluginNodePolyfillOptions = {
|
|
|
21
21
|
*/
|
|
22
22
|
protocolImports?: boolean;
|
|
23
23
|
};
|
|
24
|
+
declare const PLUGIN_NODE_POLYFILL_NAME = "rsbuild:node-polyfill";
|
|
24
25
|
declare function pluginNodePolyfill(options?: PluginNodePolyfillOptions): RsbuildPlugin;
|
|
25
26
|
|
|
26
|
-
export { type PluginNodePolyfillOptions, pluginNodePolyfill };
|
|
27
|
+
export { PLUGIN_NODE_POLYFILL_NAME, type PluginNodePolyfillOptions, pluginNodePolyfill };
|
package/dist/index.js
CHANGED
|
@@ -174,10 +174,11 @@ var getProvideGlobals = async (globals) => {
|
|
|
174
174
|
}
|
|
175
175
|
return result;
|
|
176
176
|
};
|
|
177
|
+
var PLUGIN_NODE_POLYFILL_NAME = "rsbuild:node-polyfill";
|
|
177
178
|
function pluginNodePolyfill(options = {}) {
|
|
178
179
|
const { protocolImports = true } = options;
|
|
179
180
|
return {
|
|
180
|
-
name:
|
|
181
|
+
name: PLUGIN_NODE_POLYFILL_NAME,
|
|
181
182
|
setup(api) {
|
|
182
183
|
api.modifyBundlerChain(async (chain, { CHAIN_ID, isServer, bundler }) => {
|
|
183
184
|
if (isServer) {
|
|
@@ -197,5 +198,6 @@ function pluginNodePolyfill(options = {}) {
|
|
|
197
198
|
};
|
|
198
199
|
}
|
|
199
200
|
export {
|
|
201
|
+
PLUGIN_NODE_POLYFILL_NAME,
|
|
200
202
|
pluginNodePolyfill
|
|
201
203
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rsbuild/plugin-node-polyfill",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.7",
|
|
4
4
|
"description": "Node polyfill plugin for Rsbuild",
|
|
5
5
|
"homepage": "https://rsbuild.dev",
|
|
6
6
|
"repository": {
|
|
@@ -49,10 +49,10 @@
|
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"typescript": "^5.4.2",
|
|
52
|
-
"@rsbuild/core": "0.7.
|
|
52
|
+
"@rsbuild/core": "0.7.7"
|
|
53
53
|
},
|
|
54
54
|
"peerDependencies": {
|
|
55
|
-
"@rsbuild/core": "^0.7.
|
|
55
|
+
"@rsbuild/core": "^0.7.7"
|
|
56
56
|
},
|
|
57
57
|
"publishConfig": {
|
|
58
58
|
"access": "public",
|