@powerlines/plugin-rspack 0.5.344 → 0.5.345
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/README.md +14 -16
- package/dist/{build-BFd9LRNQ.d.cts → build-B8svWKBw.d.cts} +1 -1
- package/dist/build-B8svWKBw.d.cts.map +1 -0
- package/dist/{build-BceJYVLj.d.mts → build-yAGe0Dv9.d.mts} +1 -1
- package/dist/build-yAGe0Dv9.d.mts.map +1 -0
- package/dist/helpers/index.cjs +4 -4
- package/dist/helpers/index.d.cts +2 -4
- package/dist/helpers/index.d.mts +2 -5
- package/dist/helpers/index.mjs +2 -3
- package/dist/helpers/resolve-options.cjs +2 -1
- package/dist/helpers/resolve-options.d.cts +1 -1
- package/dist/helpers/resolve-options.d.mts +1 -1
- package/dist/helpers/resolve-options.mjs +36 -2
- package/dist/helpers/resolve-options.mjs.map +1 -0
- package/dist/helpers/unplugin.cjs +11 -2
- package/dist/helpers/unplugin.d.cts +1 -2
- package/dist/helpers/unplugin.d.mts +1 -3
- package/dist/helpers/unplugin.mjs +10 -2
- package/dist/helpers/unplugin.mjs.map +1 -0
- package/dist/index.cjs +9 -10
- package/dist/index.d.cts +4 -6
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +4 -6
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +4 -5
- package/dist/index.mjs.map +1 -1
- package/dist/{plugin-DEIed7eA.d.cts → plugin-B3EYM2p9.d.mts} +2 -2
- package/dist/plugin-B3EYM2p9.d.mts.map +1 -0
- package/dist/{plugin-yC9VrUHY.d.mts → plugin-CxAN1Lu0.d.cts} +2 -2
- package/dist/plugin-CxAN1Lu0.d.cts.map +1 -0
- package/dist/{resolve-options-Cle7DV9O.d.mts → resolve-options-2T46cfhr.d.cts} +2 -3
- package/dist/resolve-options-2T46cfhr.d.cts.map +1 -0
- package/dist/{resolve-options-DvHhJcbO.d.cts → resolve-options-BDVDHrY7.d.mts} +2 -3
- package/dist/resolve-options-BDVDHrY7.d.mts.map +1 -0
- package/dist/{resolve-options-Dd1m9RDc.cjs → resolve-options-FDaPmq2Y.cjs} +6 -6
- package/dist/types/build.d.cts +1 -1
- package/dist/types/build.d.mts +1 -1
- package/dist/types/index.d.cts +2 -3
- package/dist/types/index.d.mts +2 -3
- package/dist/types/plugin.d.cts +1 -1
- package/dist/types/plugin.d.mts +1 -2
- package/dist/unplugin-73PkIqlb.d.cts +8 -0
- package/dist/unplugin-73PkIqlb.d.cts.map +1 -0
- package/dist/unplugin-Bem3qeWR.d.mts +8 -0
- package/dist/unplugin-Bem3qeWR.d.mts.map +1 -0
- package/package.json +17 -16
- package/dist/build-BFd9LRNQ.d.cts.map +0 -1
- package/dist/build-BceJYVLj.d.mts.map +0 -1
- package/dist/build-DJTI0ZMx.cjs +0 -0
- package/dist/build-XTM4L3VY.mjs +0 -1
- package/dist/helpers-C9XSjwSZ.mjs +0 -1
- package/dist/helpers-yB1XkvQI.cjs +0 -0
- package/dist/index-B_e8BwCm.d.cts +0 -1
- package/dist/index-CW2WHUXP.d.mts +0 -1
- package/dist/index-CiBIKhMu.d.cts +0 -1
- package/dist/index-mH1MEWOz.d.mts +0 -1
- package/dist/plugin-D3B5E_Hg.mjs +0 -1
- package/dist/plugin-D5qyQPqC.cjs +0 -0
- package/dist/plugin-DEIed7eA.d.cts.map +0 -1
- package/dist/plugin-yC9VrUHY.d.mts.map +0 -1
- package/dist/resolve-options-Cle7DV9O.d.mts.map +0 -1
- package/dist/resolve-options-DvHhJcbO.d.cts.map +0 -1
- package/dist/resolve-options-vZLZ1_cF.mjs +0 -37
- package/dist/resolve-options-vZLZ1_cF.mjs.map +0 -1
- package/dist/unplugin-B_f-YOTD.cjs +0 -16
- package/dist/unplugin-BhCM68JV.d.cts +0 -8
- package/dist/unplugin-BhCM68JV.d.cts.map +0 -1
- package/dist/unplugin-DKXmY9Ke.d.mts +0 -8
- package/dist/unplugin-DKXmY9Ke.d.mts.map +0 -1
- package/dist/unplugin-DeBr-5Sy.mjs +0 -11
- package/dist/unplugin-DeBr-5Sy.mjs.map +0 -1
package/README.md
CHANGED
|
@@ -27,7 +27,7 @@ This package is part of the <b>🔌 Powerlines</b> monorepo. Powerlines is the "
|
|
|
27
27
|
|
|
28
28
|
<h3 align="center">💻 Visit <a href="https://stormsoftware.com" target="_blank">stormsoftware.com</a> to stay up to date with this developer</h3><br />
|
|
29
29
|
|
|
30
|
-
[](https://stormsoftware.com/projects/powerlines) [](http://commitizen.github.io/cz-cli/)  
|
|
31
31
|
|
|
32
32
|
<!-- prettier-ignore-start -->
|
|
33
33
|
<!-- markdownlint-disable -->
|
|
@@ -58,21 +58,19 @@ A package containing a Powerlines plugin to build projects using [Rspack](https:
|
|
|
58
58
|
|
|
59
59
|
## Table of Contents
|
|
60
60
|
|
|
61
|
-
- [
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
- [
|
|
65
|
-
- [
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
- [Contributing](#contributing)
|
|
75
|
-
- [Contributors](#contributors)
|
|
61
|
+
- [Installing](#installing)
|
|
62
|
+
- [Reduced Package Size](#reduced-package-size)
|
|
63
|
+
- [Development](#development)
|
|
64
|
+
- [Building](#building)
|
|
65
|
+
- [Running unit tests](#running-unit-tests)
|
|
66
|
+
- [Linting](#linting)
|
|
67
|
+
- [Storm Workspaces](#storm-workspaces)
|
|
68
|
+
- [Roadmap](#roadmap)
|
|
69
|
+
- [Support](#support)
|
|
70
|
+
- [License](#license)
|
|
71
|
+
- [Changelog](#changelog)
|
|
72
|
+
- [Contributing](#contributing)
|
|
73
|
+
- [Contributors](#contributors)
|
|
76
74
|
|
|
77
75
|
<!-- END doctoc -->
|
|
78
76
|
|
|
@@ -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-B8svWKBw.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build-B8svWKBw.d.cts","names":[],"sources":["../src/types/build.ts"],"mappings":";;;KAoBY,aAAA,GAAgB,IAAA,CAC1B,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-yAGe0Dv9.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
const
|
|
3
|
-
require('
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
const require_resolve_options = require('../resolve-options-FDaPmq2Y.cjs');
|
|
3
|
+
const require_helpers_unplugin = require('./unplugin.cjs');
|
|
4
4
|
|
|
5
|
-
exports.createRspackPlugin =
|
|
5
|
+
exports.createRspackPlugin = require_helpers_unplugin.createRspackPlugin;
|
|
6
6
|
exports.resolveOptions = require_resolve_options.resolveOptions;
|
package/dist/helpers/index.d.cts
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { t as resolveOptions } from "../resolve-options-
|
|
2
|
-
import "../
|
|
3
|
-
import { t as createRspackPlugin } from "../unplugin-BhCM68JV.cjs";
|
|
4
|
-
import "../index-CiBIKhMu.cjs";
|
|
1
|
+
import { t as resolveOptions } from "../resolve-options-2T46cfhr.cjs";
|
|
2
|
+
import { t as createRspackPlugin } from "../unplugin-73PkIqlb.cjs";
|
|
5
3
|
export { createRspackPlugin, resolveOptions };
|
package/dist/helpers/index.d.mts
CHANGED
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import { t as resolveOptions } from "../resolve-options-
|
|
2
|
-
import "../
|
|
3
|
-
import "../plugin-yC9VrUHY.mjs";
|
|
4
|
-
import { t as createRspackPlugin } from "../unplugin-DKXmY9Ke.mjs";
|
|
5
|
-
import "../index-mH1MEWOz.mjs";
|
|
1
|
+
import { t as resolveOptions } from "../resolve-options-BDVDHrY7.mjs";
|
|
2
|
+
import { t as createRspackPlugin } from "../unplugin-Bem3qeWR.mjs";
|
|
6
3
|
export { createRspackPlugin, resolveOptions };
|
package/dist/helpers/index.mjs
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import "../helpers-C9XSjwSZ.mjs";
|
|
1
|
+
import { resolveOptions } from "./resolve-options.mjs";
|
|
2
|
+
import { createRspackPlugin } from "./unplugin.mjs";
|
|
4
3
|
|
|
5
4
|
export { createRspackPlugin, resolveOptions };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
const require_resolve_options = require('../resolve-options-FDaPmq2Y.cjs');
|
|
2
3
|
|
|
3
4
|
exports.resolveOptions = require_resolve_options.resolveOptions;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as resolveOptions } from "../resolve-options-
|
|
1
|
+
import { t as resolveOptions } from "../resolve-options-2T46cfhr.cjs";
|
|
2
2
|
export { resolveOptions };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as resolveOptions } from "../resolve-options-
|
|
1
|
+
import { t as resolveOptions } from "../resolve-options-BDVDHrY7.mjs";
|
|
2
2
|
export { resolveOptions };
|
|
@@ -1,3 +1,37 @@
|
|
|
1
|
-
import
|
|
1
|
+
import defu from "defu";
|
|
2
|
+
import { joinPaths } from "@stryke/path/join-paths";
|
|
2
3
|
|
|
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: joinPaths(context.workspaceConfig.workspaceRoot, context.config.output.buildPath) },
|
|
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.workspaceConfig.workspaceRoot, context.config.root),
|
|
28
|
+
noExternal: context.builtins,
|
|
29
|
+
cache: context.config.mode === "development",
|
|
30
|
+
devtool: context.config.mode !== "development" ? false : "source-map",
|
|
31
|
+
optimization: { minimize: context.config.mode !== "development" }
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
//#endregion
|
|
36
|
+
export { resolveOptions };
|
|
37
|
+
//# sourceMappingURL=resolve-options.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
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 {\n DevTool,\n Configuration as ExternalRspackOptions\n} 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: joinPaths(\n context.workspaceConfig.workspaceRoot,\n context.config.output.buildPath\n )\n },\n name: context.config.name,\n node:\n context.config.platform === \"node\"\n ? ({\n __dirname: true,\n __filename: true,\n global: true\n } as ExternalRspackOptions[\"node\"])\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(\n context.workspaceConfig.workspaceRoot,\n context.config.root\n ),\n noExternal: context.builtins,\n cache: context.config.mode === \"development\",\n devtool: (context.config.mode !== \"development\"\n ? false\n : \"source-map\") as DevTool | false,\n optimization: {\n minimize: context.config.mode !== \"development\"\n }\n }\n );\n}\n"],"mappings":";;;;;;;;;;AAiCA,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,UACJ,QAAQ,gBAAgB,eACxB,QAAQ,OAAO,OAAO,UACvB,EACF;EACD,MAAM,QAAQ,OAAO;EACrB,MACE,QAAQ,OAAO,aAAa,SACvB;GACC,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,UACP,QAAQ,gBAAgB,eACxB,QAAQ,OAAO,KAChB;EACD,YAAY,QAAQ;EACpB,OAAO,QAAQ,OAAO,SAAS;EAC/B,SAAU,QAAQ,OAAO,SAAS,gBAC9B,QACA;EACJ,cAAc,EACZ,UAAU,QAAQ,OAAO,SAAS,eACnC;EACF,CACF"}
|
|
@@ -1,3 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
const require_resolve_options = require('../resolve-options-FDaPmq2Y.cjs');
|
|
3
|
+
let _powerlines_core_lib_unplugin = require("@powerlines/core/lib/unplugin");
|
|
4
|
+
let unplugin = require("unplugin");
|
|
2
5
|
|
|
3
|
-
|
|
6
|
+
//#region src/helpers/unplugin.ts
|
|
7
|
+
function createRspackPlugin(context) {
|
|
8
|
+
return (0, unplugin.createRspackPlugin)((0, _powerlines_core_lib_unplugin.createUnplugin)(context))({});
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
//#endregion
|
|
12
|
+
exports.createRspackPlugin = createRspackPlugin;
|
|
@@ -1,3 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createUnplugin } from "@powerlines/core/lib/unplugin";
|
|
2
|
+
import { createRspackPlugin as createRspackPlugin$1 } from "unplugin";
|
|
2
3
|
|
|
3
|
-
|
|
4
|
+
//#region src/helpers/unplugin.ts
|
|
5
|
+
function createRspackPlugin(context) {
|
|
6
|
+
return createRspackPlugin$1(createUnplugin(context))({});
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
//#endregion
|
|
10
|
+
export { createRspackPlugin };
|
|
11
|
+
//# sourceMappingURL=unplugin.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
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(createUnplugin(context))({});\n}\n"],"mappings":";;;;AAsBA,SAAgB,mBAAmB,SAA8B;AAC/D,QAAOA,qBAAqB,eAAe,QAAQ,CAAC,CAAC,EAAE,CAAC"}
|
package/dist/index.cjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
Object.
|
|
2
|
-
const require_resolve_options = require('./resolve-options-
|
|
3
|
-
const
|
|
4
|
-
require('./helpers
|
|
1
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
|
|
2
|
+
const require_resolve_options = require('./resolve-options-FDaPmq2Y.cjs');
|
|
3
|
+
const require_helpers_unplugin = require('./helpers/unplugin.cjs');
|
|
4
|
+
require('./helpers/index.cjs');
|
|
5
5
|
require('./types/index.cjs');
|
|
6
|
-
let
|
|
6
|
+
let _rspack_core = require("@rspack/core");
|
|
7
7
|
let defu = require("defu");
|
|
8
8
|
defu = require_resolve_options.__toESM(defu);
|
|
9
9
|
|
|
@@ -22,17 +22,16 @@ const plugin = (options = {}) => {
|
|
|
22
22
|
} };
|
|
23
23
|
},
|
|
24
24
|
async build() {
|
|
25
|
-
(0,
|
|
25
|
+
(0, _rspack_core.rspack)((0, defu.default)({ entry: this.entry.reduce((ret, entry) => {
|
|
26
26
|
ret[entry.output || entry.name || entry.file] = entry.file;
|
|
27
27
|
return ret;
|
|
28
|
-
}, {}) }, require_resolve_options.resolveOptions(this), { plugins: [
|
|
28
|
+
}, {}) }, require_resolve_options.resolveOptions(this), { plugins: [require_helpers_unplugin.createRspackPlugin(this)] }));
|
|
29
29
|
}
|
|
30
30
|
};
|
|
31
31
|
};
|
|
32
|
-
var src_default = plugin;
|
|
33
32
|
|
|
34
33
|
//#endregion
|
|
35
|
-
exports.createRspackPlugin =
|
|
36
|
-
exports.default =
|
|
34
|
+
exports.createRspackPlugin = require_helpers_unplugin.createRspackPlugin;
|
|
35
|
+
exports.default = plugin;
|
|
37
36
|
exports.plugin = plugin;
|
|
38
37
|
exports.resolveOptions = require_resolve_options.resolveOptions;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import { t as resolveOptions } from "./resolve-options-
|
|
2
|
-
import { n as __ΩRspackOptions, t as RspackOptions } from "./build-
|
|
3
|
-
import { a as __ΩRspackPluginContext, c as __ΩRspackPluginUserConfig, i as RspackPluginUserConfig, n as RspackPluginOptions, o as __ΩRspackPluginOptions, r as RspackPluginResolvedConfig, s as __ΩRspackPluginResolvedConfig, t as RspackPluginContext } from "./plugin-
|
|
4
|
-
import { t as createRspackPlugin } from "./unplugin-
|
|
5
|
-
import "./index-CiBIKhMu.cjs";
|
|
6
|
-
import "./index-B_e8BwCm.cjs";
|
|
1
|
+
import { t as resolveOptions } from "./resolve-options-2T46cfhr.cjs";
|
|
2
|
+
import { n as __ΩRspackOptions, t as RspackOptions } from "./build-B8svWKBw.cjs";
|
|
3
|
+
import { a as __ΩRspackPluginContext, c as __ΩRspackPluginUserConfig, i as RspackPluginUserConfig, n as RspackPluginOptions, o as __ΩRspackPluginOptions, r as RspackPluginResolvedConfig, s as __ΩRspackPluginResolvedConfig, t as RspackPluginContext } from "./plugin-CxAN1Lu0.cjs";
|
|
4
|
+
import { t as createRspackPlugin } from "./unplugin-73PkIqlb.cjs";
|
|
7
5
|
import { Plugin } from "@powerlines/core";
|
|
8
6
|
|
|
9
7
|
//#region src/index.d.ts
|
package/dist/index.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.ts"],"
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.ts"],"mappings":";;;;;;;;;;cAmCa,MAAA,oBACM,mBAAA,GAAsB,mBAAA,EAEvC,OAAA,GAAS,mBAAA,KACR,MAAA,CAAO,QAAA"}
|
package/dist/index.d.mts
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import { t as resolveOptions } from "./resolve-options-
|
|
2
|
-
import { n as __ΩRspackOptions, t as RspackOptions } from "./build-
|
|
3
|
-
import { a as __ΩRspackPluginContext, c as __ΩRspackPluginUserConfig, i as RspackPluginUserConfig, n as RspackPluginOptions, o as __ΩRspackPluginOptions, r as RspackPluginResolvedConfig, s as __ΩRspackPluginResolvedConfig, t as RspackPluginContext } from "./plugin-
|
|
4
|
-
import { t as createRspackPlugin } from "./unplugin-
|
|
5
|
-
import "./index-mH1MEWOz.mjs";
|
|
6
|
-
import "./index-CW2WHUXP.mjs";
|
|
1
|
+
import { t as resolveOptions } from "./resolve-options-BDVDHrY7.mjs";
|
|
2
|
+
import { n as __ΩRspackOptions, t as RspackOptions } from "./build-yAGe0Dv9.mjs";
|
|
3
|
+
import { a as __ΩRspackPluginContext, c as __ΩRspackPluginUserConfig, i as RspackPluginUserConfig, n as RspackPluginOptions, o as __ΩRspackPluginOptions, r as RspackPluginResolvedConfig, s as __ΩRspackPluginResolvedConfig, t as RspackPluginContext } from "./plugin-B3EYM2p9.mjs";
|
|
4
|
+
import { t as createRspackPlugin } from "./unplugin-Bem3qeWR.mjs";
|
|
7
5
|
import { Plugin } from "@powerlines/core";
|
|
8
6
|
|
|
9
7
|
//#region src/index.d.ts
|
package/dist/index.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"mappings":";;;;;;;;;;cAmCa,MAAA,oBACM,mBAAA,GAAsB,mBAAA,EAEvC,OAAA,GAAS,mBAAA,KACR,MAAA,CAAO,QAAA"}
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import "./helpers
|
|
1
|
+
import { resolveOptions } from "./helpers/resolve-options.mjs";
|
|
2
|
+
import { createRspackPlugin } from "./helpers/unplugin.mjs";
|
|
3
|
+
import "./helpers/index.mjs";
|
|
4
4
|
import "./types/index.mjs";
|
|
5
5
|
import { rspack } from "@rspack/core";
|
|
6
6
|
import defu from "defu";
|
|
@@ -27,8 +27,7 @@ const plugin = (options = {}) => {
|
|
|
27
27
|
}
|
|
28
28
|
};
|
|
29
29
|
};
|
|
30
|
-
var src_default = plugin;
|
|
31
30
|
|
|
32
31
|
//#endregion
|
|
33
|
-
export { createRspackPlugin,
|
|
32
|
+
export { createRspackPlugin, plugin as default, plugin, resolveOptions };
|
|
34
33
|
//# 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 { Plugin } from \"@powerlines/core\";\nimport { rspack as build } from \"@rspack/core\";\nimport defu from \"defu\";\nimport { resolveOptions } from \"./helpers\";\nimport { createRspackPlugin } from \"./helpers/unplugin\";\nimport {\n RspackPluginContext,\n RspackPluginOptions,\n RspackPluginResolvedConfig\n} from \"./types/plugin\";\n\nexport * from \"./helpers\";\nexport * from \"./types\";\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 } as Partial<RspackPluginResolvedConfig>;\n },\n async build() {\n build(\n 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: [createRspackPlugin(this)]\n }\n )\n );\n }\n };\n};\n\nexport default plugin;\n"],"mappings":";;;;;;;;;;;AAmCA,MAAa,UAGX,UAA+B,EAAE,KACZ;AACrB,QAAO;EACL,MAAM;EACN,SAAS;AACP,QAAK,MACH,4EACD;AAED,UAAO,EACL,OAAO;IACL,GAAG;IACH,SAAS;IACV,EACF;;EAEH,MAAM,QAAQ;AACZ,UACE,KACE,EACE,OAAO,KAAK,MAAM,QACf,KAAK,UAAU;AACd,QAAI,MAAM,UAAU,MAAM,QAAQ,MAAM,QAAQ,MAAM;AAEtD,WAAO;MAET,EAAE,CACH,EACF,EACD,eAAe,KAAK,EACpB,EACE,SAAS,CAAC,mBAAmB,KAAK,CAAC,EACpC,CACF,CACF;;EAEJ
|
|
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 { Plugin } from \"@powerlines/core\";\nimport { rspack as build } from \"@rspack/core\";\nimport defu from \"defu\";\nimport { resolveOptions } from \"./helpers\";\nimport { createRspackPlugin } from \"./helpers/unplugin\";\nimport {\n RspackPluginContext,\n RspackPluginOptions,\n RspackPluginResolvedConfig\n} from \"./types/plugin\";\n\nexport * from \"./helpers\";\nexport * from \"./types\";\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 } as Partial<RspackPluginResolvedConfig>;\n },\n async build() {\n build(\n 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: [createRspackPlugin(this)]\n }\n )\n );\n }\n };\n};\n\nexport default plugin;\n"],"mappings":";;;;;;;;;;;AAmCA,MAAa,UAGX,UAA+B,EAAE,KACZ;AACrB,QAAO;EACL,MAAM;EACN,SAAS;AACP,QAAK,MACH,4EACD;AAED,UAAO,EACL,OAAO;IACL,GAAG;IACH,SAAS;IACV,EACF;;EAEH,MAAM,QAAQ;AACZ,UACE,KACE,EACE,OAAO,KAAK,MAAM,QACf,KAAK,UAAU;AACd,QAAI,MAAM,UAAU,MAAM,QAAQ,MAAM,QAAQ,MAAM;AAEtD,WAAO;MAET,EAAE,CACH,EACF,EACD,eAAe,KAAK,EACpB,EACE,SAAS,CAAC,mBAAmB,KAAK,CAAC,EACpC,CACF,CACF;;EAEJ"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as RspackOptions } from "./build-
|
|
1
|
+
import { t as RspackOptions } from "./build-yAGe0Dv9.mjs";
|
|
2
2
|
import { PluginContext, ResolvedConfig, UserConfig } from "@powerlines/core";
|
|
3
3
|
|
|
4
4
|
//#region src/types/plugin.d.ts
|
|
@@ -16,4 +16,4 @@ declare type __ΩRspackPluginResolvedConfig = any[];
|
|
|
16
16
|
declare type __ΩRspackPluginContext = any[];
|
|
17
17
|
//#endregion
|
|
18
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-
|
|
19
|
+
//# sourceMappingURL=plugin-B3EYM2p9.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
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,4 +1,4 @@
|
|
|
1
|
-
import { t as RspackOptions } from "./build-
|
|
1
|
+
import { t as RspackOptions } from "./build-B8svWKBw.cjs";
|
|
2
2
|
import { PluginContext, ResolvedConfig, UserConfig } from "@powerlines/core";
|
|
3
3
|
|
|
4
4
|
//#region src/types/plugin.d.ts
|
|
@@ -16,4 +16,4 @@ declare type __ΩRspackPluginResolvedConfig = any[];
|
|
|
16
16
|
declare type __ΩRspackPluginContext = any[];
|
|
17
17
|
//#endregion
|
|
18
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-
|
|
19
|
+
//# sourceMappingURL=plugin-CxAN1Lu0.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
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,8 +1,7 @@
|
|
|
1
|
-
import { Configuration } from "@rspack/core";
|
|
2
1
|
import { Context } from "@powerlines/core";
|
|
2
|
+
import { Configuration } from "@rspack/core";
|
|
3
3
|
|
|
4
4
|
//#region src/helpers/resolve-options.d.ts
|
|
5
|
-
|
|
6
5
|
/**
|
|
7
6
|
* Resolves the options for [rspack](https://rspack.rs/).
|
|
8
7
|
*
|
|
@@ -12,4 +11,4 @@ import { Context } from "@powerlines/core";
|
|
|
12
11
|
declare function resolveOptions(context: Context): Configuration;
|
|
13
12
|
//#endregion
|
|
14
13
|
export { resolveOptions as t };
|
|
15
|
-
//# sourceMappingURL=resolve-options-
|
|
14
|
+
//# sourceMappingURL=resolve-options-2T46cfhr.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolve-options-2T46cfhr.d.cts","names":[],"sources":["../src/helpers/resolve-options.ts"],"mappings":";;;;;;AAiCA;;;;iBAAgB,cAAA,CAAe,OAAA,EAAS,OAAA,GAAU,aAAA"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { Context } from "@powerlines/core";
|
|
2
1
|
import { Configuration } from "@rspack/core";
|
|
2
|
+
import { Context } from "@powerlines/core";
|
|
3
3
|
|
|
4
4
|
//#region src/helpers/resolve-options.d.ts
|
|
5
|
-
|
|
6
5
|
/**
|
|
7
6
|
* Resolves the options for [rspack](https://rspack.rs/).
|
|
8
7
|
*
|
|
@@ -12,4 +11,4 @@ import { Configuration } from "@rspack/core";
|
|
|
12
11
|
declare function resolveOptions(context: Context): Configuration;
|
|
13
12
|
//#endregion
|
|
14
13
|
export { resolveOptions as t };
|
|
15
|
-
//# sourceMappingURL=resolve-options-
|
|
14
|
+
//# sourceMappingURL=resolve-options-BDVDHrY7.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolve-options-BDVDHrY7.d.mts","names":[],"sources":["../src/helpers/resolve-options.ts"],"mappings":";;;;;;AAiCA;;;;iBAAgB,cAAA,CAAe,OAAA,EAAS,OAAA,GAAU,aAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region
|
|
1
|
+
//#region \0rolldown/runtime.js
|
|
2
2
|
var __create = Object.create;
|
|
3
3
|
var __defProp = Object.defineProperty;
|
|
4
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -27,7 +27,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
27
27
|
//#endregion
|
|
28
28
|
let defu = require("defu");
|
|
29
29
|
defu = __toESM(defu);
|
|
30
|
-
let
|
|
30
|
+
let _stryke_path_join_paths = require("@stryke/path/join-paths");
|
|
31
31
|
|
|
32
32
|
//#region src/helpers/resolve-options.ts
|
|
33
33
|
/**
|
|
@@ -42,7 +42,7 @@ function resolveOptions(context) {
|
|
|
42
42
|
noExternal: context.config.resolve.noExternal,
|
|
43
43
|
skipNodeModulesBundle: context.config.resolve.skipNodeModulesBundle
|
|
44
44
|
}, {
|
|
45
|
-
output: { path: (0,
|
|
45
|
+
output: { path: (0, _stryke_path_join_paths.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.output.buildPath) },
|
|
46
46
|
name: context.config.name,
|
|
47
47
|
node: context.config.platform === "node" ? {
|
|
48
48
|
__dirname: true,
|
|
@@ -50,9 +50,9 @@ function resolveOptions(context) {
|
|
|
50
50
|
global: true
|
|
51
51
|
} : false,
|
|
52
52
|
mode: context.config.mode === "development" ? "development" : "production",
|
|
53
|
-
recordsInputPath: (0,
|
|
54
|
-
recordsOutputPath: (0,
|
|
55
|
-
context: (0,
|
|
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.workspaceConfig.workspaceRoot, context.config.root),
|
|
56
56
|
noExternal: context.builtins,
|
|
57
57
|
cache: context.config.mode === "development",
|
|
58
58
|
devtool: context.config.mode !== "development" ? false : "source-map",
|
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-B8svWKBw.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-yAGe0Dv9.mjs";
|
|
2
2
|
export { RspackOptions, __ΩRspackOptions };
|
package/dist/types/index.d.cts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { n as __ΩRspackOptions, t as RspackOptions } from "../build-
|
|
2
|
-
import { a as __ΩRspackPluginContext, c as __ΩRspackPluginUserConfig, i as RspackPluginUserConfig, n as RspackPluginOptions, o as __ΩRspackPluginOptions, r as RspackPluginResolvedConfig, s as __ΩRspackPluginResolvedConfig, t as RspackPluginContext } from "../plugin-
|
|
3
|
-
import "../index-B_e8BwCm.cjs";
|
|
1
|
+
import { n as __ΩRspackOptions, t as RspackOptions } from "../build-B8svWKBw.cjs";
|
|
2
|
+
import { a as __ΩRspackPluginContext, c as __ΩRspackPluginUserConfig, i as RspackPluginUserConfig, n as RspackPluginOptions, o as __ΩRspackPluginOptions, r as RspackPluginResolvedConfig, s as __ΩRspackPluginResolvedConfig, t as RspackPluginContext } from "../plugin-CxAN1Lu0.cjs";
|
|
4
3
|
export { RspackOptions, RspackPluginContext, RspackPluginOptions, RspackPluginResolvedConfig, RspackPluginUserConfig, __ΩRspackOptions, __ΩRspackPluginContext, __ΩRspackPluginOptions, __ΩRspackPluginResolvedConfig, __ΩRspackPluginUserConfig };
|
package/dist/types/index.d.mts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { n as __ΩRspackOptions, t as RspackOptions } from "../build-
|
|
2
|
-
import { a as __ΩRspackPluginContext, c as __ΩRspackPluginUserConfig, i as RspackPluginUserConfig, n as RspackPluginOptions, o as __ΩRspackPluginOptions, r as RspackPluginResolvedConfig, s as __ΩRspackPluginResolvedConfig, t as RspackPluginContext } from "../plugin-
|
|
3
|
-
import "../index-CW2WHUXP.mjs";
|
|
1
|
+
import { n as __ΩRspackOptions, t as RspackOptions } from "../build-yAGe0Dv9.mjs";
|
|
2
|
+
import { a as __ΩRspackPluginContext, c as __ΩRspackPluginUserConfig, i as RspackPluginUserConfig, n as RspackPluginOptions, o as __ΩRspackPluginOptions, r as RspackPluginResolvedConfig, s as __ΩRspackPluginResolvedConfig, t as RspackPluginContext } from "../plugin-B3EYM2p9.mjs";
|
|
4
3
|
export { RspackOptions, RspackPluginContext, RspackPluginOptions, RspackPluginResolvedConfig, RspackPluginUserConfig, __ΩRspackOptions, __ΩRspackPluginContext, __ΩRspackPluginOptions, __ΩRspackPluginResolvedConfig, __ΩRspackPluginUserConfig };
|
package/dist/types/plugin.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as __ΩRspackPluginContext, c as __ΩRspackPluginUserConfig, i as RspackPluginUserConfig, n as RspackPluginOptions, o as __ΩRspackPluginOptions, r as RspackPluginResolvedConfig, s as __ΩRspackPluginResolvedConfig, t as RspackPluginContext } from "../plugin-
|
|
1
|
+
import { a as __ΩRspackPluginContext, c as __ΩRspackPluginUserConfig, i as RspackPluginUserConfig, n as RspackPluginOptions, o as __ΩRspackPluginOptions, r as RspackPluginResolvedConfig, s as __ΩRspackPluginResolvedConfig, t as RspackPluginContext } from "../plugin-CxAN1Lu0.cjs";
|
|
2
2
|
export { RspackPluginContext, RspackPluginOptions, RspackPluginResolvedConfig, RspackPluginUserConfig, __ΩRspackPluginContext, __ΩRspackPluginOptions, __ΩRspackPluginResolvedConfig, __ΩRspackPluginUserConfig };
|
package/dist/types/plugin.d.mts
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import "../
|
|
2
|
-
import { a as __ΩRspackPluginContext, c as __ΩRspackPluginUserConfig, i as RspackPluginUserConfig, n as RspackPluginOptions, o as __ΩRspackPluginOptions, r as RspackPluginResolvedConfig, s as __ΩRspackPluginResolvedConfig, t as RspackPluginContext } from "../plugin-yC9VrUHY.mjs";
|
|
1
|
+
import { a as __ΩRspackPluginContext, c as __ΩRspackPluginUserConfig, i as RspackPluginUserConfig, n as RspackPluginOptions, o as __ΩRspackPluginOptions, r as RspackPluginResolvedConfig, s as __ΩRspackPluginResolvedConfig, t as RspackPluginContext } from "../plugin-B3EYM2p9.mjs";
|
|
3
2
|
export { RspackPluginContext, RspackPluginOptions, RspackPluginResolvedConfig, RspackPluginUserConfig, __ΩRspackPluginContext, __ΩRspackPluginOptions, __ΩRspackPluginResolvedConfig, __ΩRspackPluginUserConfig };
|
|
@@ -0,0 +1,8 @@
|
|
|
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-73PkIqlb.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unplugin-73PkIqlb.d.cts","names":[],"sources":["../src/helpers/unplugin.ts"],"mappings":";;;;iBAsBgB,kBAAA,CAAmB,OAAA,EAAS,mBAAA,GAAmB,QAAA,CAAA,oBAAA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
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-Bem3qeWR.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unplugin-Bem3qeWR.d.mts","names":[],"sources":["../src/helpers/unplugin.ts"],"mappings":";;;;iBAsBgB,oBAAA,CAAmB,OAAA,EAAS,mBAAA,GAAmB,QAAA,CAAA,oBAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerlines/plugin-rspack",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.345",
|
|
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"],
|
|
@@ -40,30 +40,31 @@
|
|
|
40
40
|
],
|
|
41
41
|
"type": "module",
|
|
42
42
|
"exports": {
|
|
43
|
-
".": { "
|
|
43
|
+
".": { "import": "./dist/index.mjs", "require": "./dist/index.cjs" },
|
|
44
44
|
"./helpers": {
|
|
45
|
-
"
|
|
46
|
-
"
|
|
45
|
+
"import": "./dist/helpers/index.mjs",
|
|
46
|
+
"require": "./dist/helpers/index.cjs"
|
|
47
47
|
},
|
|
48
48
|
"./helpers/resolve-options": {
|
|
49
|
-
"
|
|
50
|
-
"
|
|
49
|
+
"import": "./dist/helpers/resolve-options.mjs",
|
|
50
|
+
"require": "./dist/helpers/resolve-options.cjs"
|
|
51
51
|
},
|
|
52
52
|
"./helpers/unplugin": {
|
|
53
|
-
"
|
|
54
|
-
"
|
|
53
|
+
"import": "./dist/helpers/unplugin.mjs",
|
|
54
|
+
"require": "./dist/helpers/unplugin.cjs"
|
|
55
55
|
},
|
|
56
|
+
"./resolve-options-FDaPmq2Y": "./dist/resolve-options-FDaPmq2Y.cjs",
|
|
56
57
|
"./types": {
|
|
57
|
-
"
|
|
58
|
-
"
|
|
58
|
+
"import": "./dist/types/index.mjs",
|
|
59
|
+
"require": "./dist/types/index.cjs"
|
|
59
60
|
},
|
|
60
61
|
"./types/build": {
|
|
61
|
-
"
|
|
62
|
-
"
|
|
62
|
+
"import": "./dist/types/build.mjs",
|
|
63
|
+
"require": "./dist/types/build.cjs"
|
|
63
64
|
},
|
|
64
65
|
"./types/plugin": {
|
|
65
|
-
"
|
|
66
|
-
"
|
|
66
|
+
"import": "./dist/types/plugin.mjs",
|
|
67
|
+
"require": "./dist/types/plugin.cjs"
|
|
67
68
|
},
|
|
68
69
|
"./*": "./*"
|
|
69
70
|
},
|
|
@@ -75,11 +76,11 @@
|
|
|
75
76
|
"peerDependencies": { "@rspack/core": ">=1.5.0" },
|
|
76
77
|
"peerDependenciesMeta": { "@rspack/core": { "optional": false } },
|
|
77
78
|
"dependencies": {
|
|
78
|
-
"@powerlines/core": "^0.2.
|
|
79
|
+
"@powerlines/core": "^0.2.23",
|
|
79
80
|
"@stryke/path": "^0.26.19",
|
|
80
81
|
"defu": "^6.1.4"
|
|
81
82
|
},
|
|
82
83
|
"devDependencies": { "@types/node": "^25.4.0", "@rspack/core": "^1.7.8" },
|
|
83
84
|
"publishConfig": { "access": "public" },
|
|
84
|
-
"gitHead": "
|
|
85
|
+
"gitHead": "2fb48143904805988bac9bdbc04cdc4a35ff398b"
|
|
85
86
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"build-BFd9LRNQ.d.cts","names":[],"sources":["../src/types/build.ts"],"sourcesContent":[],"mappings":";;;KAoBY,aAAA,GAAgB,KAC1B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"build-BceJYVLj.d.mts","names":[],"sources":["../src/types/build.ts"],"sourcesContent":[],"mappings":";;;KAoBY,aAAA,GAAgB,KAC1B"}
|
package/dist/build-DJTI0ZMx.cjs
DELETED
|
File without changes
|
package/dist/build-XTM4L3VY.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { };
|
|
File without changes
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { };
|
package/dist/plugin-D3B5E_Hg.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { };
|
package/dist/plugin-D5qyQPqC.cjs
DELETED
|
File without changes
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-DEIed7eA.d.cts","names":[],"sources":["../src/types/plugin.ts"],"sourcesContent":[],"mappings":";;;;KAqBY,mBAAA,GAAsB,QAAQ;UAEzB,sBAAA,SAA+B;EAFpC,MAAA,CAAA,EAGD,mBAHoB;AAE/B;AAIiB,UAAA,0BAAA,SAAmC,cAAA,CAAA;EAIxC,MAAA,EAHF,aAGE;;AAER,KAFQ,mBAER,CAAA,wBADsB,0BACtB,GAAA,0BAAA,CAAA,GACA,aADA,CACc,eADd,CAAA;AACc,sCAAA,GAAA,EAAA;AAAd,yCAAA,GAAA,EAAA;AAAa,6CAAA,GAAA,EAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-yC9VrUHY.d.mts","names":[],"sources":["../src/types/plugin.ts"],"sourcesContent":[],"mappings":";;;;KAqBY,mBAAA,GAAsB,QAAQ;UAEzB,sBAAA,SAA+B;EAFpC,MAAA,CAAA,EAGD,mBAHoB;AAE/B;AAIiB,UAAA,0BAAA,SAAmC,cAAA,CAAA;EAIxC,MAAA,EAHF,aAGE;;AAER,KAFQ,mBAER,CAAA,wBADsB,0BACtB,GAAA,0BAAA,CAAA,GACA,aADA,CACc,eADd,CAAA;AACc,sCAAA,GAAA,EAAA;AAAd,yCAAA,GAAA,EAAA;AAAa,6CAAA,GAAA,EAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"resolve-options-Cle7DV9O.d.mts","names":[],"sources":["../src/helpers/resolve-options.ts"],"sourcesContent":[],"mappings":";;;;;;;AAiCA;;;;iBAAgB,cAAA,UAAwB,UAAU"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"resolve-options-DvHhJcbO.d.cts","names":[],"sources":["../src/helpers/resolve-options.ts"],"sourcesContent":[],"mappings":";;;;;;;AAiCA;;;;iBAAgB,cAAA,UAAwB,UAAU"}
|
|
@@ -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: joinPaths(context.workspaceConfig.workspaceRoot, context.config.output.buildPath) },
|
|
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.workspaceConfig.workspaceRoot, context.config.root),
|
|
28
|
-
noExternal: context.builtins,
|
|
29
|
-
cache: context.config.mode === "development",
|
|
30
|
-
devtool: context.config.mode !== "development" ? false : "source-map",
|
|
31
|
-
optimization: { minimize: context.config.mode !== "development" }
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
//#endregion
|
|
36
|
-
export { resolveOptions as t };
|
|
37
|
-
//# sourceMappingURL=resolve-options-vZLZ1_cF.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"resolve-options-vZLZ1_cF.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 {\n DevTool,\n Configuration as ExternalRspackOptions\n} 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: joinPaths(\n context.workspaceConfig.workspaceRoot,\n context.config.output.buildPath\n )\n },\n name: context.config.name,\n node:\n context.config.platform === \"node\"\n ? ({\n __dirname: true,\n __filename: true,\n global: true\n } as ExternalRspackOptions[\"node\"])\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(\n context.workspaceConfig.workspaceRoot,\n context.config.root\n ),\n noExternal: context.builtins,\n cache: context.config.mode === \"development\",\n devtool: (context.config.mode !== \"development\"\n ? false\n : \"source-map\") as DevTool | false,\n optimization: {\n minimize: context.config.mode !== \"development\"\n }\n }\n );\n}\n"],"mappings":";;;;;;;;;;AAiCA,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,UACJ,QAAQ,gBAAgB,eACxB,QAAQ,OAAO,OAAO,UACvB,EACF;EACD,MAAM,QAAQ,OAAO;EACrB,MACE,QAAQ,OAAO,aAAa,SACvB;GACC,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,UACP,QAAQ,gBAAgB,eACxB,QAAQ,OAAO,KAChB;EACD,YAAY,QAAQ;EACpB,OAAO,QAAQ,OAAO,SAAS;EAC/B,SAAU,QAAQ,OAAO,SAAS,gBAC9B,QACA;EACJ,cAAc,EACZ,UAAU,QAAQ,OAAO,SAAS,eACnC;EACF,CACF"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
const require_resolve_options = require('./resolve-options-Dd1m9RDc.cjs');
|
|
2
|
-
let __powerlines_core_lib_unplugin = require("@powerlines/core/lib/unplugin");
|
|
3
|
-
let unplugin = require("unplugin");
|
|
4
|
-
|
|
5
|
-
//#region src/helpers/unplugin.ts
|
|
6
|
-
function createRspackPlugin(context) {
|
|
7
|
-
return (0, unplugin.createRspackPlugin)((0, __powerlines_core_lib_unplugin.createUnplugin)(context))({});
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
//#endregion
|
|
11
|
-
Object.defineProperty(exports, 'createRspackPlugin', {
|
|
12
|
-
enumerable: true,
|
|
13
|
-
get: function () {
|
|
14
|
-
return createRspackPlugin;
|
|
15
|
-
}
|
|
16
|
-
});
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { t as RspackPluginContext } from "./plugin-DEIed7eA.cjs";
|
|
2
|
-
import * as unplugin0 from "unplugin";
|
|
3
|
-
|
|
4
|
-
//#region src/helpers/unplugin.d.ts
|
|
5
|
-
declare function createRspackPlugin(context: RspackPluginContext): unplugin0.RspackPluginInstance;
|
|
6
|
-
//#endregion
|
|
7
|
-
export { createRspackPlugin as t };
|
|
8
|
-
//# sourceMappingURL=unplugin-BhCM68JV.d.cts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"unplugin-BhCM68JV.d.cts","names":[],"sources":["../src/helpers/unplugin.ts"],"sourcesContent":[],"mappings":";;;;iBAsBgB,kBAAA,UAA4B,sBAAmB,SAAA,CAAA"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { t as RspackPluginContext } from "./plugin-yC9VrUHY.mjs";
|
|
2
|
-
import * as unplugin0 from "unplugin";
|
|
3
|
-
|
|
4
|
-
//#region src/helpers/unplugin.d.ts
|
|
5
|
-
declare function createRspackPlugin$1(context: RspackPluginContext): unplugin0.RspackPluginInstance;
|
|
6
|
-
//#endregion
|
|
7
|
-
export { createRspackPlugin$1 as t };
|
|
8
|
-
//# sourceMappingURL=unplugin-DKXmY9Ke.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"unplugin-DKXmY9Ke.d.mts","names":[],"sources":["../src/helpers/unplugin.ts"],"sourcesContent":[],"mappings":";;;;iBAsBgB,oBAAA,UAA4B,sBAAmB,SAAA,CAAA"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { createUnplugin } from "@powerlines/core/lib/unplugin";
|
|
2
|
-
import { createRspackPlugin } from "unplugin";
|
|
3
|
-
|
|
4
|
-
//#region src/helpers/unplugin.ts
|
|
5
|
-
function createRspackPlugin$1(context) {
|
|
6
|
-
return createRspackPlugin(createUnplugin(context))({});
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
//#endregion
|
|
10
|
-
export { createRspackPlugin$1 as t };
|
|
11
|
-
//# sourceMappingURL=unplugin-DeBr-5Sy.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"unplugin-DeBr-5Sy.mjs","names":["createRspackPlugin","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(createUnplugin(context))({});\n}\n"],"mappings":";;;;AAsBA,SAAgBA,qBAAmB,SAA8B;AAC/D,QAAOC,mBAAqB,eAAe,QAAQ,CAAC,CAAC,EAAE,CAAC"}
|