@powerlines/plugin-rspack 0.5.306 → 0.5.308
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/build-BFd9LRNQ.d.cts +8 -0
- package/dist/build-BFd9LRNQ.d.cts.map +1 -0
- package/dist/build-DA0tRXwM.d.mts +8 -0
- package/dist/build-DA0tRXwM.d.mts.map +1 -0
- package/dist/build-DJTI0ZMx.cjs +0 -0
- package/dist/build-XTM4L3VY.mjs +1 -0
- package/dist/helpers/index.cjs +5 -4
- package/dist/helpers/index.d.cts +5 -2
- package/dist/helpers/index.d.mts +5 -2
- package/dist/helpers/index.mjs +3 -2
- package/dist/helpers/resolve-options.cjs +2 -37
- package/dist/helpers/resolve-options.d.cts +2 -15
- package/dist/helpers/resolve-options.d.mts +2 -16
- package/dist/helpers/resolve-options.mjs +2 -36
- package/dist/helpers/unplugin.cjs +2 -11
- package/dist/helpers/unplugin.d.cts +4 -8
- package/dist/helpers/unplugin.d.mts +4 -8
- package/dist/helpers/unplugin.mjs +2 -11
- package/dist/helpers-C9XSjwSZ.mjs +1 -0
- package/dist/helpers-yB1XkvQI.cjs +0 -0
- package/dist/index-B_e8BwCm.d.cts +1 -0
- package/dist/index-CW2WHUXP.d.mts +1 -0
- package/dist/index-Cc7fCJU9.d.mts +1 -0
- package/dist/index-CiBIKhMu.d.cts +1 -0
- package/dist/index.cjs +10 -8
- package/dist/index.d.cts +7 -5
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +7 -8
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +6 -3
- package/dist/index.mjs.map +1 -1
- package/dist/plugin-D3B5E_Hg.mjs +1 -0
- package/dist/plugin-D5qyQPqC.cjs +0 -0
- package/dist/plugin-DK1UuZUT.d.cts +19 -0
- package/dist/plugin-DK1UuZUT.d.cts.map +1 -0
- package/dist/plugin-aE8qvTYa.d.mts +19 -0
- package/dist/plugin-aE8qvTYa.d.mts.map +1 -0
- package/dist/resolve-options-BJGgrWuy.d.cts +15 -0
- package/dist/resolve-options-BJGgrWuy.d.cts.map +1 -0
- package/dist/resolve-options-C1La6URI.d.mts +15 -0
- package/dist/resolve-options-C1La6URI.d.mts.map +1 -0
- package/dist/resolve-options-Dd1m9RDc.cjs +75 -0
- package/dist/resolve-options-vZLZ1_cF.mjs +37 -0
- package/dist/resolve-options-vZLZ1_cF.mjs.map +1 -0
- package/dist/types/build.cjs +1 -0
- package/dist/types/build.d.cts +2 -8
- package/dist/types/build.d.mts +2 -8
- package/dist/types/build.mjs +2 -0
- package/dist/types/index.cjs +3 -0
- package/dist/types/index.d.cts +3 -2
- package/dist/types/index.d.mts +3 -2
- package/dist/types/index.mjs +4 -0
- package/dist/types/plugin.cjs +1 -0
- package/dist/types/plugin.d.cts +3 -20
- package/dist/types/plugin.d.mts +3 -21
- package/dist/types/plugin.mjs +2 -0
- package/dist/types-D208vOSb.cjs +0 -0
- package/dist/types-Dv2cgIDx.mjs +1 -0
- package/dist/unplugin-B_f-YOTD.cjs +16 -0
- package/dist/unplugin-DeBr-5Sy.mjs +11 -0
- package/dist/unplugin-DeBr-5Sy.mjs.map +1 -0
- package/dist/unplugin-DlH_QSxJ.d.mts +8 -0
- package/dist/unplugin-DlH_QSxJ.d.mts.map +1 -0
- package/dist/unplugin-zy8DBcVf.d.cts +8 -0
- package/dist/unplugin-zy8DBcVf.d.cts.map +1 -0
- package/package.json +3 -3
- package/dist/_virtual/rolldown_runtime.cjs +0 -29
- package/dist/core/src/lib/logger.cjs +0 -41
- package/dist/core/src/lib/logger.mjs +0 -40
- package/dist/core/src/lib/logger.mjs.map +0 -1
- package/dist/core/src/lib/unplugin/helpers.cjs +0 -19
- package/dist/core/src/lib/unplugin/helpers.mjs +0 -19
- package/dist/core/src/lib/unplugin/helpers.mjs.map +0 -1
- package/dist/core/src/lib/unplugin/index.cjs +0 -3
- package/dist/core/src/lib/unplugin/index.mjs +0 -5
- package/dist/core/src/lib/unplugin/module-resolution.cjs +0 -66
- package/dist/core/src/lib/unplugin/module-resolution.mjs +0 -66
- package/dist/core/src/lib/unplugin/module-resolution.mjs.map +0 -1
- package/dist/core/src/lib/unplugin/plugin.cjs +0 -71
- package/dist/core/src/lib/unplugin/plugin.mjs +0 -71
- package/dist/core/src/lib/unplugin/plugin.mjs.map +0 -1
- package/dist/core/src/lib/utilities/source-file.cjs +0 -22
- package/dist/core/src/lib/utilities/source-file.mjs +0 -22
- package/dist/core/src/lib/utilities/source-file.mjs.map +0 -1
- package/dist/core/src/types/api.d.cts +0 -103
- package/dist/core/src/types/api.d.cts.map +0 -1
- package/dist/core/src/types/api.d.mts +0 -103
- package/dist/core/src/types/api.d.mts.map +0 -1
- package/dist/core/src/types/commands.d.cts +0 -9
- package/dist/core/src/types/commands.d.cts.map +0 -1
- package/dist/core/src/types/commands.d.mts +0 -10
- package/dist/core/src/types/commands.d.mts.map +0 -1
- package/dist/core/src/types/config.d.cts +0 -551
- package/dist/core/src/types/config.d.cts.map +0 -1
- package/dist/core/src/types/config.d.mts +0 -551
- package/dist/core/src/types/config.d.mts.map +0 -1
- package/dist/core/src/types/context.d.cts +0 -511
- package/dist/core/src/types/context.d.cts.map +0 -1
- package/dist/core/src/types/context.d.mts +0 -511
- package/dist/core/src/types/context.d.mts.map +0 -1
- package/dist/core/src/types/fs.d.cts +0 -487
- package/dist/core/src/types/fs.d.cts.map +0 -1
- package/dist/core/src/types/fs.d.mts +0 -487
- package/dist/core/src/types/fs.d.mts.map +0 -1
- package/dist/core/src/types/hooks.d.cts +0 -99
- package/dist/core/src/types/hooks.d.cts.map +0 -1
- package/dist/core/src/types/hooks.d.mts +0 -99
- package/dist/core/src/types/hooks.d.mts.map +0 -1
- package/dist/core/src/types/index.d.mts +0 -9
- package/dist/core/src/types/plugin.d.cts +0 -204
- package/dist/core/src/types/plugin.d.cts.map +0 -1
- package/dist/core/src/types/plugin.d.mts +0 -204
- package/dist/core/src/types/plugin.d.mts.map +0 -1
- package/dist/core/src/types/tsconfig.d.cts +0 -70
- package/dist/core/src/types/tsconfig.d.cts.map +0 -1
- package/dist/core/src/types/tsconfig.d.mts +0 -70
- package/dist/core/src/types/tsconfig.d.mts.map +0 -1
- package/dist/core/src/types/unplugin.cjs +0 -21
- package/dist/core/src/types/unplugin.d.cts +0 -24
- package/dist/core/src/types/unplugin.d.cts.map +0 -1
- package/dist/core/src/types/unplugin.d.mts +0 -25
- package/dist/core/src/types/unplugin.d.mts.map +0 -1
- package/dist/core/src/types/unplugin.mjs +0 -22
- package/dist/core/src/types/unplugin.mjs.map +0 -1
- package/dist/helpers/resolve-options.d.cts.map +0 -1
- package/dist/helpers/resolve-options.d.mts.map +0 -1
- package/dist/helpers/resolve-options.mjs.map +0 -1
- package/dist/helpers/unplugin.d.cts.map +0 -1
- package/dist/helpers/unplugin.d.mts.map +0 -1
- package/dist/helpers/unplugin.mjs.map +0 -1
- package/dist/types/build.d.cts.map +0 -1
- package/dist/types/build.d.mts.map +0 -1
- package/dist/types/plugin.d.cts.map +0 -1
- package/dist/types/plugin.d.mts.map +0 -1
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Configuration } from "@rspack/core";
|
|
2
|
+
|
|
3
|
+
//#region src/types/build.d.ts
|
|
4
|
+
type RspackOptions = Omit<Configuration, "name" | "entry" | "entryPoints" | "tsconfig" | "tsconfigRaw" | "environments" | "output" | "platform" | "define" | "external">;
|
|
5
|
+
declare type __ΩRspackOptions = any[];
|
|
6
|
+
//#endregion
|
|
7
|
+
export { __ΩRspackOptions as n, RspackOptions as t };
|
|
8
|
+
//# sourceMappingURL=build-BFd9LRNQ.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build-BFd9LRNQ.d.cts","names":[],"sources":["../src/types/build.ts"],"sourcesContent":[],"mappings":";;;KAoBY,aAAA,GAAgB,KAC1B"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Configuration } from "@rspack/core";
|
|
2
|
+
|
|
3
|
+
//#region src/types/build.d.ts
|
|
4
|
+
type RspackOptions = Omit<Configuration, "name" | "entry" | "entryPoints" | "tsconfig" | "tsconfigRaw" | "environments" | "output" | "platform" | "define" | "external">;
|
|
5
|
+
declare type __ΩRspackOptions = any[];
|
|
6
|
+
//#endregion
|
|
7
|
+
export { __ΩRspackOptions as n, RspackOptions as t };
|
|
8
|
+
//# sourceMappingURL=build-DA0tRXwM.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build-DA0tRXwM.d.mts","names":[],"sources":["../src/types/build.ts"],"sourcesContent":[],"mappings":";;;KAoBY,aAAA,GAAgB,KAC1B"}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
package/dist/helpers/index.cjs
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
const
|
|
2
|
-
const
|
|
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');
|
|
3
4
|
|
|
4
|
-
exports.createRspackPlugin =
|
|
5
|
-
exports.resolveOptions =
|
|
5
|
+
exports.createRspackPlugin = require_unplugin.createRspackPlugin;
|
|
6
|
+
exports.resolveOptions = require_resolve_options.resolveOptions;
|
package/dist/helpers/index.d.cts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
-
import { resolveOptions } from "
|
|
2
|
-
import
|
|
1
|
+
import { t as resolveOptions } from "../resolve-options-BJGgrWuy.cjs";
|
|
2
|
+
import "../build-BFd9LRNQ.cjs";
|
|
3
|
+
import "../plugin-DK1UuZUT.cjs";
|
|
4
|
+
import { t as createRspackPlugin } from "../unplugin-zy8DBcVf.cjs";
|
|
5
|
+
import "../index-CiBIKhMu.cjs";
|
|
3
6
|
export { createRspackPlugin, resolveOptions };
|
package/dist/helpers/index.d.mts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
-
import { resolveOptions } from "
|
|
2
|
-
import
|
|
1
|
+
import { t as resolveOptions } from "../resolve-options-C1La6URI.mjs";
|
|
2
|
+
import "../build-DA0tRXwM.mjs";
|
|
3
|
+
import "../plugin-aE8qvTYa.mjs";
|
|
4
|
+
import { t as createRspackPlugin } from "../unplugin-DlH_QSxJ.mjs";
|
|
5
|
+
import "../index-CW2WHUXP.mjs";
|
|
3
6
|
export { createRspackPlugin, resolveOptions };
|
package/dist/helpers/index.mjs
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { resolveOptions } from "
|
|
2
|
-
import { createRspackPlugin } from "
|
|
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";
|
|
3
4
|
|
|
4
5
|
export { createRspackPlugin, resolveOptions };
|
|
@@ -1,38 +1,3 @@
|
|
|
1
|
-
const
|
|
2
|
-
let defu = require("defu");
|
|
3
|
-
defu = require_rolldown_runtime.__toESM(defu);
|
|
4
|
-
let __stryke_path_join_paths = require("@stryke/path/join-paths");
|
|
1
|
+
const require_resolve_options = require('../resolve-options-Dd1m9RDc.cjs');
|
|
5
2
|
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Resolves the options for [rspack](https://rspack.rs/).
|
|
9
|
-
*
|
|
10
|
-
* @param context - The build context.
|
|
11
|
-
* @returns The resolved options.
|
|
12
|
-
*/
|
|
13
|
-
function resolveOptions(context) {
|
|
14
|
-
return (0, defu.default)({ resolve: { alias: context.alias } }, context.config.rspack ? context.config.rspack : {}, {
|
|
15
|
-
external: context.config.resolve.external,
|
|
16
|
-
noExternal: context.config.resolve.noExternal,
|
|
17
|
-
skipNodeModulesBundle: context.config.resolve.skipNodeModulesBundle
|
|
18
|
-
}, {
|
|
19
|
-
output: { path: (0, __stryke_path_join_paths.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.output.buildPath) },
|
|
20
|
-
name: context.config.name,
|
|
21
|
-
node: context.config.platform === "node" ? {
|
|
22
|
-
__dirname: true,
|
|
23
|
-
__filename: true,
|
|
24
|
-
global: true
|
|
25
|
-
} : false,
|
|
26
|
-
mode: context.config.mode === "development" ? "development" : "production",
|
|
27
|
-
recordsInputPath: (0, __stryke_path_join_paths.joinPaths)(context.cachePath, "rspack", ".rspack-records.json"),
|
|
28
|
-
recordsOutputPath: (0, __stryke_path_join_paths.joinPaths)(context.cachePath, "rspack", ".rspack-records.json"),
|
|
29
|
-
context: (0, __stryke_path_join_paths.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.root),
|
|
30
|
-
noExternal: context.builtins,
|
|
31
|
-
cache: context.config.mode === "development",
|
|
32
|
-
devtool: context.config.mode !== "development" ? false : "source-map",
|
|
33
|
-
optimization: { minimize: context.config.mode !== "development" }
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
//#endregion
|
|
38
|
-
exports.resolveOptions = resolveOptions;
|
|
3
|
+
exports.resolveOptions = require_resolve_options.resolveOptions;
|
|
@@ -1,15 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
//#region src/helpers/resolve-options.d.ts
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Resolves the options for [rspack](https://rspack.rs/).
|
|
8
|
-
*
|
|
9
|
-
* @param context - The build context.
|
|
10
|
-
* @returns The resolved options.
|
|
11
|
-
*/
|
|
12
|
-
declare function resolveOptions(context: Context): Configuration;
|
|
13
|
-
//#endregion
|
|
14
|
-
export { resolveOptions };
|
|
15
|
-
//# sourceMappingURL=resolve-options.d.cts.map
|
|
1
|
+
import { t as resolveOptions } from "../resolve-options-BJGgrWuy.cjs";
|
|
2
|
+
export { resolveOptions };
|
|
@@ -1,16 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import { Configuration } from "@rspack/core";
|
|
4
|
-
|
|
5
|
-
//#region src/helpers/resolve-options.d.ts
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Resolves the options for [rspack](https://rspack.rs/).
|
|
9
|
-
*
|
|
10
|
-
* @param context - The build context.
|
|
11
|
-
* @returns The resolved options.
|
|
12
|
-
*/
|
|
13
|
-
declare function resolveOptions(context: Context): Configuration;
|
|
14
|
-
//#endregion
|
|
15
|
-
export { resolveOptions };
|
|
16
|
-
//# sourceMappingURL=resolve-options.d.mts.map
|
|
1
|
+
import { t as resolveOptions } from "../resolve-options-C1La6URI.mjs";
|
|
2
|
+
export { resolveOptions };
|
|
@@ -1,37 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { joinPaths } from "@stryke/path/join-paths";
|
|
1
|
+
import { t as resolveOptions } from "../resolve-options-vZLZ1_cF.mjs";
|
|
3
2
|
|
|
4
|
-
|
|
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
|
|
3
|
+
export { resolveOptions };
|
|
@@ -1,12 +1,3 @@
|
|
|
1
|
-
const
|
|
2
|
-
const require_plugin = require('../core/src/lib/unplugin/plugin.cjs');
|
|
3
|
-
require('../core/src/lib/unplugin/index.cjs');
|
|
4
|
-
let unplugin = require("unplugin");
|
|
1
|
+
const require_unplugin = require('../unplugin-B_f-YOTD.cjs');
|
|
5
2
|
|
|
6
|
-
|
|
7
|
-
function createRspackPlugin(context) {
|
|
8
|
-
return (0, unplugin.createRspackPlugin)(require_plugin.createUnplugin(context))({});
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
//#endregion
|
|
12
|
-
exports.createRspackPlugin = createRspackPlugin;
|
|
3
|
+
exports.createRspackPlugin = require_unplugin.createRspackPlugin;
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
declare function createRspackPlugin(context: RspackPluginContext): unplugin0.RspackPluginInstance;
|
|
6
|
-
//#endregion
|
|
7
|
-
export { createRspackPlugin };
|
|
8
|
-
//# sourceMappingURL=unplugin.d.cts.map
|
|
1
|
+
import "../build-BFd9LRNQ.cjs";
|
|
2
|
+
import "../plugin-DK1UuZUT.cjs";
|
|
3
|
+
import { t as createRspackPlugin } from "../unplugin-zy8DBcVf.cjs";
|
|
4
|
+
export { createRspackPlugin };
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
declare function createRspackPlugin(context: RspackPluginContext): unplugin0.RspackPluginInstance;
|
|
6
|
-
//#endregion
|
|
7
|
-
export { createRspackPlugin };
|
|
8
|
-
//# sourceMappingURL=unplugin.d.mts.map
|
|
1
|
+
import "../build-DA0tRXwM.mjs";
|
|
2
|
+
import "../plugin-aE8qvTYa.mjs";
|
|
3
|
+
import { t as createRspackPlugin } from "../unplugin-DlH_QSxJ.mjs";
|
|
4
|
+
export { createRspackPlugin };
|
|
@@ -1,12 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "../core/src/lib/unplugin/index.mjs";
|
|
3
|
-
import { createRspackPlugin as createRspackPlugin$1 } from "unplugin";
|
|
1
|
+
import { t as createRspackPlugin } from "../unplugin-DeBr-5Sy.mjs";
|
|
4
2
|
|
|
5
|
-
|
|
6
|
-
function createRspackPlugin(context) {
|
|
7
|
-
return createRspackPlugin$1(createUnplugin(context))({});
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
//#endregion
|
|
11
|
-
export { createRspackPlugin };
|
|
12
|
-
//# sourceMappingURL=unplugin.mjs.map
|
|
3
|
+
export { createRspackPlugin };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
package/dist/index.cjs
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
|
-
const
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
require('./
|
|
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');
|
|
5
|
+
require('./build-DJTI0ZMx.cjs');
|
|
6
|
+
require('./plugin-D5qyQPqC.cjs');
|
|
7
|
+
require('./types-D208vOSb.cjs');
|
|
6
8
|
let __rspack_core = require("@rspack/core");
|
|
7
9
|
let defu = require("defu");
|
|
8
|
-
defu =
|
|
10
|
+
defu = require_resolve_options.__toESM(defu);
|
|
9
11
|
|
|
10
12
|
//#region src/index.ts
|
|
11
13
|
/**
|
|
@@ -25,14 +27,14 @@ const plugin = (options = {}) => {
|
|
|
25
27
|
(0, __rspack_core.rspack)((0, defu.default)({ entry: this.entry.reduce((ret, entry) => {
|
|
26
28
|
ret[entry.output || entry.name || entry.file] = entry.file;
|
|
27
29
|
return ret;
|
|
28
|
-
}, {}) },
|
|
30
|
+
}, {}) }, require_resolve_options.resolveOptions(this), { plugins: [require_unplugin.createRspackPlugin(this)] }));
|
|
29
31
|
}
|
|
30
32
|
};
|
|
31
33
|
};
|
|
32
34
|
var src_default = plugin;
|
|
33
35
|
|
|
34
36
|
//#endregion
|
|
35
|
-
exports.createRspackPlugin =
|
|
37
|
+
exports.createRspackPlugin = require_unplugin.createRspackPlugin;
|
|
36
38
|
exports.default = src_default;
|
|
37
39
|
exports.plugin = plugin;
|
|
38
|
-
exports.resolveOptions =
|
|
40
|
+
exports.resolveOptions = require_resolve_options.resolveOptions;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
1
|
+
import { t as resolveOptions } from "./resolve-options-BJGgrWuy.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-DK1UuZUT.cjs";
|
|
4
|
+
import { t as createRspackPlugin } from "./unplugin-zy8DBcVf.cjs";
|
|
5
|
+
import "./index-CiBIKhMu.cjs";
|
|
6
|
+
import "./index-B_e8BwCm.cjs";
|
|
7
|
+
import { Plugin } from "@powerlines/core/types";
|
|
6
8
|
|
|
7
9
|
//#region src/index.d.ts
|
|
8
10
|
/**
|
package/dist/index.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.ts"],"sourcesContent":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;;cAmCa,0BACM,sBAAsB,+BAE9B,wBACR,OAAO"}
|
package/dist/index.d.mts
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import "
|
|
8
|
-
import "./types/index.mjs";
|
|
1
|
+
import { t as resolveOptions } from "./resolve-options-C1La6URI.mjs";
|
|
2
|
+
import { n as __ΩRspackOptions, t as RspackOptions } from "./build-DA0tRXwM.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-aE8qvTYa.mjs";
|
|
4
|
+
import { t as createRspackPlugin } from "./unplugin-DlH_QSxJ.mjs";
|
|
5
|
+
import "./index-CW2WHUXP.mjs";
|
|
6
|
+
import "./index-Cc7fCJU9.mjs";
|
|
7
|
+
import { Plugin } from "@powerlines/core/types";
|
|
9
8
|
|
|
10
9
|
//#region src/index.d.ts
|
|
11
10
|
/**
|
package/dist/index.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"sourcesContent":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;;cAmCa,0BACM,sBAAsB,+BAE9B,wBACR,OAAO"}
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
import { resolveOptions } from "./
|
|
2
|
-
import { createRspackPlugin } from "./
|
|
3
|
-
import "./helpers
|
|
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";
|
|
4
|
+
import "./build-XTM4L3VY.mjs";
|
|
5
|
+
import "./plugin-D3B5E_Hg.mjs";
|
|
6
|
+
import "./types-Dv2cgIDx.mjs";
|
|
4
7
|
import { rspack } from "@rspack/core";
|
|
5
8
|
import defu from "defu";
|
|
6
9
|
|
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/types\";\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":"
|
|
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/types\";\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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
File without changes
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { t as RspackOptions } from "./build-BFd9LRNQ.cjs";
|
|
2
|
+
import { PluginContext, ResolvedConfig, UserConfig } from "@powerlines/core/types";
|
|
3
|
+
|
|
4
|
+
//#region src/types/plugin.d.ts
|
|
5
|
+
type RspackPluginOptions = Partial<RspackOptions>;
|
|
6
|
+
interface RspackPluginUserConfig extends UserConfig {
|
|
7
|
+
rspack?: RspackPluginOptions;
|
|
8
|
+
}
|
|
9
|
+
interface RspackPluginResolvedConfig extends ResolvedConfig {
|
|
10
|
+
rspack: RspackOptions;
|
|
11
|
+
}
|
|
12
|
+
type RspackPluginContext<TResolvedConfig extends RspackPluginResolvedConfig = RspackPluginResolvedConfig> = PluginContext<TResolvedConfig>;
|
|
13
|
+
declare type __ΩRspackPluginOptions = any[];
|
|
14
|
+
declare type __ΩRspackPluginUserConfig = any[];
|
|
15
|
+
declare type __ΩRspackPluginResolvedConfig = any[];
|
|
16
|
+
declare type __ΩRspackPluginContext = any[];
|
|
17
|
+
//#endregion
|
|
18
|
+
export { __ΩRspackPluginContext as a, __ΩRspackPluginUserConfig as c, RspackPluginUserConfig as i, RspackPluginOptions as n, __ΩRspackPluginOptions as o, RspackPluginResolvedConfig as r, __ΩRspackPluginResolvedConfig as s, RspackPluginContext as t };
|
|
19
|
+
//# sourceMappingURL=plugin-DK1UuZUT.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin-DK1UuZUT.d.cts","names":[],"sources":["../src/types/plugin.ts"],"sourcesContent":[],"mappings":";;;;KAyBY,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"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { t as RspackOptions } from "./build-DA0tRXwM.mjs";
|
|
2
|
+
import { PluginContext, ResolvedConfig, UserConfig } from "@powerlines/core/types";
|
|
3
|
+
|
|
4
|
+
//#region src/types/plugin.d.ts
|
|
5
|
+
type RspackPluginOptions = Partial<RspackOptions>;
|
|
6
|
+
interface RspackPluginUserConfig extends UserConfig {
|
|
7
|
+
rspack?: RspackPluginOptions;
|
|
8
|
+
}
|
|
9
|
+
interface RspackPluginResolvedConfig extends ResolvedConfig {
|
|
10
|
+
rspack: RspackOptions;
|
|
11
|
+
}
|
|
12
|
+
type RspackPluginContext<TResolvedConfig extends RspackPluginResolvedConfig = RspackPluginResolvedConfig> = PluginContext<TResolvedConfig>;
|
|
13
|
+
declare type __ΩRspackPluginOptions = any[];
|
|
14
|
+
declare type __ΩRspackPluginUserConfig = any[];
|
|
15
|
+
declare type __ΩRspackPluginResolvedConfig = any[];
|
|
16
|
+
declare type __ΩRspackPluginContext = any[];
|
|
17
|
+
//#endregion
|
|
18
|
+
export { __ΩRspackPluginContext as a, __ΩRspackPluginUserConfig as c, RspackPluginUserConfig as i, RspackPluginOptions as n, __ΩRspackPluginOptions as o, RspackPluginResolvedConfig as r, __ΩRspackPluginResolvedConfig as s, RspackPluginContext as t };
|
|
19
|
+
//# sourceMappingURL=plugin-aE8qvTYa.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin-aE8qvTYa.d.mts","names":[],"sources":["../src/types/plugin.ts"],"sourcesContent":[],"mappings":";;;;KAyBY,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"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Context } from "@powerlines/core/types";
|
|
2
|
+
import { Configuration } from "@rspack/core";
|
|
3
|
+
|
|
4
|
+
//#region src/helpers/resolve-options.d.ts
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Resolves the options for [rspack](https://rspack.rs/).
|
|
8
|
+
*
|
|
9
|
+
* @param context - The build context.
|
|
10
|
+
* @returns The resolved options.
|
|
11
|
+
*/
|
|
12
|
+
declare function resolveOptions(context: Context): Configuration;
|
|
13
|
+
//#endregion
|
|
14
|
+
export { resolveOptions as t };
|
|
15
|
+
//# sourceMappingURL=resolve-options-BJGgrWuy.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolve-options-BJGgrWuy.d.cts","names":[],"sources":["../src/helpers/resolve-options.ts"],"sourcesContent":[],"mappings":";;;;;;;AAiCA;;;;iBAAgB,cAAA,UAAwB,UAAU"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Configuration } from "@rspack/core";
|
|
2
|
+
import { Context } from "@powerlines/core/types";
|
|
3
|
+
|
|
4
|
+
//#region src/helpers/resolve-options.d.ts
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Resolves the options for [rspack](https://rspack.rs/).
|
|
8
|
+
*
|
|
9
|
+
* @param context - The build context.
|
|
10
|
+
* @returns The resolved options.
|
|
11
|
+
*/
|
|
12
|
+
declare function resolveOptions(context: Context): Configuration;
|
|
13
|
+
//#endregion
|
|
14
|
+
export { resolveOptions as t };
|
|
15
|
+
//# sourceMappingURL=resolve-options-C1La6URI.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolve-options-C1La6URI.d.mts","names":[],"sources":["../src/helpers/resolve-options.ts"],"sourcesContent":[],"mappings":";;;;;;;AAiCA;;;;iBAAgB,cAAA,UAAwB,UAAU"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
//#region rolldown:runtime
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __copyProps = (to, from, except, desc) => {
|
|
9
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
10
|
+
for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
11
|
+
key = keys[i];
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except) {
|
|
13
|
+
__defProp(to, key, {
|
|
14
|
+
get: ((k) => from[k]).bind(null, key),
|
|
15
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
22
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
23
|
+
value: mod,
|
|
24
|
+
enumerable: true
|
|
25
|
+
}) : target, mod));
|
|
26
|
+
|
|
27
|
+
//#endregion
|
|
28
|
+
let defu = require("defu");
|
|
29
|
+
defu = __toESM(defu);
|
|
30
|
+
let __stryke_path_join_paths = require("@stryke/path/join-paths");
|
|
31
|
+
|
|
32
|
+
//#region src/helpers/resolve-options.ts
|
|
33
|
+
/**
|
|
34
|
+
* Resolves the options for [rspack](https://rspack.rs/).
|
|
35
|
+
*
|
|
36
|
+
* @param context - The build context.
|
|
37
|
+
* @returns The resolved options.
|
|
38
|
+
*/
|
|
39
|
+
function resolveOptions(context) {
|
|
40
|
+
return (0, defu.default)({ resolve: { alias: context.alias } }, context.config.rspack ? context.config.rspack : {}, {
|
|
41
|
+
external: context.config.resolve.external,
|
|
42
|
+
noExternal: context.config.resolve.noExternal,
|
|
43
|
+
skipNodeModulesBundle: context.config.resolve.skipNodeModulesBundle
|
|
44
|
+
}, {
|
|
45
|
+
output: { path: (0, __stryke_path_join_paths.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.output.buildPath) },
|
|
46
|
+
name: context.config.name,
|
|
47
|
+
node: context.config.platform === "node" ? {
|
|
48
|
+
__dirname: true,
|
|
49
|
+
__filename: true,
|
|
50
|
+
global: true
|
|
51
|
+
} : false,
|
|
52
|
+
mode: context.config.mode === "development" ? "development" : "production",
|
|
53
|
+
recordsInputPath: (0, __stryke_path_join_paths.joinPaths)(context.cachePath, "rspack", ".rspack-records.json"),
|
|
54
|
+
recordsOutputPath: (0, __stryke_path_join_paths.joinPaths)(context.cachePath, "rspack", ".rspack-records.json"),
|
|
55
|
+
context: (0, __stryke_path_join_paths.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.root),
|
|
56
|
+
noExternal: context.builtins,
|
|
57
|
+
cache: context.config.mode === "development",
|
|
58
|
+
devtool: context.config.mode !== "development" ? false : "source-map",
|
|
59
|
+
optimization: { minimize: context.config.mode !== "development" }
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
//#endregion
|
|
64
|
+
Object.defineProperty(exports, '__toESM', {
|
|
65
|
+
enumerable: true,
|
|
66
|
+
get: function () {
|
|
67
|
+
return __toESM;
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
Object.defineProperty(exports, 'resolveOptions', {
|
|
71
|
+
enumerable: true,
|
|
72
|
+
get: function () {
|
|
73
|
+
return resolveOptions;
|
|
74
|
+
}
|
|
75
|
+
});
|
|
@@ -0,0 +1,37 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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/types\";\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"}
|
package/dist/types/build.cjs
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require('../build-DJTI0ZMx.cjs');
|