@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.
Files changed (71) hide show
  1. package/README.md +14 -16
  2. package/dist/{build-BFd9LRNQ.d.cts → build-B8svWKBw.d.cts} +1 -1
  3. package/dist/build-B8svWKBw.d.cts.map +1 -0
  4. package/dist/{build-BceJYVLj.d.mts → build-yAGe0Dv9.d.mts} +1 -1
  5. package/dist/build-yAGe0Dv9.d.mts.map +1 -0
  6. package/dist/helpers/index.cjs +4 -4
  7. package/dist/helpers/index.d.cts +2 -4
  8. package/dist/helpers/index.d.mts +2 -5
  9. package/dist/helpers/index.mjs +2 -3
  10. package/dist/helpers/resolve-options.cjs +2 -1
  11. package/dist/helpers/resolve-options.d.cts +1 -1
  12. package/dist/helpers/resolve-options.d.mts +1 -1
  13. package/dist/helpers/resolve-options.mjs +36 -2
  14. package/dist/helpers/resolve-options.mjs.map +1 -0
  15. package/dist/helpers/unplugin.cjs +11 -2
  16. package/dist/helpers/unplugin.d.cts +1 -2
  17. package/dist/helpers/unplugin.d.mts +1 -3
  18. package/dist/helpers/unplugin.mjs +10 -2
  19. package/dist/helpers/unplugin.mjs.map +1 -0
  20. package/dist/index.cjs +9 -10
  21. package/dist/index.d.cts +4 -6
  22. package/dist/index.d.cts.map +1 -1
  23. package/dist/index.d.mts +4 -6
  24. package/dist/index.d.mts.map +1 -1
  25. package/dist/index.mjs +4 -5
  26. package/dist/index.mjs.map +1 -1
  27. package/dist/{plugin-DEIed7eA.d.cts → plugin-B3EYM2p9.d.mts} +2 -2
  28. package/dist/plugin-B3EYM2p9.d.mts.map +1 -0
  29. package/dist/{plugin-yC9VrUHY.d.mts → plugin-CxAN1Lu0.d.cts} +2 -2
  30. package/dist/plugin-CxAN1Lu0.d.cts.map +1 -0
  31. package/dist/{resolve-options-Cle7DV9O.d.mts → resolve-options-2T46cfhr.d.cts} +2 -3
  32. package/dist/resolve-options-2T46cfhr.d.cts.map +1 -0
  33. package/dist/{resolve-options-DvHhJcbO.d.cts → resolve-options-BDVDHrY7.d.mts} +2 -3
  34. package/dist/resolve-options-BDVDHrY7.d.mts.map +1 -0
  35. package/dist/{resolve-options-Dd1m9RDc.cjs → resolve-options-FDaPmq2Y.cjs} +6 -6
  36. package/dist/types/build.d.cts +1 -1
  37. package/dist/types/build.d.mts +1 -1
  38. package/dist/types/index.d.cts +2 -3
  39. package/dist/types/index.d.mts +2 -3
  40. package/dist/types/plugin.d.cts +1 -1
  41. package/dist/types/plugin.d.mts +1 -2
  42. package/dist/unplugin-73PkIqlb.d.cts +8 -0
  43. package/dist/unplugin-73PkIqlb.d.cts.map +1 -0
  44. package/dist/unplugin-Bem3qeWR.d.mts +8 -0
  45. package/dist/unplugin-Bem3qeWR.d.mts.map +1 -0
  46. package/package.json +17 -16
  47. package/dist/build-BFd9LRNQ.d.cts.map +0 -1
  48. package/dist/build-BceJYVLj.d.mts.map +0 -1
  49. package/dist/build-DJTI0ZMx.cjs +0 -0
  50. package/dist/build-XTM4L3VY.mjs +0 -1
  51. package/dist/helpers-C9XSjwSZ.mjs +0 -1
  52. package/dist/helpers-yB1XkvQI.cjs +0 -0
  53. package/dist/index-B_e8BwCm.d.cts +0 -1
  54. package/dist/index-CW2WHUXP.d.mts +0 -1
  55. package/dist/index-CiBIKhMu.d.cts +0 -1
  56. package/dist/index-mH1MEWOz.d.mts +0 -1
  57. package/dist/plugin-D3B5E_Hg.mjs +0 -1
  58. package/dist/plugin-D5qyQPqC.cjs +0 -0
  59. package/dist/plugin-DEIed7eA.d.cts.map +0 -1
  60. package/dist/plugin-yC9VrUHY.d.mts.map +0 -1
  61. package/dist/resolve-options-Cle7DV9O.d.mts.map +0 -1
  62. package/dist/resolve-options-DvHhJcbO.d.cts.map +0 -1
  63. package/dist/resolve-options-vZLZ1_cF.mjs +0 -37
  64. package/dist/resolve-options-vZLZ1_cF.mjs.map +0 -1
  65. package/dist/unplugin-B_f-YOTD.cjs +0 -16
  66. package/dist/unplugin-BhCM68JV.d.cts +0 -8
  67. package/dist/unplugin-BhCM68JV.d.cts.map +0 -1
  68. package/dist/unplugin-DKXmY9Ke.d.mts +0 -8
  69. package/dist/unplugin-DKXmY9Ke.d.mts.map +0 -1
  70. package/dist/unplugin-DeBr-5Sy.mjs +0 -11
  71. 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
- [![Version](https://img.shields.io/badge/version-0.5.339-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://stormsoftware.com/projects/powerlines)&nbsp;[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=for-the-badge&logo=commitlint&color=1fb2a6)](http://commitizen.github.io/cz-cli/)&nbsp;![Semantic-Release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=for-the-badge&color=1fb2a6)&nbsp;![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/storm-software/powerlines/release.yml?style=for-the-badge&logo=github-actions&color=1fb2a6)
30
+ [![Version](https://img.shields.io/badge/version-0.5.344-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://stormsoftware.com/projects/powerlines)&nbsp;[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=for-the-badge&logo=commitlint&color=1fb2a6)](http://commitizen.github.io/cz-cli/)&nbsp;![Semantic-Release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=for-the-badge&color=1fb2a6)&nbsp;![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/storm-software/powerlines/release.yml?style=for-the-badge&logo=github-actions&color=1fb2a6)
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
- - [Powerlines - Rspack Plugin](#powerlines---rspack-plugin)
62
- - [Table of Contents](#table-of-contents)
63
- - [Installing](#installing)
64
- - [Reduced Package Size](#reduced-package-size)
65
- - [Development](#development)
66
- - [Building](#building)
67
- - [Running unit tests](#running-unit-tests)
68
- - [Linting](#linting)
69
- - [Storm Workspaces](#storm-workspaces)
70
- - [Roadmap](#roadmap)
71
- - [Support](#support)
72
- - [License](#license)
73
- - [Changelog](#changelog)
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-BFd9LRNQ.d.cts.map
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-BceJYVLj.d.mts.map
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"}
@@ -1,6 +1,6 @@
1
- const require_resolve_options = require('../resolve-options-Dd1m9RDc.cjs');
2
- const require_unplugin = require('../unplugin-B_f-YOTD.cjs');
3
- require('../helpers-yB1XkvQI.cjs');
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 = require_unplugin.createRspackPlugin;
5
+ exports.createRspackPlugin = require_helpers_unplugin.createRspackPlugin;
6
6
  exports.resolveOptions = require_resolve_options.resolveOptions;
@@ -1,5 +1,3 @@
1
- import { t as resolveOptions } from "../resolve-options-DvHhJcbO.cjs";
2
- import "../plugin-DEIed7eA.cjs";
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 };
@@ -1,6 +1,3 @@
1
- import { t as resolveOptions } from "../resolve-options-Cle7DV9O.mjs";
2
- import "../build-BceJYVLj.mjs";
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 };
@@ -1,5 +1,4 @@
1
- import { t as resolveOptions } from "../resolve-options-vZLZ1_cF.mjs";
2
- import { t as createRspackPlugin } from "../unplugin-DeBr-5Sy.mjs";
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
- const require_resolve_options = require('../resolve-options-Dd1m9RDc.cjs');
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-DvHhJcbO.cjs";
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-Cle7DV9O.mjs";
1
+ import { t as resolveOptions } from "../resolve-options-BDVDHrY7.mjs";
2
2
  export { resolveOptions };
@@ -1,3 +1,37 @@
1
- import { t as resolveOptions } from "../resolve-options-vZLZ1_cF.mjs";
1
+ import defu from "defu";
2
+ import { joinPaths } from "@stryke/path/join-paths";
2
3
 
3
- export { resolveOptions };
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
- const require_unplugin = require('../unplugin-B_f-YOTD.cjs');
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
- exports.createRspackPlugin = require_unplugin.createRspackPlugin;
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,2 @@
1
- import "../plugin-DEIed7eA.cjs";
2
- import { t as createRspackPlugin } from "../unplugin-BhCM68JV.cjs";
1
+ import { t as createRspackPlugin } from "../unplugin-73PkIqlb.cjs";
3
2
  export { createRspackPlugin };
@@ -1,4 +1,2 @@
1
- import "../build-BceJYVLj.mjs";
2
- import "../plugin-yC9VrUHY.mjs";
3
- import { t as createRspackPlugin } from "../unplugin-DKXmY9Ke.mjs";
1
+ import { t as createRspackPlugin } from "../unplugin-Bem3qeWR.mjs";
4
2
  export { createRspackPlugin };
@@ -1,3 +1,11 @@
1
- import { t as createRspackPlugin } from "../unplugin-DeBr-5Sy.mjs";
1
+ import { createUnplugin } from "@powerlines/core/lib/unplugin";
2
+ import { createRspackPlugin as createRspackPlugin$1 } from "unplugin";
2
3
 
3
- export { createRspackPlugin };
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.defineProperty(exports, '__esModule', { value: true });
2
- const require_resolve_options = require('./resolve-options-Dd1m9RDc.cjs');
3
- const require_unplugin = require('./unplugin-B_f-YOTD.cjs');
4
- require('./helpers-yB1XkvQI.cjs');
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 __rspack_core = require("@rspack/core");
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, __rspack_core.rspack)((0, defu.default)({ entry: this.entry.reduce((ret, entry) => {
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: [require_unplugin.createRspackPlugin(this)] }));
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 = require_unplugin.createRspackPlugin;
36
- exports.default = src_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-DvHhJcbO.cjs";
2
- import { n as __ΩRspackOptions, t as RspackOptions } from "./build-BFd9LRNQ.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-DEIed7eA.cjs";
4
- import { t as createRspackPlugin } from "./unplugin-BhCM68JV.cjs";
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
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;;cAmCa,0BACM,sBAAsB,+BAE9B,wBACR,OAAO"}
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-Cle7DV9O.mjs";
2
- import { n as __ΩRspackOptions, t as RspackOptions } from "./build-BceJYVLj.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-yC9VrUHY.mjs";
4
- import { t as createRspackPlugin } from "./unplugin-DKXmY9Ke.mjs";
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
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;;cAmCa,0BACM,sBAAsB,+BAE9B,wBACR,OAAO"}
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 { t as resolveOptions } from "./resolve-options-vZLZ1_cF.mjs";
2
- import { t as createRspackPlugin } from "./unplugin-DeBr-5Sy.mjs";
3
- import "./helpers-C9XSjwSZ.mjs";
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, src_default as default, plugin, resolveOptions };
32
+ export { createRspackPlugin, plugin as default, plugin, resolveOptions };
34
33
  //# sourceMappingURL=index.mjs.map
@@ -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;;AAGH,kBAAe"}
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-BFd9LRNQ.cjs";
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-DEIed7eA.d.cts.map
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-BceJYVLj.mjs";
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-yC9VrUHY.d.mts.map
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-Cle7DV9O.d.mts.map
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-DvHhJcbO.d.cts.map
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 rolldown:runtime
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 __stryke_path_join_paths = require("@stryke/path/join-paths");
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, __stryke_path_join_paths.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.output.buildPath) },
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, __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),
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",
@@ -1,2 +1,2 @@
1
- import { n as __ΩRspackOptions, t as RspackOptions } from "../build-BFd9LRNQ.cjs";
1
+ import { n as __ΩRspackOptions, t as RspackOptions } from "../build-B8svWKBw.cjs";
2
2
  export { RspackOptions, __ΩRspackOptions };
@@ -1,2 +1,2 @@
1
- import { n as __ΩRspackOptions, t as RspackOptions } from "../build-BceJYVLj.mjs";
1
+ import { n as __ΩRspackOptions, t as RspackOptions } from "../build-yAGe0Dv9.mjs";
2
2
  export { RspackOptions, __ΩRspackOptions };
@@ -1,4 +1,3 @@
1
- import { n as __ΩRspackOptions, t as RspackOptions } from "../build-BFd9LRNQ.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-DEIed7eA.cjs";
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 };
@@ -1,4 +1,3 @@
1
- import { n as __ΩRspackOptions, t as RspackOptions } from "../build-BceJYVLj.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-yC9VrUHY.mjs";
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 };
@@ -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-DEIed7eA.cjs";
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 };
@@ -1,3 +1,2 @@
1
- import "../build-BceJYVLj.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-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.344",
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
- ".": { "require": "./dist/index.cjs", "import": "./dist/index.mjs" },
43
+ ".": { "import": "./dist/index.mjs", "require": "./dist/index.cjs" },
44
44
  "./helpers": {
45
- "require": "./dist/helpers/index.cjs",
46
- "import": "./dist/helpers/index.mjs"
45
+ "import": "./dist/helpers/index.mjs",
46
+ "require": "./dist/helpers/index.cjs"
47
47
  },
48
48
  "./helpers/resolve-options": {
49
- "require": "./dist/helpers/resolve-options.cjs",
50
- "import": "./dist/helpers/resolve-options.mjs"
49
+ "import": "./dist/helpers/resolve-options.mjs",
50
+ "require": "./dist/helpers/resolve-options.cjs"
51
51
  },
52
52
  "./helpers/unplugin": {
53
- "require": "./dist/helpers/unplugin.cjs",
54
- "import": "./dist/helpers/unplugin.mjs"
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
- "require": "./dist/types/index.cjs",
58
- "import": "./dist/types/index.mjs"
58
+ "import": "./dist/types/index.mjs",
59
+ "require": "./dist/types/index.cjs"
59
60
  },
60
61
  "./types/build": {
61
- "require": "./dist/types/build.cjs",
62
- "import": "./dist/types/build.mjs"
62
+ "import": "./dist/types/build.mjs",
63
+ "require": "./dist/types/build.cjs"
63
64
  },
64
65
  "./types/plugin": {
65
- "require": "./dist/types/plugin.cjs",
66
- "import": "./dist/types/plugin.mjs"
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.22",
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": "0ed0ad0cd6f440d1584ac705987ef985931161db"
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"}
File without changes
@@ -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 { };
@@ -1 +0,0 @@
1
- export { };
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"}