@powerlines/plugin-rspack 0.5.492 → 0.5.493
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/{build-B8svWKBw.d.cts → build-ByqTToh7.d.mts} +1 -1
- package/dist/build-ByqTToh7.d.mts.map +1 -0
- package/dist/{build-yAGe0Dv9.d.mts → build-C-Cfo3wK.d.cts} +1 -1
- package/dist/build-C-Cfo3wK.d.cts.map +1 -0
- package/dist/index.cjs +39 -12
- package/dist/index.d.cts +9 -6
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +9 -6
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +10 -8
- package/dist/index.mjs.map +1 -1
- package/dist/types/build.d.cts +1 -1
- package/dist/types/build.d.mts +1 -1
- package/dist/types/index.cjs +2 -0
- package/dist/types/index.d.cts +2 -2
- package/dist/types/index.d.mts +2 -2
- package/dist/types/index.mjs +3 -0
- package/dist/types/plugin.d.cts +19 -2
- package/dist/types/plugin.d.cts.map +1 -0
- package/dist/types/plugin.d.mts +19 -2
- package/dist/types/plugin.d.mts.map +1 -0
- package/package.json +7 -5
- package/dist/build-B8svWKBw.d.cts.map +0 -1
- package/dist/build-yAGe0Dv9.d.mts.map +0 -1
- package/dist/helpers/index.cjs +0 -6
- package/dist/helpers/index.d.cts +0 -3
- package/dist/helpers/index.d.mts +0 -3
- package/dist/helpers/index.mjs +0 -4
- package/dist/helpers/resolve-options.cjs +0 -4
- package/dist/helpers/resolve-options.d.cts +0 -2
- package/dist/helpers/resolve-options.d.mts +0 -2
- package/dist/helpers/resolve-options.mjs +0 -37
- package/dist/helpers/resolve-options.mjs.map +0 -1
- package/dist/helpers/unplugin.cjs +0 -18
- package/dist/helpers/unplugin.d.cts +0 -2
- package/dist/helpers/unplugin.d.mts +0 -2
- package/dist/helpers/unplugin.mjs +0 -17
- package/dist/helpers/unplugin.mjs.map +0 -1
- package/dist/plugin-B3EYM2p9.d.mts +0 -19
- package/dist/plugin-B3EYM2p9.d.mts.map +0 -1
- package/dist/plugin-CxAN1Lu0.d.cts +0 -19
- package/dist/plugin-CxAN1Lu0.d.cts.map +0 -1
- package/dist/resolve-options-2T46cfhr.d.cts +0 -14
- package/dist/resolve-options-2T46cfhr.d.cts.map +0 -1
- package/dist/resolve-options-BDVDHrY7.d.mts +0 -14
- package/dist/resolve-options-BDVDHrY7.d.mts.map +0 -1
- package/dist/resolve-options-CJDieEiZ.cjs +0 -75
- package/dist/unplugin-BtVdLDiN.d.cts +0 -8
- package/dist/unplugin-BtVdLDiN.d.cts.map +0 -1
- package/dist/unplugin-DijznS91.d.mts +0 -8
- package/dist/unplugin-DijznS91.d.mts.map +0 -1
|
@@ -5,4 +5,4 @@ type RspackOptions = Omit<Configuration, "name" | "entry" | "entryPoints" | "tsc
|
|
|
5
5
|
declare type __ΩRspackOptions = any[];
|
|
6
6
|
//#endregion
|
|
7
7
|
export { __ΩRspackOptions as n, RspackOptions as t };
|
|
8
|
-
//# sourceMappingURL=build-
|
|
8
|
+
//# sourceMappingURL=build-ByqTToh7.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build-ByqTToh7.d.mts","names":[],"sources":["../src/types/build.ts"],"mappings":";;;KAoBY,aAAA,GAAgB,IAAI,CAC9B,aAAA;AAAA"}
|
|
@@ -5,4 +5,4 @@ type RspackOptions = Omit<Configuration, "name" | "entry" | "entryPoints" | "tsc
|
|
|
5
5
|
declare type __ΩRspackOptions = any[];
|
|
6
6
|
//#endregion
|
|
7
7
|
export { __ΩRspackOptions as n, RspackOptions as t };
|
|
8
|
-
//# sourceMappingURL=build-
|
|
8
|
+
//# sourceMappingURL=build-C-Cfo3wK.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build-C-Cfo3wK.d.cts","names":[],"sources":["../src/types/build.ts"],"mappings":";;;KAoBY,aAAA,GAAgB,IAAI,CAC9B,aAAA;AAAA"}
|
package/dist/index.cjs
CHANGED
|
@@ -1,12 +1,38 @@
|
|
|
1
1
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
//#region \0rolldown/runtime.js
|
|
3
|
+
var __create = Object.create;
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
8
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
12
|
+
key = keys[i];
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except) {
|
|
14
|
+
__defProp(to, key, {
|
|
15
|
+
get: ((k) => from[k]).bind(null, key),
|
|
16
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
return to;
|
|
22
|
+
};
|
|
23
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
24
|
+
value: mod,
|
|
25
|
+
enumerable: true
|
|
26
|
+
}) : target, mod));
|
|
27
|
+
|
|
28
|
+
//#endregion
|
|
29
|
+
let _powerlines_core = require("@powerlines/core");
|
|
30
|
+
let _powerlines_unplugin_rspack = require("@powerlines/unplugin/rspack");
|
|
7
31
|
let _rspack_core = require("@rspack/core");
|
|
8
32
|
let defu = require("defu");
|
|
9
|
-
defu =
|
|
33
|
+
defu = __toESM(defu, 1);
|
|
34
|
+
let powerlines_plugin_utils = require("powerlines/plugin-utils");
|
|
35
|
+
let unplugin = require("unplugin");
|
|
10
36
|
|
|
11
37
|
//#region src/index.ts
|
|
12
38
|
/**
|
|
@@ -27,18 +53,19 @@ const plugin = (options = {}) => {
|
|
|
27
53
|
const options = (0, defu.default)({ entry: this.entry.reduce((ret, entry) => {
|
|
28
54
|
ret[entry.output || entry.name || entry.file] = entry.file;
|
|
29
55
|
return ret;
|
|
30
|
-
}, {}) },
|
|
56
|
+
}, {}) }, (0, _powerlines_unplugin_rspack.resolveOptions)(this), { plugins: [(0, unplugin.createRspackPlugin)((0, _powerlines_core.createUnplugin)(this, {
|
|
57
|
+
silenceHookLogging: true,
|
|
58
|
+
name: "rspack"
|
|
59
|
+
}))()] });
|
|
31
60
|
this.debug({
|
|
32
61
|
meta: { category: "config" },
|
|
33
|
-
message: `Resolved Rspack configuration: \n${(0,
|
|
62
|
+
message: `Resolved Rspack configuration: \n${(0, powerlines_plugin_utils.formatConfig)(options)}`
|
|
34
63
|
});
|
|
35
|
-
(0, _rspack_core.rspack)(options);
|
|
64
|
+
(0, _rspack_core.rspack)([options]);
|
|
36
65
|
}
|
|
37
66
|
};
|
|
38
67
|
};
|
|
39
68
|
|
|
40
69
|
//#endregion
|
|
41
|
-
exports.createRspackPlugin = require_helpers_unplugin.createRspackPlugin;
|
|
42
70
|
exports.default = plugin;
|
|
43
|
-
exports.plugin = plugin;
|
|
44
|
-
exports.resolveOptions = require_resolve_options.resolveOptions;
|
|
71
|
+
exports.plugin = plugin;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,14 +1,17 @@
|
|
|
1
|
-
import { t as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { t as createRspackPlugin } from "./unplugin-BtVdLDiN.cjs";
|
|
5
|
-
import { Plugin } from "@powerlines/core";
|
|
1
|
+
import { n as __ΩRspackOptions, t as RspackOptions } from "./build-C-Cfo3wK.cjs";
|
|
2
|
+
import { RspackPluginContext, RspackPluginOptions, RspackPluginResolvedConfig, RspackPluginUserConfig, __ΩRspackPluginContext, __ΩRspackPluginOptions, __ΩRspackPluginResolvedConfig, __ΩRspackPluginUserConfig } from "./types/plugin.cjs";
|
|
3
|
+
import { Plugin } from "powerlines";
|
|
6
4
|
|
|
7
5
|
//#region src/index.d.ts
|
|
6
|
+
declare module "powerlines" {
|
|
7
|
+
interface Config {
|
|
8
|
+
rspack?: RspackPluginOptions;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
8
11
|
/**
|
|
9
12
|
* A Powerlines plugin to assist in developing other Powerlines plugins.
|
|
10
13
|
*/
|
|
11
14
|
declare const plugin: <TContext extends RspackPluginContext = RspackPluginContext>(options?: RspackPluginOptions) => Plugin<TContext>;
|
|
12
15
|
//#endregion
|
|
13
|
-
export { RspackOptions, RspackPluginContext, RspackPluginOptions, RspackPluginResolvedConfig, RspackPluginUserConfig, __ΩRspackOptions, __ΩRspackPluginContext, __ΩRspackPluginOptions, __ΩRspackPluginResolvedConfig, __ΩRspackPluginUserConfig,
|
|
16
|
+
export { type RspackOptions, type RspackPluginContext, type RspackPluginOptions, type RspackPluginResolvedConfig, type RspackPluginUserConfig, type __ΩRspackOptions, type __ΩRspackPluginContext, type __ΩRspackPluginOptions, type __ΩRspackPluginResolvedConfig, type __ΩRspackPluginUserConfig, plugin as default, plugin };
|
|
14
17
|
//# sourceMappingURL=index.d.cts.map
|
package/dist/index.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.ts"],"mappings":";;;;;;YA8BY,MAAA;IACR,MAAA,GAAS,mBAAmB;EAAA;AAAA;;;;cAOnB,MAAA,oBACM,mBAAA,GAAsB,mBAAA,EAEvC,OAAA,GAAS,mBAAA,KACR,MAAA,CAAO,QAAA"}
|
package/dist/index.d.mts
CHANGED
|
@@ -1,14 +1,17 @@
|
|
|
1
|
-
import { t as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { t as createRspackPlugin } from "./unplugin-DijznS91.mjs";
|
|
5
|
-
import { Plugin } from "@powerlines/core";
|
|
1
|
+
import { n as __ΩRspackOptions, t as RspackOptions } from "./build-ByqTToh7.mjs";
|
|
2
|
+
import { RspackPluginContext, RspackPluginOptions, RspackPluginResolvedConfig, RspackPluginUserConfig, __ΩRspackPluginContext, __ΩRspackPluginOptions, __ΩRspackPluginResolvedConfig, __ΩRspackPluginUserConfig } from "./types/plugin.mjs";
|
|
3
|
+
import { Plugin } from "powerlines";
|
|
6
4
|
|
|
7
5
|
//#region src/index.d.ts
|
|
6
|
+
declare module "powerlines" {
|
|
7
|
+
interface Config {
|
|
8
|
+
rspack?: RspackPluginOptions;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
8
11
|
/**
|
|
9
12
|
* A Powerlines plugin to assist in developing other Powerlines plugins.
|
|
10
13
|
*/
|
|
11
14
|
declare const plugin: <TContext extends RspackPluginContext = RspackPluginContext>(options?: RspackPluginOptions) => Plugin<TContext>;
|
|
12
15
|
//#endregion
|
|
13
|
-
export { RspackOptions, RspackPluginContext, RspackPluginOptions, RspackPluginResolvedConfig, RspackPluginUserConfig, __ΩRspackOptions, __ΩRspackPluginContext, __ΩRspackPluginOptions, __ΩRspackPluginResolvedConfig, __ΩRspackPluginUserConfig,
|
|
16
|
+
export { type RspackOptions, type RspackPluginContext, type RspackPluginOptions, type RspackPluginResolvedConfig, type RspackPluginUserConfig, type __ΩRspackOptions, type __ΩRspackPluginContext, type __ΩRspackPluginOptions, type __ΩRspackPluginResolvedConfig, type __ΩRspackPluginUserConfig, plugin as default, plugin };
|
|
14
17
|
//# sourceMappingURL=index.d.mts.map
|
package/dist/index.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"mappings":";;;;;;YA8BY,MAAA;IACR,MAAA,GAAS,mBAAmB;EAAA;AAAA;;;;cAOnB,MAAA,oBACM,mBAAA,GAAsB,mBAAA,EAEvC,OAAA,GAAS,mBAAA,KACR,MAAA,CAAO,QAAA"}
|
package/dist/index.mjs
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import "./helpers/index.mjs";
|
|
4
|
-
import "./types/index.mjs";
|
|
5
|
-
import { formatConfig } from "@powerlines/core/plugin-utils";
|
|
1
|
+
import { createUnplugin } from "@powerlines/core";
|
|
2
|
+
import { resolveOptions } from "@powerlines/unplugin/rspack";
|
|
6
3
|
import { rspack } from "@rspack/core";
|
|
7
4
|
import defu from "defu";
|
|
5
|
+
import { formatConfig } from "powerlines/plugin-utils";
|
|
6
|
+
import { createRspackPlugin } from "unplugin";
|
|
8
7
|
|
|
9
8
|
//#region src/index.ts
|
|
10
9
|
/**
|
|
@@ -25,16 +24,19 @@ const plugin = (options = {}) => {
|
|
|
25
24
|
const options = defu({ entry: this.entry.reduce((ret, entry) => {
|
|
26
25
|
ret[entry.output || entry.name || entry.file] = entry.file;
|
|
27
26
|
return ret;
|
|
28
|
-
}, {}) }, resolveOptions(this), { plugins: [createRspackPlugin(this
|
|
27
|
+
}, {}) }, resolveOptions(this), { plugins: [createRspackPlugin(createUnplugin(this, {
|
|
28
|
+
silenceHookLogging: true,
|
|
29
|
+
name: "rspack"
|
|
30
|
+
}))()] });
|
|
29
31
|
this.debug({
|
|
30
32
|
meta: { category: "config" },
|
|
31
33
|
message: `Resolved Rspack configuration: \n${formatConfig(options)}`
|
|
32
34
|
});
|
|
33
|
-
rspack(options);
|
|
35
|
+
rspack([options]);
|
|
34
36
|
}
|
|
35
37
|
};
|
|
36
38
|
};
|
|
37
39
|
|
|
38
40
|
//#endregion
|
|
39
|
-
export {
|
|
41
|
+
export { plugin as default, plugin };
|
|
40
42
|
//# sourceMappingURL=index.mjs.map
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":[],"sources":["../src/index.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport {
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../src/index.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { createUnplugin } from \"@powerlines/core\";\nimport { resolveOptions } from \"@powerlines/unplugin/rspack\";\nimport { rspack as build, MultiRspackOptions } from \"@rspack/core\";\nimport defu from \"defu\";\nimport type { Plugin } from \"powerlines\";\nimport { formatConfig } from \"powerlines/plugin-utils\";\nimport { createRspackPlugin } from \"unplugin\";\nimport type { RspackPluginContext, RspackPluginOptions } from \"./types/plugin\";\n\nexport type * from \"./types\";\n\ndeclare module \"powerlines\" {\n interface Config {\n rspack?: RspackPluginOptions;\n }\n}\n\n/**\n * A Powerlines plugin to assist in developing other Powerlines plugins.\n */\nexport const plugin = <\n TContext extends RspackPluginContext = RspackPluginContext\n>(\n options: RspackPluginOptions = {}\n): Plugin<TContext> => {\n return {\n name: \"rspack\",\n config() {\n this.debug(\n \"Providing default configuration for the Powerlines `rspack` build plugin.\"\n );\n\n return {\n build: {\n ...options,\n variant: \"rspack\"\n }\n };\n },\n async build() {\n this.debug(\"Starting Rspack build process...\");\n\n const options = defu(\n {\n entry: this.entry.reduce(\n (ret, entry) => {\n ret[entry.output || entry.name || entry.file] = entry.file;\n\n return ret;\n },\n {} as Record<string, string>\n )\n },\n resolveOptions(this),\n {\n plugins: [\n createRspackPlugin(\n createUnplugin(this, {\n silenceHookLogging: true,\n name: \"rspack\"\n })\n )()\n ]\n }\n );\n\n this.debug({\n meta: {\n category: \"config\"\n },\n message: `Resolved Rspack configuration: \\n${formatConfig(options)}`\n });\n\n build([options] as MultiRspackOptions);\n }\n };\n};\n\nexport default plugin;\n"],"mappings":";;;;;;;;;;;AAsCA,MAAa,UAGX,UAA+B,CAAC,MACX;CACrB,OAAO;EACL,MAAM;EACN,SAAS;GACP,KAAK,MACH,2EACF;GAEA,OAAO,EACL,OAAO;IACL,GAAG;IACH,SAAS;GACX,EACF;EACF;EACA,MAAM,QAAQ;GACZ,KAAK,MAAM,kCAAkC;GAE7C,MAAM,UAAU,KACd,EACE,OAAO,KAAK,MAAM,QACf,KAAK,UAAU;IACd,IAAI,MAAM,UAAU,MAAM,QAAQ,MAAM,QAAQ,MAAM;IAEtD,OAAO;GACT,GACA,CAAC,CACH,EACF,GACA,eAAe,IAAI,GACnB,EACE,SAAS,CACP,mBACE,eAAe,MAAM;IACnB,oBAAoB;IACpB,MAAM;GACR,CAAC,CACH,EAAE,CACJ,EACF,CACF;GAEA,KAAK,MAAM;IACT,MAAM,EACJ,UAAU,SACZ;IACA,SAAS,oCAAoC,aAAa,OAAO;GACnE,CAAC;GAED,OAAM,CAAC,OAAO,CAAuB;EACvC;CACF;AACF"}
|
package/dist/types/build.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as __ΩRspackOptions, t as RspackOptions } from "../build-
|
|
1
|
+
import { n as __ΩRspackOptions, t as RspackOptions } from "../build-C-Cfo3wK.cjs";
|
|
2
2
|
export { RspackOptions, __ΩRspackOptions };
|
package/dist/types/build.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as __ΩRspackOptions, t as RspackOptions } from "../build-
|
|
1
|
+
import { n as __ΩRspackOptions, t as RspackOptions } from "../build-ByqTToh7.mjs";
|
|
2
2
|
export { RspackOptions, __ΩRspackOptions };
|
package/dist/types/index.cjs
CHANGED
package/dist/types/index.d.cts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { n as __ΩRspackOptions, t as RspackOptions } from "../build-
|
|
2
|
-
import {
|
|
1
|
+
import { n as __ΩRspackOptions, t as RspackOptions } from "../build-C-Cfo3wK.cjs";
|
|
2
|
+
import { RspackPluginContext, RspackPluginOptions, RspackPluginResolvedConfig, RspackPluginUserConfig, __ΩRspackPluginContext, __ΩRspackPluginOptions, __ΩRspackPluginResolvedConfig, __ΩRspackPluginUserConfig } from "./plugin.cjs";
|
|
3
3
|
export { RspackOptions, RspackPluginContext, RspackPluginOptions, RspackPluginResolvedConfig, RspackPluginUserConfig, __ΩRspackOptions, __ΩRspackPluginContext, __ΩRspackPluginOptions, __ΩRspackPluginResolvedConfig, __ΩRspackPluginUserConfig };
|
package/dist/types/index.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { n as __ΩRspackOptions, t as RspackOptions } from "../build-
|
|
2
|
-
import {
|
|
1
|
+
import { n as __ΩRspackOptions, t as RspackOptions } from "../build-ByqTToh7.mjs";
|
|
2
|
+
import { RspackPluginContext, RspackPluginOptions, RspackPluginResolvedConfig, RspackPluginUserConfig, __ΩRspackPluginContext, __ΩRspackPluginOptions, __ΩRspackPluginResolvedConfig, __ΩRspackPluginUserConfig } from "./plugin.mjs";
|
|
3
3
|
export { RspackOptions, RspackPluginContext, RspackPluginOptions, RspackPluginResolvedConfig, RspackPluginUserConfig, __ΩRspackOptions, __ΩRspackPluginContext, __ΩRspackPluginOptions, __ΩRspackPluginResolvedConfig, __ΩRspackPluginUserConfig };
|
package/dist/types/index.mjs
CHANGED
package/dist/types/plugin.d.cts
CHANGED
|
@@ -1,2 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { t as RspackOptions } from "../build-C-Cfo3wK.cjs";
|
|
2
|
+
import { PluginContext, ResolvedConfig, UserConfig } from "powerlines";
|
|
3
|
+
|
|
4
|
+
//#region src/types/plugin.d.ts
|
|
5
|
+
type RspackPluginOptions = Partial<RspackOptions>;
|
|
6
|
+
interface RspackPluginUserConfig extends UserConfig {
|
|
7
|
+
rspack?: RspackPluginOptions;
|
|
8
|
+
}
|
|
9
|
+
interface RspackPluginResolvedConfig extends ResolvedConfig {
|
|
10
|
+
rspack: RspackOptions;
|
|
11
|
+
}
|
|
12
|
+
type RspackPluginContext<TResolvedConfig extends RspackPluginResolvedConfig = RspackPluginResolvedConfig> = PluginContext<TResolvedConfig>;
|
|
13
|
+
declare type __ΩRspackPluginOptions = any[];
|
|
14
|
+
declare type __ΩRspackPluginUserConfig = any[];
|
|
15
|
+
declare type __ΩRspackPluginResolvedConfig = any[];
|
|
16
|
+
declare type __ΩRspackPluginContext = any[];
|
|
17
|
+
//#endregion
|
|
18
|
+
export { RspackPluginContext, RspackPluginOptions, RspackPluginResolvedConfig, RspackPluginUserConfig, __ΩRspackPluginContext, __ΩRspackPluginOptions, __ΩRspackPluginResolvedConfig, __ΩRspackPluginUserConfig };
|
|
19
|
+
//# sourceMappingURL=plugin.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.d.cts","names":[],"sources":["../../src/types/plugin.ts"],"mappings":";;;;KAqBY,mBAAA,GAAsB,OAAO,CAAC,aAAA;AAAA,UAEzB,sBAAA,SAA+B,UAAU;EACxD,MAAA,GAAS,mBAAA;AAAA;AAAA,UAGM,0BAAA,SAAmC,cAAc;EAChE,MAAA,EAAQ,aAAA;AAAA;AAAA,KAGE,mBAAA,yBACc,0BAAA,GACtB,0BAAA,IACA,aAAA,CAAc,eAAA;AAAA"}
|
package/dist/types/plugin.d.mts
CHANGED
|
@@ -1,2 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { t as RspackOptions } from "../build-ByqTToh7.mjs";
|
|
2
|
+
import { PluginContext, ResolvedConfig, UserConfig } from "powerlines";
|
|
3
|
+
|
|
4
|
+
//#region src/types/plugin.d.ts
|
|
5
|
+
type RspackPluginOptions = Partial<RspackOptions>;
|
|
6
|
+
interface RspackPluginUserConfig extends UserConfig {
|
|
7
|
+
rspack?: RspackPluginOptions;
|
|
8
|
+
}
|
|
9
|
+
interface RspackPluginResolvedConfig extends ResolvedConfig {
|
|
10
|
+
rspack: RspackOptions;
|
|
11
|
+
}
|
|
12
|
+
type RspackPluginContext<TResolvedConfig extends RspackPluginResolvedConfig = RspackPluginResolvedConfig> = PluginContext<TResolvedConfig>;
|
|
13
|
+
declare type __ΩRspackPluginOptions = any[];
|
|
14
|
+
declare type __ΩRspackPluginUserConfig = any[];
|
|
15
|
+
declare type __ΩRspackPluginResolvedConfig = any[];
|
|
16
|
+
declare type __ΩRspackPluginContext = any[];
|
|
17
|
+
//#endregion
|
|
18
|
+
export { RspackPluginContext, RspackPluginOptions, RspackPluginResolvedConfig, RspackPluginUserConfig, __ΩRspackPluginContext, __ΩRspackPluginOptions, __ΩRspackPluginResolvedConfig, __ΩRspackPluginUserConfig };
|
|
19
|
+
//# sourceMappingURL=plugin.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.d.mts","names":[],"sources":["../../src/types/plugin.ts"],"mappings":";;;;KAqBY,mBAAA,GAAsB,OAAO,CAAC,aAAA;AAAA,UAEzB,sBAAA,SAA+B,UAAU;EACxD,MAAA,GAAS,mBAAA;AAAA;AAAA,UAGM,0BAAA,SAAmC,cAAc;EAChE,MAAA,EAAQ,aAAA;AAAA;AAAA,KAGE,mBAAA,yBACc,0BAAA,GACtB,0BAAA,IACA,aAAA,CAAc,eAAA;AAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerlines/plugin-rspack",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.493",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "A package containing a Powerlines plugin to build projects using Webpack.",
|
|
6
6
|
"keywords": ["rspack", "powerlines", "storm-software", "powerlines-plugin"],
|
|
@@ -73,15 +73,17 @@
|
|
|
73
73
|
"typings": "dist/index.d.mts",
|
|
74
74
|
"files": ["dist"],
|
|
75
75
|
"dependencies": {
|
|
76
|
-
"@powerlines/core": "^0.15.
|
|
77
|
-
"@powerlines/unplugin": "^0.0.
|
|
76
|
+
"@powerlines/core": "^0.15.19",
|
|
77
|
+
"@powerlines/unplugin": "^0.0.34",
|
|
78
78
|
"@stryke/helpers": "^0.10.16",
|
|
79
79
|
"@stryke/path": "^0.29.3",
|
|
80
|
-
"defu": "^6.1.7"
|
|
80
|
+
"defu": "^6.1.7",
|
|
81
|
+
"powerlines": "^0.47.41",
|
|
82
|
+
"unplugin": "^3.0.0"
|
|
81
83
|
},
|
|
82
84
|
"devDependencies": { "@rspack/core": "^1.7.11", "@types/node": "^25.8.0" },
|
|
83
85
|
"peerDependencies": { "@rspack/core": ">=1.5.0" },
|
|
84
86
|
"peerDependenciesMeta": { "@rspack/core": { "optional": false } },
|
|
85
87
|
"publishConfig": { "access": "public" },
|
|
86
|
-
"gitHead": "
|
|
88
|
+
"gitHead": "b5c7361d0ca942652f98baf11488435c7918fd65"
|
|
87
89
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"build-B8svWKBw.d.cts","names":[],"sources":["../src/types/build.ts"],"mappings":";;;KAoBY,aAAA,GAAgB,IAAA,CAC1B,aAAA;AAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"build-yAGe0Dv9.d.mts","names":[],"sources":["../src/types/build.ts"],"mappings":";;;KAoBY,aAAA,GAAgB,IAAA,CAC1B,aAAA;AAAA"}
|
package/dist/helpers/index.cjs
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_resolve_options = require('../resolve-options-CJDieEiZ.cjs');
|
|
3
|
-
const require_helpers_unplugin = require('./unplugin.cjs');
|
|
4
|
-
|
|
5
|
-
exports.createRspackPlugin = require_helpers_unplugin.createRspackPlugin;
|
|
6
|
-
exports.resolveOptions = require_resolve_options.resolveOptions;
|
package/dist/helpers/index.d.cts
DELETED
package/dist/helpers/index.d.mts
DELETED
package/dist/helpers/index.mjs
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import defu from "defu";
|
|
2
|
-
import { joinPaths } from "@stryke/path/join-paths";
|
|
3
|
-
|
|
4
|
-
//#region src/helpers/resolve-options.ts
|
|
5
|
-
/**
|
|
6
|
-
* Resolves the options for [rspack](https://rspack.rs/).
|
|
7
|
-
*
|
|
8
|
-
* @param context - The build context.
|
|
9
|
-
* @returns The resolved options.
|
|
10
|
-
*/
|
|
11
|
-
function resolveOptions(context) {
|
|
12
|
-
return defu({ resolve: { alias: context.alias } }, context.config.rspack ? context.config.rspack : {}, {
|
|
13
|
-
external: context.config.resolve.external,
|
|
14
|
-
noExternal: context.config.resolve.noExternal,
|
|
15
|
-
skipNodeModulesBundle: context.config.resolve.skipNodeModulesBundle
|
|
16
|
-
}, {
|
|
17
|
-
output: { path: context.config.output.path },
|
|
18
|
-
name: context.config.name,
|
|
19
|
-
node: context.config.platform === "node" ? {
|
|
20
|
-
__dirname: true,
|
|
21
|
-
__filename: true,
|
|
22
|
-
global: true
|
|
23
|
-
} : false,
|
|
24
|
-
mode: context.config.mode === "development" ? "development" : "production",
|
|
25
|
-
recordsInputPath: joinPaths(context.cachePath, "rspack", ".rspack-records.json"),
|
|
26
|
-
recordsOutputPath: joinPaths(context.cachePath, "rspack", ".rspack-records.json"),
|
|
27
|
-
context: joinPaths(context.config.cwd, context.config.root),
|
|
28
|
-
noExternal: context.builtins,
|
|
29
|
-
cache: context.config.mode === "development",
|
|
30
|
-
devtool: context.config.output.sourceMap ? "source-map" : false,
|
|
31
|
-
optimization: { minimize: context.config.output.minify }
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
//#endregion
|
|
36
|
-
export { resolveOptions };
|
|
37
|
-
//# sourceMappingURL=resolve-options.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"resolve-options.mjs","names":[],"sources":["../../src/helpers/resolve-options.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { Context } from \"@powerlines/core\";\nimport type { Configuration as ExternalRspackOptions } from \"@rspack/core\";\nimport { joinPaths } from \"@stryke/path/join-paths\";\nimport defu from \"defu\";\nimport { RspackPluginResolvedConfig } from \"../types\";\n\n/**\n * Resolves the options for [rspack](https://rspack.rs/).\n *\n * @param context - The build context.\n * @returns The resolved options.\n */\nexport function resolveOptions(context: Context): ExternalRspackOptions {\n return defu(\n {\n resolve: {\n alias: context.alias\n }\n },\n (context.config as RspackPluginResolvedConfig).rspack\n ? (context.config as RspackPluginResolvedConfig).rspack\n : {},\n {\n external: context.config.resolve.external,\n noExternal: context.config.resolve.noExternal,\n skipNodeModulesBundle: context.config.resolve.skipNodeModulesBundle\n },\n {\n output: {\n path: context.config.output.path\n },\n name: context.config.name,\n node:\n context.config.platform === \"node\"\n ? {\n __dirname: true,\n __filename: true,\n global: true\n }\n : false,\n mode:\n context.config.mode === \"development\"\n ? (\"development\" as const)\n : (\"production\" as const),\n recordsInputPath: joinPaths(\n context.cachePath,\n \"rspack\",\n \".rspack-records.json\"\n ),\n recordsOutputPath: joinPaths(\n context.cachePath,\n \"rspack\",\n \".rspack-records.json\"\n ),\n context: joinPaths(context.config.cwd, context.config.root),\n noExternal: context.builtins,\n cache: context.config.mode === \"development\",\n devtool: context.config.output.sourceMap ? \"source-map\" : false,\n optimization: {\n minimize: context.config.output.minify\n }\n }\n ) as ExternalRspackOptions;\n}\n"],"mappings":";;;;;;;;;;AA8BA,SAAgB,eAAe,SAAyC;AACtE,QAAO,KACL,EACE,SAAS,EACP,OAAO,QAAQ,OAChB,EACF,EACA,QAAQ,OAAsC,SAC1C,QAAQ,OAAsC,SAC/C,EAAE,EACN;EACE,UAAU,QAAQ,OAAO,QAAQ;EACjC,YAAY,QAAQ,OAAO,QAAQ;EACnC,uBAAuB,QAAQ,OAAO,QAAQ;EAC/C,EACD;EACE,QAAQ,EACN,MAAM,QAAQ,OAAO,OAAO,MAC7B;EACD,MAAM,QAAQ,OAAO;EACrB,MACE,QAAQ,OAAO,aAAa,SACxB;GACE,WAAW;GACX,YAAY;GACZ,QAAQ;GACT,GACD;EACN,MACE,QAAQ,OAAO,SAAS,gBACnB,gBACA;EACP,kBAAkB,UAChB,QAAQ,WACR,UACA,uBACD;EACD,mBAAmB,UACjB,QAAQ,WACR,UACA,uBACD;EACD,SAAS,UAAU,QAAQ,OAAO,KAAK,QAAQ,OAAO,KAAK;EAC3D,YAAY,QAAQ;EACpB,OAAO,QAAQ,OAAO,SAAS;EAC/B,SAAS,QAAQ,OAAO,OAAO,YAAY,eAAe;EAC1D,cAAc,EACZ,UAAU,QAAQ,OAAO,OAAO,QACjC;EACF,CACF"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_resolve_options = require('../resolve-options-CJDieEiZ.cjs');
|
|
3
|
-
let _powerlines_core_lib_unplugin = require("@powerlines/core/lib/unplugin");
|
|
4
|
-
let unplugin = require("unplugin");
|
|
5
|
-
|
|
6
|
-
//#region src/helpers/unplugin.ts
|
|
7
|
-
function createRspackPlugin(context) {
|
|
8
|
-
return (0, unplugin.createRspackPlugin)((0, _powerlines_core_lib_unplugin.createUnplugin)(context, {
|
|
9
|
-
silenceHookLogging: true,
|
|
10
|
-
name: "rspack"
|
|
11
|
-
}))({
|
|
12
|
-
...context.options,
|
|
13
|
-
...context.config.initialConfig
|
|
14
|
-
});
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
//#endregion
|
|
18
|
-
exports.createRspackPlugin = createRspackPlugin;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { createUnplugin } from "@powerlines/core/lib/unplugin";
|
|
2
|
-
import { createRspackPlugin as createRspackPlugin$1 } from "unplugin";
|
|
3
|
-
|
|
4
|
-
//#region src/helpers/unplugin.ts
|
|
5
|
-
function createRspackPlugin(context) {
|
|
6
|
-
return createRspackPlugin$1(createUnplugin(context, {
|
|
7
|
-
silenceHookLogging: true,
|
|
8
|
-
name: "rspack"
|
|
9
|
-
}))({
|
|
10
|
-
...context.options,
|
|
11
|
-
...context.config.initialConfig
|
|
12
|
-
});
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
//#endregion
|
|
16
|
-
export { createRspackPlugin };
|
|
17
|
-
//# sourceMappingURL=unplugin.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"unplugin.mjs","names":["createRspackUnplugin"],"sources":["../../src/helpers/unplugin.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { createUnplugin } from \"@powerlines/core/lib/unplugin\";\nimport { createRspackPlugin as createRspackUnplugin } from \"unplugin\";\nimport { RspackPluginContext } from \"../types/plugin\";\n\nexport function createRspackPlugin(context: RspackPluginContext) {\n return createRspackUnplugin(\n createUnplugin(context, { silenceHookLogging: true, name: \"rspack\" })\n )({ ...context.options, ...context.config.initialConfig });\n}\n"],"mappings":";;;;AAsBA,SAAgB,mBAAmB,SAA8B;AAC/D,QAAOA,qBACL,eAAe,SAAS;EAAE,oBAAoB;EAAM,MAAM;EAAU,CAAC,CACtE,CAAC;EAAE,GAAG,QAAQ;EAAS,GAAG,QAAQ,OAAO;EAAe,CAAC"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { t as RspackOptions } from "./build-yAGe0Dv9.mjs";
|
|
2
|
-
import { PluginContext, ResolvedConfig, UserConfig } from "@powerlines/core";
|
|
3
|
-
|
|
4
|
-
//#region src/types/plugin.d.ts
|
|
5
|
-
type RspackPluginOptions = Partial<RspackOptions>;
|
|
6
|
-
interface RspackPluginUserConfig extends UserConfig {
|
|
7
|
-
rspack?: RspackPluginOptions;
|
|
8
|
-
}
|
|
9
|
-
interface RspackPluginResolvedConfig extends ResolvedConfig {
|
|
10
|
-
rspack: RspackOptions;
|
|
11
|
-
}
|
|
12
|
-
type RspackPluginContext<TResolvedConfig extends RspackPluginResolvedConfig = RspackPluginResolvedConfig> = PluginContext<TResolvedConfig>;
|
|
13
|
-
declare type __ΩRspackPluginOptions = any[];
|
|
14
|
-
declare type __ΩRspackPluginUserConfig = any[];
|
|
15
|
-
declare type __ΩRspackPluginResolvedConfig = any[];
|
|
16
|
-
declare type __ΩRspackPluginContext = any[];
|
|
17
|
-
//#endregion
|
|
18
|
-
export { __ΩRspackPluginContext as a, __ΩRspackPluginUserConfig as c, RspackPluginUserConfig as i, RspackPluginOptions as n, __ΩRspackPluginOptions as o, RspackPluginResolvedConfig as r, __ΩRspackPluginResolvedConfig as s, RspackPluginContext as t };
|
|
19
|
-
//# sourceMappingURL=plugin-B3EYM2p9.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-B3EYM2p9.d.mts","names":[],"sources":["../src/types/plugin.ts"],"mappings":";;;;KAqBY,mBAAA,GAAsB,OAAA,CAAQ,aAAA;AAAA,UAEzB,sBAAA,SAA+B,UAAA;EAC9C,MAAA,GAAS,mBAAA;AAAA;AAAA,UAGM,0BAAA,SAAmC,cAAA;EAClD,MAAA,EAAQ,aAAA;AAAA;AAAA,KAGE,mBAAA,yBACc,0BAAA,GACtB,0BAAA,IACA,aAAA,CAAc,eAAA;AAAA"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { t as RspackOptions } from "./build-B8svWKBw.cjs";
|
|
2
|
-
import { PluginContext, ResolvedConfig, UserConfig } from "@powerlines/core";
|
|
3
|
-
|
|
4
|
-
//#region src/types/plugin.d.ts
|
|
5
|
-
type RspackPluginOptions = Partial<RspackOptions>;
|
|
6
|
-
interface RspackPluginUserConfig extends UserConfig {
|
|
7
|
-
rspack?: RspackPluginOptions;
|
|
8
|
-
}
|
|
9
|
-
interface RspackPluginResolvedConfig extends ResolvedConfig {
|
|
10
|
-
rspack: RspackOptions;
|
|
11
|
-
}
|
|
12
|
-
type RspackPluginContext<TResolvedConfig extends RspackPluginResolvedConfig = RspackPluginResolvedConfig> = PluginContext<TResolvedConfig>;
|
|
13
|
-
declare type __ΩRspackPluginOptions = any[];
|
|
14
|
-
declare type __ΩRspackPluginUserConfig = any[];
|
|
15
|
-
declare type __ΩRspackPluginResolvedConfig = any[];
|
|
16
|
-
declare type __ΩRspackPluginContext = any[];
|
|
17
|
-
//#endregion
|
|
18
|
-
export { __ΩRspackPluginContext as a, __ΩRspackPluginUserConfig as c, RspackPluginUserConfig as i, RspackPluginOptions as n, __ΩRspackPluginOptions as o, RspackPluginResolvedConfig as r, __ΩRspackPluginResolvedConfig as s, RspackPluginContext as t };
|
|
19
|
-
//# sourceMappingURL=plugin-CxAN1Lu0.d.cts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-CxAN1Lu0.d.cts","names":[],"sources":["../src/types/plugin.ts"],"mappings":";;;;KAqBY,mBAAA,GAAsB,OAAA,CAAQ,aAAA;AAAA,UAEzB,sBAAA,SAA+B,UAAA;EAC9C,MAAA,GAAS,mBAAA;AAAA;AAAA,UAGM,0BAAA,SAAmC,cAAA;EAClD,MAAA,EAAQ,aAAA;AAAA;AAAA,KAGE,mBAAA,yBACc,0BAAA,GACtB,0BAAA,IACA,aAAA,CAAc,eAAA;AAAA"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { Context } from "@powerlines/core";
|
|
2
|
-
import { Configuration } from "@rspack/core";
|
|
3
|
-
|
|
4
|
-
//#region src/helpers/resolve-options.d.ts
|
|
5
|
-
/**
|
|
6
|
-
* Resolves the options for [rspack](https://rspack.rs/).
|
|
7
|
-
*
|
|
8
|
-
* @param context - The build context.
|
|
9
|
-
* @returns The resolved options.
|
|
10
|
-
*/
|
|
11
|
-
declare function resolveOptions(context: Context): Configuration;
|
|
12
|
-
//#endregion
|
|
13
|
-
export { resolveOptions as t };
|
|
14
|
-
//# sourceMappingURL=resolve-options-2T46cfhr.d.cts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"resolve-options-2T46cfhr.d.cts","names":[],"sources":["../src/helpers/resolve-options.ts"],"mappings":";;;;;;AA8BA;;;;iBAAgB,cAAA,CAAe,OAAA,EAAS,OAAA,GAAU,aAAA"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { Configuration } from "@rspack/core";
|
|
2
|
-
import { Context } from "@powerlines/core";
|
|
3
|
-
|
|
4
|
-
//#region src/helpers/resolve-options.d.ts
|
|
5
|
-
/**
|
|
6
|
-
* Resolves the options for [rspack](https://rspack.rs/).
|
|
7
|
-
*
|
|
8
|
-
* @param context - The build context.
|
|
9
|
-
* @returns The resolved options.
|
|
10
|
-
*/
|
|
11
|
-
declare function resolveOptions(context: Context): Configuration;
|
|
12
|
-
//#endregion
|
|
13
|
-
export { resolveOptions as t };
|
|
14
|
-
//# sourceMappingURL=resolve-options-BDVDHrY7.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"resolve-options-BDVDHrY7.d.mts","names":[],"sources":["../src/helpers/resolve-options.ts"],"mappings":";;;;;;AA8BA;;;;iBAAgB,cAAA,CAAe,OAAA,EAAS,OAAA,GAAU,aAAA"}
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
//#region \0rolldown/runtime.js
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __copyProps = (to, from, except, desc) => {
|
|
9
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
10
|
-
for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
11
|
-
key = keys[i];
|
|
12
|
-
if (!__hasOwnProp.call(to, key) && key !== except) {
|
|
13
|
-
__defProp(to, key, {
|
|
14
|
-
get: ((k) => from[k]).bind(null, key),
|
|
15
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
return to;
|
|
21
|
-
};
|
|
22
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
23
|
-
value: mod,
|
|
24
|
-
enumerable: true
|
|
25
|
-
}) : target, mod));
|
|
26
|
-
|
|
27
|
-
//#endregion
|
|
28
|
-
let defu = require("defu");
|
|
29
|
-
defu = __toESM(defu, 1);
|
|
30
|
-
let _stryke_path_join_paths = require("@stryke/path/join-paths");
|
|
31
|
-
|
|
32
|
-
//#region src/helpers/resolve-options.ts
|
|
33
|
-
/**
|
|
34
|
-
* Resolves the options for [rspack](https://rspack.rs/).
|
|
35
|
-
*
|
|
36
|
-
* @param context - The build context.
|
|
37
|
-
* @returns The resolved options.
|
|
38
|
-
*/
|
|
39
|
-
function resolveOptions(context) {
|
|
40
|
-
return (0, defu.default)({ resolve: { alias: context.alias } }, context.config.rspack ? context.config.rspack : {}, {
|
|
41
|
-
external: context.config.resolve.external,
|
|
42
|
-
noExternal: context.config.resolve.noExternal,
|
|
43
|
-
skipNodeModulesBundle: context.config.resolve.skipNodeModulesBundle
|
|
44
|
-
}, {
|
|
45
|
-
output: { path: context.config.output.path },
|
|
46
|
-
name: context.config.name,
|
|
47
|
-
node: context.config.platform === "node" ? {
|
|
48
|
-
__dirname: true,
|
|
49
|
-
__filename: true,
|
|
50
|
-
global: true
|
|
51
|
-
} : false,
|
|
52
|
-
mode: context.config.mode === "development" ? "development" : "production",
|
|
53
|
-
recordsInputPath: (0, _stryke_path_join_paths.joinPaths)(context.cachePath, "rspack", ".rspack-records.json"),
|
|
54
|
-
recordsOutputPath: (0, _stryke_path_join_paths.joinPaths)(context.cachePath, "rspack", ".rspack-records.json"),
|
|
55
|
-
context: (0, _stryke_path_join_paths.joinPaths)(context.config.cwd, context.config.root),
|
|
56
|
-
noExternal: context.builtins,
|
|
57
|
-
cache: context.config.mode === "development",
|
|
58
|
-
devtool: context.config.output.sourceMap ? "source-map" : false,
|
|
59
|
-
optimization: { minimize: context.config.output.minify }
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
//#endregion
|
|
64
|
-
Object.defineProperty(exports, '__toESM', {
|
|
65
|
-
enumerable: true,
|
|
66
|
-
get: function () {
|
|
67
|
-
return __toESM;
|
|
68
|
-
}
|
|
69
|
-
});
|
|
70
|
-
Object.defineProperty(exports, 'resolveOptions', {
|
|
71
|
-
enumerable: true,
|
|
72
|
-
get: function () {
|
|
73
|
-
return resolveOptions;
|
|
74
|
-
}
|
|
75
|
-
});
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { t as RspackPluginContext } from "./plugin-CxAN1Lu0.cjs";
|
|
2
|
-
import * as _$unplugin from "unplugin";
|
|
3
|
-
|
|
4
|
-
//#region src/helpers/unplugin.d.ts
|
|
5
|
-
declare function createRspackPlugin(context: RspackPluginContext): _$unplugin.RspackPluginInstance;
|
|
6
|
-
//#endregion
|
|
7
|
-
export { createRspackPlugin as t };
|
|
8
|
-
//# sourceMappingURL=unplugin-BtVdLDiN.d.cts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"unplugin-BtVdLDiN.d.cts","names":[],"sources":["../src/helpers/unplugin.ts"],"mappings":";;;;iBAsBgB,kBAAA,CAAmB,OAAA,EAAS,mBAAA,GAAmB,UAAA,CAAA,oBAAA"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { t as RspackPluginContext } from "./plugin-B3EYM2p9.mjs";
|
|
2
|
-
import * as _$unplugin from "unplugin";
|
|
3
|
-
|
|
4
|
-
//#region src/helpers/unplugin.d.ts
|
|
5
|
-
declare function createRspackPlugin$1(context: RspackPluginContext): _$unplugin.RspackPluginInstance;
|
|
6
|
-
//#endregion
|
|
7
|
-
export { createRspackPlugin$1 as t };
|
|
8
|
-
//# sourceMappingURL=unplugin-DijznS91.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"unplugin-DijznS91.d.mts","names":[],"sources":["../src/helpers/unplugin.ts"],"mappings":";;;;iBAsBgB,oBAAA,CAAmB,OAAA,EAAS,mBAAA,GAAmB,UAAA,CAAA,oBAAA"}
|