@rspack/core 0.7.1-canary-6e44e4b-20240605080608 → 0.7.1
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/builtin-plugin/index.d.ts +0 -6
- package/dist/builtin-plugin/index.js +0 -6
- package/dist/config/adapter.js +2 -3
- package/dist/config/normalization.d.ts +0 -1
- package/dist/config/zod.d.ts +0 -8
- package/dist/config/zod.js +1 -2
- package/dist/exports.d.ts +0 -3
- package/dist/exports.js +0 -7
- package/package.json +4 -4
- package/dist/builtin-plugin/RSCClientEntryRspackPlugin.d.ts +0 -10
- package/dist/builtin-plugin/RSCClientEntryRspackPlugin.js +0 -6
- package/dist/builtin-plugin/RSCClientReferenceManifestRspackPlugin.d.ts +0 -21
- package/dist/builtin-plugin/RSCClientReferenceManifestRspackPlugin.js +0 -60
- package/dist/builtin-plugin/RSCProxyRspackPlugin.d.ts +0 -12
- package/dist/builtin-plugin/RSCProxyRspackPlugin.js +0 -28
|
@@ -8,8 +8,6 @@ export * from "./BundlerInfoRspackPlugin";
|
|
|
8
8
|
export * from "./ChunkPrefetchPreloadPlugin";
|
|
9
9
|
export * from "./CommonJsChunkFormatPlugin";
|
|
10
10
|
export * from "./CopyRspackPlugin";
|
|
11
|
-
export * from "./CopyRspackPlugin";
|
|
12
|
-
export * from "./css-extract";
|
|
13
11
|
export * from "./css-extract";
|
|
14
12
|
export * from "./CssModulesPlugin";
|
|
15
13
|
export * from "./DataUriPlugin";
|
|
@@ -36,7 +34,6 @@ export * from "./IgnorePlugin";
|
|
|
36
34
|
export * from "./InferAsyncModulesPlugin";
|
|
37
35
|
export * from "./JavascriptModulesPlugin";
|
|
38
36
|
export * from "./JsLoaderRspackPlugin";
|
|
39
|
-
export * from "./JsLoaderRspackPlugin";
|
|
40
37
|
export * from "./JsonModulesPlugin";
|
|
41
38
|
export * from "./lazy-compilation/plugin";
|
|
42
39
|
export * from "./LimitChunkCountPlugin";
|
|
@@ -53,9 +50,6 @@ export * from "./ProgressPlugin";
|
|
|
53
50
|
export * from "./ProvidePlugin";
|
|
54
51
|
export * from "./RealContentHashPlugin";
|
|
55
52
|
export * from "./RemoveEmptyChunksPlugin";
|
|
56
|
-
export * from "./RSCClientEntryRspackPlugin";
|
|
57
|
-
export * from "./RSCClientReferenceManifestRspackPlugin";
|
|
58
|
-
export * from "./RSCProxyRspackPlugin";
|
|
59
53
|
export * from "./RuntimeChunkPlugin";
|
|
60
54
|
export * from "./RuntimePlugin";
|
|
61
55
|
export * from "./SideEffectsFlagPlugin";
|
|
@@ -26,8 +26,6 @@ __exportStar(require("./BundlerInfoRspackPlugin"), exports);
|
|
|
26
26
|
__exportStar(require("./ChunkPrefetchPreloadPlugin"), exports);
|
|
27
27
|
__exportStar(require("./CommonJsChunkFormatPlugin"), exports);
|
|
28
28
|
__exportStar(require("./CopyRspackPlugin"), exports);
|
|
29
|
-
__exportStar(require("./CopyRspackPlugin"), exports);
|
|
30
|
-
__exportStar(require("./css-extract"), exports);
|
|
31
29
|
__exportStar(require("./css-extract"), exports);
|
|
32
30
|
__exportStar(require("./CssModulesPlugin"), exports);
|
|
33
31
|
__exportStar(require("./DataUriPlugin"), exports);
|
|
@@ -54,7 +52,6 @@ __exportStar(require("./IgnorePlugin"), exports);
|
|
|
54
52
|
__exportStar(require("./InferAsyncModulesPlugin"), exports);
|
|
55
53
|
__exportStar(require("./JavascriptModulesPlugin"), exports);
|
|
56
54
|
__exportStar(require("./JsLoaderRspackPlugin"), exports);
|
|
57
|
-
__exportStar(require("./JsLoaderRspackPlugin"), exports);
|
|
58
55
|
__exportStar(require("./JsonModulesPlugin"), exports);
|
|
59
56
|
__exportStar(require("./lazy-compilation/plugin"), exports);
|
|
60
57
|
__exportStar(require("./LimitChunkCountPlugin"), exports);
|
|
@@ -71,9 +68,6 @@ __exportStar(require("./ProgressPlugin"), exports);
|
|
|
71
68
|
__exportStar(require("./ProvidePlugin"), exports);
|
|
72
69
|
__exportStar(require("./RealContentHashPlugin"), exports);
|
|
73
70
|
__exportStar(require("./RemoveEmptyChunksPlugin"), exports);
|
|
74
|
-
__exportStar(require("./RSCClientEntryRspackPlugin"), exports);
|
|
75
|
-
__exportStar(require("./RSCClientReferenceManifestRspackPlugin"), exports);
|
|
76
|
-
__exportStar(require("./RSCProxyRspackPlugin"), exports);
|
|
77
71
|
__exportStar(require("./RuntimeChunkPlugin"), exports);
|
|
78
72
|
__exportStar(require("./RuntimePlugin"), exports);
|
|
79
73
|
__exportStar(require("./SideEffectsFlagPlugin"), exports);
|
package/dist/config/adapter.js
CHANGED
|
@@ -603,12 +603,11 @@ function getRawSnapshotOptions(_snapshot) {
|
|
|
603
603
|
return {};
|
|
604
604
|
}
|
|
605
605
|
function getRawExperiments(experiments) {
|
|
606
|
-
const { topLevelAwait, rspackFuture
|
|
606
|
+
const { topLevelAwait, rspackFuture } = experiments;
|
|
607
607
|
(0, assert_1.default)(!(0, util_1.isNil)(topLevelAwait) && !(0, util_1.isNil)(rspackFuture));
|
|
608
608
|
return {
|
|
609
609
|
topLevelAwait,
|
|
610
|
-
rspackFuture: getRawRspackFutureOptions(rspackFuture)
|
|
611
|
-
rsc
|
|
610
|
+
rspackFuture: getRawRspackFutureOptions(rspackFuture)
|
|
612
611
|
};
|
|
613
612
|
}
|
|
614
613
|
function getRawRspackFutureOptions(_future) {
|
|
@@ -86,7 +86,6 @@ export interface ExperimentsNormalized {
|
|
|
86
86
|
css?: boolean;
|
|
87
87
|
futureDefaults?: boolean;
|
|
88
88
|
rspackFuture?: RspackFutureOptions;
|
|
89
|
-
rsc?: boolean;
|
|
90
89
|
}
|
|
91
90
|
export type IgnoreWarningsNormalized = ((warning: Error, compilation: Compilation) => boolean)[];
|
|
92
91
|
export type OptimizationRuntimeChunkNormalized = false | {
|
package/dist/config/zod.d.ts
CHANGED
|
@@ -4905,7 +4905,6 @@ declare const experiments: z.ZodObject<{
|
|
|
4905
4905
|
force?: boolean | "version"[] | undefined;
|
|
4906
4906
|
} | undefined;
|
|
4907
4907
|
}>>;
|
|
4908
|
-
rsc: z.ZodOptional<z.ZodBoolean>;
|
|
4909
4908
|
}, "strict", z.ZodTypeAny, {
|
|
4910
4909
|
lazyCompilation?: boolean | {
|
|
4911
4910
|
imports?: boolean | undefined;
|
|
@@ -4923,7 +4922,6 @@ declare const experiments: z.ZodObject<{
|
|
|
4923
4922
|
force?: boolean | "version"[] | undefined;
|
|
4924
4923
|
} | undefined;
|
|
4925
4924
|
} | undefined;
|
|
4926
|
-
rsc?: boolean | undefined;
|
|
4927
4925
|
}, {
|
|
4928
4926
|
lazyCompilation?: boolean | {
|
|
4929
4927
|
imports?: boolean | undefined;
|
|
@@ -4941,7 +4939,6 @@ declare const experiments: z.ZodObject<{
|
|
|
4941
4939
|
force?: boolean | "version"[] | undefined;
|
|
4942
4940
|
} | undefined;
|
|
4943
4941
|
} | undefined;
|
|
4944
|
-
rsc?: boolean | undefined;
|
|
4945
4942
|
}>;
|
|
4946
4943
|
export type Experiments = z.infer<typeof experiments>;
|
|
4947
4944
|
declare const watch: z.ZodBoolean;
|
|
@@ -5679,7 +5676,6 @@ export declare const rspackOptions: z.ZodObject<{
|
|
|
5679
5676
|
force?: boolean | "version"[] | undefined;
|
|
5680
5677
|
} | undefined;
|
|
5681
5678
|
}>>;
|
|
5682
|
-
rsc: z.ZodOptional<z.ZodBoolean>;
|
|
5683
5679
|
}, "strict", z.ZodTypeAny, {
|
|
5684
5680
|
lazyCompilation?: boolean | {
|
|
5685
5681
|
imports?: boolean | undefined;
|
|
@@ -5697,7 +5693,6 @@ export declare const rspackOptions: z.ZodObject<{
|
|
|
5697
5693
|
force?: boolean | "version"[] | undefined;
|
|
5698
5694
|
} | undefined;
|
|
5699
5695
|
} | undefined;
|
|
5700
|
-
rsc?: boolean | undefined;
|
|
5701
5696
|
}, {
|
|
5702
5697
|
lazyCompilation?: boolean | {
|
|
5703
5698
|
imports?: boolean | undefined;
|
|
@@ -5715,7 +5710,6 @@ export declare const rspackOptions: z.ZodObject<{
|
|
|
5715
5710
|
force?: boolean | "version"[] | undefined;
|
|
5716
5711
|
} | undefined;
|
|
5717
5712
|
} | undefined;
|
|
5718
|
-
rsc?: boolean | undefined;
|
|
5719
5713
|
}>>;
|
|
5720
5714
|
externals: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodType<RegExp, z.ZodTypeDef, RegExp>]>, z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodBoolean]>, z.ZodArray<z.ZodString, "many">]>, z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>]>>]>, z.ZodFunction<z.ZodTuple<[z.ZodObject<{
|
|
5721
5715
|
context: z.ZodOptional<z.ZodString>;
|
|
@@ -7233,7 +7227,6 @@ export declare const rspackOptions: z.ZodObject<{
|
|
|
7233
7227
|
force?: boolean | "version"[] | undefined;
|
|
7234
7228
|
} | undefined;
|
|
7235
7229
|
} | undefined;
|
|
7236
|
-
rsc?: boolean | undefined;
|
|
7237
7230
|
} | undefined;
|
|
7238
7231
|
externals?: string | RegExp | Record<string, string | boolean | string[] | Record<string, string | string[]>> | ((args_0: {
|
|
7239
7232
|
context?: string | undefined;
|
|
@@ -7683,7 +7676,6 @@ export declare const rspackOptions: z.ZodObject<{
|
|
|
7683
7676
|
force?: boolean | "version"[] | undefined;
|
|
7684
7677
|
} | undefined;
|
|
7685
7678
|
} | undefined;
|
|
7686
|
-
rsc?: boolean | undefined;
|
|
7687
7679
|
} | undefined;
|
|
7688
7680
|
externals?: string | RegExp | Record<string, string | boolean | string[] | Record<string, string | string[]>> | ((args_0: {
|
|
7689
7681
|
context?: string | undefined;
|
package/dist/config/zod.js
CHANGED
|
@@ -778,8 +778,7 @@ const experiments = zod_1.z.strictObject({
|
|
|
778
778
|
topLevelAwait: zod_1.z.boolean().optional(),
|
|
779
779
|
css: zod_1.z.boolean().optional(),
|
|
780
780
|
futureDefaults: zod_1.z.boolean().optional(),
|
|
781
|
-
rspackFuture: rspackFutureOptions.optional()
|
|
782
|
-
rsc: zod_1.z.boolean().optional()
|
|
781
|
+
rspackFuture: rspackFutureOptions.optional()
|
|
783
782
|
});
|
|
784
783
|
//#endregion
|
|
785
784
|
//#region Watch
|
package/dist/exports.d.ts
CHANGED
|
@@ -141,6 +141,3 @@ export { EvalSourceMapDevToolPlugin } from "./builtin-plugin";
|
|
|
141
141
|
export { EvalDevToolModulePlugin } from "./builtin-plugin";
|
|
142
142
|
export { CssExtractRspackPlugin } from "./builtin-plugin";
|
|
143
143
|
export type { SwcLoaderEnvConfig, SwcLoaderEsParserConfig, SwcLoaderJscConfig, SwcLoaderModuleConfig, SwcLoaderOptions, SwcLoaderParserConfig, SwcLoaderTransformConfig, SwcLoaderTsParserConfig } from "./builtin-loader/swc/index";
|
|
144
|
-
export { RSCClientEntryRspackPlugin } from "./builtin-plugin";
|
|
145
|
-
export { RSCProxyRspackPlugin } from "./builtin-plugin";
|
|
146
|
-
export { RSCClientReferenceManifestRspackPlugin } from "./builtin-plugin";
|
package/dist/exports.js
CHANGED
|
@@ -27,7 +27,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
29
|
exports.CssExtractRspackPlugin = exports.EvalDevToolModulePlugin = exports.EvalSourceMapDevToolPlugin = exports.SourceMapDevToolPlugin = exports.CopyRspackPlugin = exports.SwcCssMinimizerRspackPlugin = exports.SwcJsMinimizerRspackPlugin = exports.HtmlRspackPlugin = exports.sharing = exports.container = exports.optimize = exports.webworker = exports.javascript = exports.wasm = exports.library = exports.electron = exports.node = exports.NormalModuleReplacementPlugin = exports.LoaderTargetPlugin = exports.LoaderOptionsPlugin = exports.EnvironmentPlugin = exports.HotModuleReplacementPlugin = exports.ExternalsPlugin = exports.DynamicEntryPlugin = exports.EntryPlugin = exports.ProgressPlugin = exports.DefinePlugin = exports.ProvidePlugin = exports.IgnorePlugin = exports.BannerPlugin = exports.experimental_registerGlobalTrace = exports.experimental_cleanupGlobalTrace = exports.EntryOptionPlugin = exports.util = exports.config = exports.sources = exports.WebpackError = exports.Template = exports.ModuleFilenameHelpers = exports.Stats = exports.RuntimeGlobals = exports.NormalModule = exports.MultiStats = exports.WebpackOptionsApply = exports.RspackOptionsApply = exports.MultiCompiler = exports.Compiler = exports.Compilation = exports.version = exports.rspackVersion = void 0;
|
|
30
|
-
exports.RSCClientReferenceManifestRspackPlugin = exports.RSCProxyRspackPlugin = exports.RSCClientEntryRspackPlugin = void 0;
|
|
31
30
|
const { version: rspackVersion, webpackVersion } = require("../package.json");
|
|
32
31
|
exports.rspackVersion = rspackVersion;
|
|
33
32
|
exports.version = webpackVersion;
|
|
@@ -158,9 +157,3 @@ var builtin_plugin_25 = require("./builtin-plugin");
|
|
|
158
157
|
Object.defineProperty(exports, "EvalDevToolModulePlugin", { enumerable: true, get: function () { return builtin_plugin_25.EvalDevToolModulePlugin; } });
|
|
159
158
|
var builtin_plugin_26 = require("./builtin-plugin");
|
|
160
159
|
Object.defineProperty(exports, "CssExtractRspackPlugin", { enumerable: true, get: function () { return builtin_plugin_26.CssExtractRspackPlugin; } });
|
|
161
|
-
var builtin_plugin_27 = require("./builtin-plugin");
|
|
162
|
-
Object.defineProperty(exports, "RSCClientEntryRspackPlugin", { enumerable: true, get: function () { return builtin_plugin_27.RSCClientEntryRspackPlugin; } });
|
|
163
|
-
var builtin_plugin_28 = require("./builtin-plugin");
|
|
164
|
-
Object.defineProperty(exports, "RSCProxyRspackPlugin", { enumerable: true, get: function () { return builtin_plugin_28.RSCProxyRspackPlugin; } });
|
|
165
|
-
var builtin_plugin_29 = require("./builtin-plugin");
|
|
166
|
-
Object.defineProperty(exports, "RSCClientReferenceManifestRspackPlugin", { enumerable: true, get: function () { return builtin_plugin_29.RSCClientReferenceManifestRspackPlugin; } });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rspack/core",
|
|
3
|
-
"version": "0.7.1
|
|
3
|
+
"version": "0.7.1",
|
|
4
4
|
"webpackVersion": "5.75.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "A Fast Rust-based Web Bundler",
|
|
@@ -72,15 +72,15 @@
|
|
|
72
72
|
"watchpack": "^2.4.0",
|
|
73
73
|
"zod": "^3.21.4",
|
|
74
74
|
"zod-validation-error": "1.3.1",
|
|
75
|
-
"@rspack/
|
|
76
|
-
"@rspack/
|
|
75
|
+
"@rspack/core": "0.7.1",
|
|
76
|
+
"@rspack/plugin-minify": "^0.7.1"
|
|
77
77
|
},
|
|
78
78
|
"dependencies": {
|
|
79
79
|
"@module-federation/runtime-tools": "0.1.6",
|
|
80
80
|
"caniuse-lite": "^1.0.30001616",
|
|
81
81
|
"tapable": "2.2.1",
|
|
82
82
|
"webpack-sources": "3.2.3",
|
|
83
|
-
"@rspack/binding": "0.7.1
|
|
83
|
+
"@rspack/binding": "0.7.1"
|
|
84
84
|
},
|
|
85
85
|
"peerDependencies": {
|
|
86
86
|
"@swc/helpers": ">=0.5.1"
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { BuiltinPluginName } from "@rspack/binding";
|
|
2
|
-
export declare const RSCClientEntryRspackPlugin: {
|
|
3
|
-
new (options: any): {
|
|
4
|
-
name: BuiltinPluginName;
|
|
5
|
-
_options: any;
|
|
6
|
-
affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
|
|
7
|
-
raw(): import("@rspack/binding").BuiltinPlugin;
|
|
8
|
-
apply(compiler: import("../Compiler").Compiler): void;
|
|
9
|
-
};
|
|
10
|
-
};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RSCClientEntryRspackPlugin = void 0;
|
|
4
|
-
const binding_1 = require("@rspack/binding");
|
|
5
|
-
const base_1 = require("./base");
|
|
6
|
-
exports.RSCClientEntryRspackPlugin = (0, base_1.create)(binding_1.BuiltinPluginName.RSCClientEntryRspackPlugin, options => options, "compilation");
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import type { RawRscClientReferenceManifestRspackPluginOptions } from "@rspack/binding";
|
|
2
|
-
import type { Compiler } from "../Compiler";
|
|
3
|
-
import type { RuleSetCondition } from "../config/zod";
|
|
4
|
-
import type { RspackBuiltinPlugin } from "./base";
|
|
5
|
-
interface ResolvedOptions {
|
|
6
|
-
routes: NonNullable<RawRscClientReferenceManifestRspackPluginOptions["routes"]>;
|
|
7
|
-
entry: Record<string, string>;
|
|
8
|
-
root: string;
|
|
9
|
-
}
|
|
10
|
-
interface Options extends Pick<RawRscClientReferenceManifestRspackPluginOptions, "routes"> {
|
|
11
|
-
exclude?: RuleSetCondition;
|
|
12
|
-
}
|
|
13
|
-
export declare class RSCClientReferenceManifestRspackPlugin {
|
|
14
|
-
plugin: RspackBuiltinPlugin;
|
|
15
|
-
options: Options;
|
|
16
|
-
resolvedOptions: ResolvedOptions;
|
|
17
|
-
constructor(options?: Options);
|
|
18
|
-
apply(compiler: Compiler): void;
|
|
19
|
-
resolveOptions(compiler: Compiler): ResolvedOptions;
|
|
20
|
-
}
|
|
21
|
-
export {};
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.RSCClientReferenceManifestRspackPlugin = void 0;
|
|
7
|
-
const binding_1 = require("@rspack/binding");
|
|
8
|
-
const path_1 = __importDefault(require("path"));
|
|
9
|
-
const base_1 = require("./base");
|
|
10
|
-
const RawRSCClientReferenceManifestRspackPlugin = (0, base_1.create)(binding_1.BuiltinPluginName.RSCClientReferenceManifestRspackPlugin, () => { }, "compilation");
|
|
11
|
-
class RSCClientReferenceManifestRspackPlugin {
|
|
12
|
-
constructor(options = {}) {
|
|
13
|
-
this.plugin = new RawRSCClientReferenceManifestRspackPlugin();
|
|
14
|
-
this.options = options;
|
|
15
|
-
this.resolvedOptions = {};
|
|
16
|
-
}
|
|
17
|
-
apply(compiler) {
|
|
18
|
-
this.plugin.apply(compiler);
|
|
19
|
-
this.resolvedOptions = this.resolveOptions(compiler);
|
|
20
|
-
if (!compiler.options.module.rules) {
|
|
21
|
-
compiler.options.module.rules = [];
|
|
22
|
-
}
|
|
23
|
-
compiler.options.module.rules.push({
|
|
24
|
-
test: [/\.(j|t|mj|cj)sx?$/i],
|
|
25
|
-
exclude: this.options.exclude ?? {
|
|
26
|
-
// Exclude libraries in node_modules ...
|
|
27
|
-
and: [/node_modules/]
|
|
28
|
-
},
|
|
29
|
-
use: [
|
|
30
|
-
{
|
|
31
|
-
loader: "builtin:rsc-client-entry-loader",
|
|
32
|
-
options: this.resolvedOptions
|
|
33
|
-
}
|
|
34
|
-
]
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
resolveOptions(compiler) {
|
|
38
|
-
const entry = Object.assign({}, compiler.options.entry);
|
|
39
|
-
const resolvedEntry = {};
|
|
40
|
-
const root = compiler.options.context ?? process.cwd();
|
|
41
|
-
// TODO: support dynamic entry
|
|
42
|
-
if (typeof entry === "object") {
|
|
43
|
-
for (let item of Object.keys(entry)) {
|
|
44
|
-
const imports = entry[item].import;
|
|
45
|
-
if (imports) {
|
|
46
|
-
resolvedEntry[item] = imports[0];
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
const resolvedRoutes = this.options.routes ?? [];
|
|
51
|
-
// TODO: config output
|
|
52
|
-
const output = path_1.default.resolve(root, "./dist/server");
|
|
53
|
-
return {
|
|
54
|
-
entry: resolvedEntry,
|
|
55
|
-
root: output,
|
|
56
|
-
routes: resolvedRoutes
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
exports.RSCClientReferenceManifestRspackPlugin = RSCClientReferenceManifestRspackPlugin;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { Compiler } from "../Compiler";
|
|
2
|
-
import type { RuleSetCondition } from "../config/zod";
|
|
3
|
-
interface Options {
|
|
4
|
-
clientProxy: string;
|
|
5
|
-
exclude?: RuleSetCondition;
|
|
6
|
-
}
|
|
7
|
-
export declare class RSCProxyRspackPlugin {
|
|
8
|
-
options: Options;
|
|
9
|
-
constructor(options: Options);
|
|
10
|
-
apply(compiler: Compiler): void;
|
|
11
|
-
}
|
|
12
|
-
export {};
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RSCProxyRspackPlugin = void 0;
|
|
4
|
-
class RSCProxyRspackPlugin {
|
|
5
|
-
constructor(options) {
|
|
6
|
-
this.options = options;
|
|
7
|
-
}
|
|
8
|
-
apply(compiler) {
|
|
9
|
-
if (!compiler.options.module.rules) {
|
|
10
|
-
compiler.options.module.rules = [];
|
|
11
|
-
}
|
|
12
|
-
compiler.options.module.rules.push({
|
|
13
|
-
enforce: "post",
|
|
14
|
-
test: [/\.(j|t|mj|cj)sx?$/i],
|
|
15
|
-
exclude: this.options.exclude ?? {
|
|
16
|
-
// Exclude libraries in node_modules ...
|
|
17
|
-
and: [/node_modules/]
|
|
18
|
-
},
|
|
19
|
-
use: [
|
|
20
|
-
{
|
|
21
|
-
loader: "builtin:rsc-proxy-loader",
|
|
22
|
-
options: this.options
|
|
23
|
-
}
|
|
24
|
-
]
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
exports.RSCProxyRspackPlugin = RSCProxyRspackPlugin;
|