@rsbuild/plugin-node-polyfill 0.7.10 → 1.0.0-alpha.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.
@@ -0,0 +1,4 @@
1
+ import type { Rspack } from '@rsbuild/core';
2
+ export declare class ProtocolImportsPlugin {
3
+ apply(compiler: Rspack.Compiler): void;
4
+ }
package/dist/index.d.ts CHANGED
@@ -1,10 +1,9 @@
1
- import { RsbuildPlugin } from '@rsbuild/core';
2
-
1
+ import type { RsbuildPlugin } from '@rsbuild/core';
3
2
  type Globals = {
4
3
  process?: boolean;
5
4
  Buffer?: boolean;
6
5
  };
7
- type PluginNodePolyfillOptions = {
6
+ export type PluginNodePolyfillOptions = {
8
7
  /**
9
8
  * Whether to provide polyfill of globals.
10
9
  * @default
@@ -21,7 +20,6 @@ type PluginNodePolyfillOptions = {
21
20
  */
22
21
  protocolImports?: boolean;
23
22
  };
24
- declare const PLUGIN_NODE_POLYFILL_NAME = "rsbuild:node-polyfill";
25
- declare function pluginNodePolyfill(options?: PluginNodePolyfillOptions): RsbuildPlugin;
26
-
27
- export { PLUGIN_NODE_POLYFILL_NAME, type PluginNodePolyfillOptions, pluginNodePolyfill };
23
+ export declare const PLUGIN_NODE_POLYFILL_NAME = "rsbuild:node-polyfill";
24
+ export declare function pluginNodePolyfill(options?: PluginNodePolyfillOptions): RsbuildPlugin;
25
+ export {};
package/dist/index.js CHANGED
@@ -18,11 +18,11 @@ var __export = (target, all) => {
18
18
  __defProp(target, name, { get: all[name], enumerable: true });
19
19
  };
20
20
 
21
- // ../../node_modules/.pnpm/@modern-js+module-tools@2.52.0_eslint@9.5.0_typescript@5.4.5/node_modules/@modern-js/module-tools/shims/esm.js
21
+ // ../../node_modules/.pnpm/@modern-js+module-tools@2.54.5_eslint@9.6.0_typescript@5.5.2/node_modules/@modern-js/module-tools/shims/esm.js
22
22
  import { fileURLToPath } from "url";
23
23
  import path from "path";
24
24
  var init_esm = __esm({
25
- "../../node_modules/.pnpm/@modern-js+module-tools@2.52.0_eslint@9.5.0_typescript@5.4.5/node_modules/@modern-js/module-tools/shims/esm.js"() {
25
+ "../../node_modules/.pnpm/@modern-js+module-tools@2.54.5_eslint@9.6.0_typescript@5.5.2/node_modules/@modern-js/module-tools/shims/esm.js"() {
26
26
  "use strict";
27
27
  }
28
28
  });
package/dist/libs.d.ts ADDED
@@ -0,0 +1,38 @@
1
+ export declare const assert: string;
2
+ export declare const buffer: string;
3
+ export declare const child_process: null;
4
+ export declare const cluster: null;
5
+ export declare const console: string;
6
+ export declare const constants: string;
7
+ export declare const crypto: string;
8
+ export declare const dgram: null;
9
+ export declare const dns: null;
10
+ export declare const domain: string;
11
+ export declare const events: string;
12
+ export declare const fs: null;
13
+ export declare const http: string;
14
+ export declare const https: string;
15
+ export declare const module: null;
16
+ export declare const net: null;
17
+ export declare const os: string;
18
+ export declare const path: string;
19
+ export declare const punycode: string;
20
+ export declare const process: string;
21
+ export declare const querystring: string;
22
+ export declare const readline: null;
23
+ export declare const repl: null;
24
+ export declare const stream: string;
25
+ export declare const _stream_duplex: string;
26
+ export declare const _stream_passthrough: string;
27
+ export declare const _stream_readable: string;
28
+ export declare const _stream_transform: string;
29
+ export declare const _stream_writable: string;
30
+ export declare const string_decoder: string;
31
+ export declare const sys: string;
32
+ export declare const timers: string;
33
+ export declare const tls: null;
34
+ export declare const tty: string;
35
+ export declare const url: string;
36
+ export declare const util: string;
37
+ export declare const vm: string;
38
+ export declare const zlib: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rsbuild/plugin-node-polyfill",
3
- "version": "0.7.10",
3
+ "version": "1.0.0-alpha.0",
4
4
  "description": "Node polyfill plugin for Rsbuild",
5
5
  "homepage": "https://rsbuild.dev",
6
6
  "repository": {
@@ -48,11 +48,11 @@
48
48
  "vm-browserify": "^1.1.2"
49
49
  },
50
50
  "devDependencies": {
51
- "typescript": "^5.4.2",
52
- "@rsbuild/core": "0.7.10"
51
+ "typescript": "^5.5.2",
52
+ "@rsbuild/core": "1.0.0-alpha.0"
53
53
  },
54
54
  "peerDependencies": {
55
- "@rsbuild/core": "^0.7.10"
55
+ "@rsbuild/core": "^1.0.0-alpha.0"
56
56
  },
57
57
  "publishConfig": {
58
58
  "access": "public",