@powerlines/plugin-webpack 0.5.344 → 0.5.346
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -16
- package/dist/{build-Be4opB6C.d.cts → build-CEzG_xp-.d.mts} +1 -1
- package/dist/build-CEzG_xp-.d.mts.map +1 -0
- package/dist/{build-CX5LkFn-.d.mts → build-DOkvLIlZ.d.cts} +1 -1
- package/dist/build-DOkvLIlZ.d.cts.map +1 -0
- package/dist/helpers/index.cjs +4 -4
- package/dist/helpers/index.d.cts +2 -4
- package/dist/helpers/index.d.mts +2 -5
- package/dist/helpers/index.mjs +2 -3
- package/dist/helpers/resolve-options.cjs +2 -1
- package/dist/helpers/resolve-options.d.cts +1 -1
- package/dist/helpers/resolve-options.d.mts +1 -1
- package/dist/helpers/resolve-options.mjs +36 -2
- package/dist/helpers/resolve-options.mjs.map +1 -0
- package/dist/helpers/unplugin.cjs +11 -2
- package/dist/helpers/unplugin.d.cts +1 -2
- package/dist/helpers/unplugin.d.mts +1 -3
- package/dist/helpers/unplugin.mjs +10 -2
- package/dist/helpers/unplugin.mjs.map +1 -0
- package/dist/index.cjs +7 -8
- package/dist/index.d.cts +3 -5
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +3 -6
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +4 -5
- package/dist/index.mjs.map +1 -1
- package/dist/{plugin-CzRwwkrS.d.cts → plugin--CJErpdu.d.cts} +2 -2
- package/dist/plugin--CJErpdu.d.cts.map +1 -0
- package/dist/{plugin-D-0RbJQ8.d.mts → plugin-CYgzAw-a.d.mts} +2 -2
- package/dist/plugin-CYgzAw-a.d.mts.map +1 -0
- package/dist/{resolve-options-CzhvxyM8.cjs → resolve-options-DeOdP6uU.cjs} +7 -7
- package/dist/{resolve-options-COX0cHB5.d.mts → resolve-options-UpQ8DhtP.d.cts} +2 -3
- package/dist/resolve-options-UpQ8DhtP.d.cts.map +1 -0
- package/dist/{resolve-options-DDI_x0af.d.cts → resolve-options-yCbwWgKL.d.mts} +2 -3
- package/dist/resolve-options-yCbwWgKL.d.mts.map +1 -0
- package/dist/types/build.d.cts +1 -1
- package/dist/types/build.d.mts +1 -1
- package/dist/types/index.d.cts +1 -2
- package/dist/types/index.d.mts +1 -3
- package/dist/types/plugin.d.cts +1 -1
- package/dist/types/plugin.d.mts +1 -2
- package/dist/unplugin-CUN9CPLL.d.mts +8 -0
- package/dist/unplugin-CUN9CPLL.d.mts.map +1 -0
- package/dist/unplugin-DfOu6nzf.d.cts +8 -0
- package/dist/unplugin-DfOu6nzf.d.cts.map +1 -0
- package/package.json +17 -16
- package/dist/build-Be4opB6C.d.cts.map +0 -1
- package/dist/build-CX5LkFn-.d.mts.map +0 -1
- package/dist/helpers-C9XSjwSZ.mjs +0 -1
- package/dist/helpers-yB1XkvQI.cjs +0 -0
- package/dist/index-2Ag-54t8.d.mts +0 -1
- package/dist/index-B_e8BwCm.d.cts +0 -1
- package/dist/index-CiBIKhMu.d.cts +0 -1
- package/dist/index-mH1MEWOz.d.mts +0 -1
- package/dist/plugin-BykaHmY4.mjs +0 -1
- package/dist/plugin-Ckx8qAq8.cjs +0 -0
- package/dist/plugin-CzRwwkrS.d.cts.map +0 -1
- package/dist/plugin-D-0RbJQ8.d.mts.map +0 -1
- package/dist/resolve-options-COX0cHB5.d.mts.map +0 -1
- package/dist/resolve-options-DDI_x0af.d.cts.map +0 -1
- package/dist/resolve-options-u4_-_S6N.mjs +0 -37
- package/dist/resolve-options-u4_-_S6N.mjs.map +0 -1
- package/dist/unplugin-BnUJp-Il.cjs +0 -16
- package/dist/unplugin-BpdMF4ey.mjs +0 -11
- package/dist/unplugin-BpdMF4ey.mjs.map +0 -1
- package/dist/unplugin-BubjFjr2.d.mts +0 -8
- package/dist/unplugin-BubjFjr2.d.mts.map +0 -1
- package/dist/unplugin-D-6t9TmW.d.cts +0 -8
- package/dist/unplugin-D-6t9TmW.d.cts.map +0 -1
package/README.md
CHANGED
|
@@ -27,7 +27,7 @@ This package is part of the <b>🔌 Powerlines</b> monorepo. Powerlines is the "
|
|
|
27
27
|
|
|
28
28
|
<h3 align="center">💻 Visit <a href="https://stormsoftware.com" target="_blank">stormsoftware.com</a> to stay up to date with this developer</h3><br />
|
|
29
29
|
|
|
30
|
-
[](https://stormsoftware.com/projects/powerlines) [](http://commitizen.github.io/cz-cli/)  
|
|
31
31
|
|
|
32
32
|
<!-- prettier-ignore-start -->
|
|
33
33
|
<!-- markdownlint-disable -->
|
|
@@ -58,21 +58,19 @@ A package containing a Powerlines plugin to build projects using [Webpack](https
|
|
|
58
58
|
|
|
59
59
|
## Table of Contents
|
|
60
60
|
|
|
61
|
-
- [
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
- [
|
|
65
|
-
- [
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
- [Contributing](#contributing)
|
|
75
|
-
- [Contributors](#contributors)
|
|
61
|
+
- [Installing](#installing)
|
|
62
|
+
- [Reduced Package Size](#reduced-package-size)
|
|
63
|
+
- [Development](#development)
|
|
64
|
+
- [Building](#building)
|
|
65
|
+
- [Running unit tests](#running-unit-tests)
|
|
66
|
+
- [Linting](#linting)
|
|
67
|
+
- [Storm Workspaces](#storm-workspaces)
|
|
68
|
+
- [Roadmap](#roadmap)
|
|
69
|
+
- [Support](#support)
|
|
70
|
+
- [License](#license)
|
|
71
|
+
- [Changelog](#changelog)
|
|
72
|
+
- [Contributing](#contributing)
|
|
73
|
+
- [Contributors](#contributors)
|
|
76
74
|
|
|
77
75
|
<!-- END doctoc -->
|
|
78
76
|
|
|
@@ -5,4 +5,4 @@ type WebpackOptions = Omit<Configuration, "name" | "entry" | "entryPoints" | "ts
|
|
|
5
5
|
declare type __ΩWebpackOptions = any[];
|
|
6
6
|
//#endregion
|
|
7
7
|
export { __ΩWebpackOptions as n, WebpackOptions as t };
|
|
8
|
-
//# sourceMappingURL=build-
|
|
8
|
+
//# sourceMappingURL=build-CEzG_xp-.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build-CEzG_xp-.d.mts","names":[],"sources":["../src/types/build.ts"],"mappings":";;;KAoBY,cAAA,GAAiB,IAAA,CAC3B,aAAA;AAAA"}
|
|
@@ -5,4 +5,4 @@ type WebpackOptions = Omit<Configuration, "name" | "entry" | "entryPoints" | "ts
|
|
|
5
5
|
declare type __ΩWebpackOptions = any[];
|
|
6
6
|
//#endregion
|
|
7
7
|
export { __ΩWebpackOptions as n, WebpackOptions as t };
|
|
8
|
-
//# sourceMappingURL=build-
|
|
8
|
+
//# sourceMappingURL=build-DOkvLIlZ.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build-DOkvLIlZ.d.cts","names":[],"sources":["../src/types/build.ts"],"mappings":";;;KAoBY,cAAA,GAAiB,IAAA,CAC3B,aAAA;AAAA"}
|
package/dist/helpers/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
const
|
|
3
|
-
require('
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
const require_resolve_options = require('../resolve-options-DeOdP6uU.cjs');
|
|
3
|
+
const require_helpers_unplugin = require('./unplugin.cjs');
|
|
4
4
|
|
|
5
|
-
exports.createWebpackPlugin =
|
|
5
|
+
exports.createWebpackPlugin = require_helpers_unplugin.createWebpackPlugin;
|
|
6
6
|
exports.resolveOptions = require_resolve_options.resolveOptions;
|
package/dist/helpers/index.d.cts
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { t as resolveOptions } from "../resolve-options-
|
|
2
|
-
import "../
|
|
3
|
-
import { t as createWebpackPlugin } from "../unplugin-D-6t9TmW.cjs";
|
|
4
|
-
import "../index-CiBIKhMu.cjs";
|
|
1
|
+
import { t as resolveOptions } from "../resolve-options-UpQ8DhtP.cjs";
|
|
2
|
+
import { t as createWebpackPlugin } from "../unplugin-DfOu6nzf.cjs";
|
|
5
3
|
export { createWebpackPlugin, resolveOptions };
|
package/dist/helpers/index.d.mts
CHANGED
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import { t as resolveOptions } from "../resolve-options-
|
|
2
|
-
import "../
|
|
3
|
-
import "../plugin-D-0RbJQ8.mjs";
|
|
4
|
-
import { t as createWebpackPlugin } from "../unplugin-BubjFjr2.mjs";
|
|
5
|
-
import "../index-2Ag-54t8.mjs";
|
|
1
|
+
import { t as resolveOptions } from "../resolve-options-yCbwWgKL.mjs";
|
|
2
|
+
import { t as createWebpackPlugin } from "../unplugin-CUN9CPLL.mjs";
|
|
6
3
|
export { createWebpackPlugin, resolveOptions };
|
package/dist/helpers/index.mjs
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import "../helpers-C9XSjwSZ.mjs";
|
|
1
|
+
import { resolveOptions } from "./resolve-options.mjs";
|
|
2
|
+
import { createWebpackPlugin } from "./unplugin.mjs";
|
|
4
3
|
|
|
5
4
|
export { createWebpackPlugin, resolveOptions };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
const require_resolve_options = require('../resolve-options-DeOdP6uU.cjs');
|
|
2
3
|
|
|
3
4
|
exports.resolveOptions = require_resolve_options.resolveOptions;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as resolveOptions } from "../resolve-options-
|
|
1
|
+
import { t as resolveOptions } from "../resolve-options-UpQ8DhtP.cjs";
|
|
2
2
|
export { resolveOptions };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as resolveOptions } from "../resolve-options-
|
|
1
|
+
import { t as resolveOptions } from "../resolve-options-yCbwWgKL.mjs";
|
|
2
2
|
export { resolveOptions };
|
|
@@ -1,3 +1,37 @@
|
|
|
1
|
-
import
|
|
1
|
+
import defu from "defu";
|
|
2
|
+
import { joinPaths } from "@stryke/path/join-paths";
|
|
2
3
|
|
|
3
|
-
|
|
4
|
+
//#region src/helpers/resolve-options.ts
|
|
5
|
+
/**
|
|
6
|
+
* Resolves the options for [webpack](https://webpack.js.org/).
|
|
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.webpack ? context.config.webpack : {}, {
|
|
13
|
+
output: { path: joinPaths(context.workspaceConfig.workspaceRoot, context.config.output.buildPath) },
|
|
14
|
+
name: context.config.name,
|
|
15
|
+
plugins: context.config.webpack?.plugins ?? [],
|
|
16
|
+
node: context.config.platform === "node" ? {
|
|
17
|
+
__dirname: true,
|
|
18
|
+
__filename: true,
|
|
19
|
+
global: true
|
|
20
|
+
} : false,
|
|
21
|
+
mode: context.config.mode === "development" ? "development" : "production",
|
|
22
|
+
cache: {
|
|
23
|
+
type: "filesystem",
|
|
24
|
+
cacheDirectory: joinPaths(context.cachePath, "webpack", "cache")
|
|
25
|
+
},
|
|
26
|
+
recordsInputPath: joinPaths(context.cachePath, "webpack", ".webpack-records.json"),
|
|
27
|
+
recordsOutputPath: joinPaths(context.cachePath, "webpack", ".webpack-records.json"),
|
|
28
|
+
context: joinPaths(context.workspaceConfig.workspaceRoot, context.config.root),
|
|
29
|
+
noExternal: context.builtins,
|
|
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 { joinPaths } from \"@stryke/path/join-paths\";\nimport defu from \"defu\";\nimport type { Configuration as ExternalWebpackOptions } from \"webpack\";\nimport { WebpackPluginResolvedConfig } from \"../types\";\n\n/**\n * Resolves the options for [webpack](https://webpack.js.org/).\n *\n * @param context - The build context.\n * @returns The resolved options.\n */\nexport function resolveOptions(context: Context): ExternalWebpackOptions {\n return defu(\n {\n resolve: {\n alias: context.alias\n }\n },\n (context.config as WebpackPluginResolvedConfig).webpack\n ? (context.config as WebpackPluginResolvedConfig).webpack\n : {},\n {\n output: {\n path: joinPaths(\n context.workspaceConfig.workspaceRoot,\n context.config.output.buildPath\n )\n },\n name: context.config.name,\n plugins:\n (context.config as WebpackPluginResolvedConfig).webpack?.plugins ?? [],\n node:\n context.config.platform === \"node\"\n ? ({\n __dirname: true,\n __filename: true,\n global: true\n } as ExternalWebpackOptions[\"node\"])\n : false,\n mode:\n context.config.mode === \"development\"\n ? (\"development\" as const)\n : (\"production\" as const),\n cache: {\n type: \"filesystem\" as const,\n cacheDirectory: joinPaths(context.cachePath, \"webpack\", \"cache\")\n },\n recordsInputPath: joinPaths(\n context.cachePath,\n \"webpack\",\n \".webpack-records.json\"\n ),\n recordsOutputPath: joinPaths(\n context.cachePath,\n \"webpack\",\n \".webpack-records.json\"\n ),\n context: joinPaths(\n context.workspaceConfig.workspaceRoot,\n context.config.root\n ),\n noExternal: context.builtins,\n devtool: (context.config.mode !== \"development\"\n ? false\n : \"source-map\") as string | false,\n optimization: {\n minimize: context.config.mode !== \"development\"\n }\n }\n );\n}\n"],"mappings":";;;;;;;;;;AA8BA,SAAgB,eAAe,SAA0C;AACvE,QAAO,KACL,EACE,SAAS,EACP,OAAO,QAAQ,OAChB,EACF,EACA,QAAQ,OAAuC,UAC3C,QAAQ,OAAuC,UAChD,EAAE,EACN;EACE,QAAQ,EACN,MAAM,UACJ,QAAQ,gBAAgB,eACxB,QAAQ,OAAO,OAAO,UACvB,EACF;EACD,MAAM,QAAQ,OAAO;EACrB,SACG,QAAQ,OAAuC,SAAS,WAAW,EAAE;EACxE,MACE,QAAQ,OAAO,aAAa,SACvB;GACC,WAAW;GACX,YAAY;GACZ,QAAQ;GACT,GACD;EACN,MACE,QAAQ,OAAO,SAAS,gBACnB,gBACA;EACP,OAAO;GACL,MAAM;GACN,gBAAgB,UAAU,QAAQ,WAAW,WAAW,QAAQ;GACjE;EACD,kBAAkB,UAChB,QAAQ,WACR,WACA,wBACD;EACD,mBAAmB,UACjB,QAAQ,WACR,WACA,wBACD;EACD,SAAS,UACP,QAAQ,gBAAgB,eACxB,QAAQ,OAAO,KAChB;EACD,YAAY,QAAQ;EACpB,SAAU,QAAQ,OAAO,SAAS,gBAC9B,QACA;EACJ,cAAc,EACZ,UAAU,QAAQ,OAAO,SAAS,eACnC;EACF,CACF"}
|
|
@@ -1,3 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
const require_resolve_options = require('../resolve-options-DeOdP6uU.cjs');
|
|
3
|
+
let _powerlines_core_lib_unplugin = require("@powerlines/core/lib/unplugin");
|
|
4
|
+
let unplugin = require("unplugin");
|
|
2
5
|
|
|
3
|
-
|
|
6
|
+
//#region src/helpers/unplugin.ts
|
|
7
|
+
function createWebpackPlugin(context) {
|
|
8
|
+
return (0, unplugin.createWebpackPlugin)((0, _powerlines_core_lib_unplugin.createUnplugin)(context))({});
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
//#endregion
|
|
12
|
+
exports.createWebpackPlugin = createWebpackPlugin;
|
|
@@ -1,3 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createUnplugin } from "@powerlines/core/lib/unplugin";
|
|
2
|
+
import { createWebpackPlugin as createWebpackPlugin$1 } from "unplugin";
|
|
2
3
|
|
|
3
|
-
|
|
4
|
+
//#region src/helpers/unplugin.ts
|
|
5
|
+
function createWebpackPlugin(context) {
|
|
6
|
+
return createWebpackPlugin$1(createUnplugin(context))({});
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
//#endregion
|
|
10
|
+
export { createWebpackPlugin };
|
|
11
|
+
//# sourceMappingURL=unplugin.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unplugin.mjs","names":["createWebpackUnplugin"],"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 { createWebpackPlugin as createWebpackUnplugin } from \"unplugin\";\nimport { WebpackPluginContext } from \"../types/plugin\";\n\nexport function createWebpackPlugin(context: WebpackPluginContext) {\n return createWebpackUnplugin(createUnplugin(context))({});\n}\n"],"mappings":";;;;AAsBA,SAAgB,oBAAoB,SAA+B;AACjE,QAAOA,sBAAsB,eAAe,QAAQ,CAAC,CAAC,EAAE,CAAC"}
|
package/dist/index.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
Object.
|
|
2
|
-
const require_resolve_options = require('./resolve-options-
|
|
3
|
-
const
|
|
4
|
-
require('./helpers
|
|
1
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
|
|
2
|
+
const require_resolve_options = require('./resolve-options-DeOdP6uU.cjs');
|
|
3
|
+
const require_helpers_unplugin = require('./helpers/unplugin.cjs');
|
|
4
|
+
require('./helpers/index.cjs');
|
|
5
5
|
require('./types/index.cjs');
|
|
6
6
|
let defu = require("defu");
|
|
7
7
|
defu = require_resolve_options.__toESM(defu);
|
|
@@ -23,14 +23,13 @@ const plugin = (options = {}) => {
|
|
|
23
23
|
(0, webpack.default)((0, defu.default)({ entry: this.entry.reduce((ret, entry) => {
|
|
24
24
|
ret[entry.output || entry.name || entry.file] = entry.file;
|
|
25
25
|
return ret;
|
|
26
|
-
}, {}) }, require_resolve_options.resolveOptions(this), { plugins: [
|
|
26
|
+
}, {}) }, require_resolve_options.resolveOptions(this), { plugins: [require_helpers_unplugin.createWebpackPlugin(this)] }));
|
|
27
27
|
}
|
|
28
28
|
};
|
|
29
29
|
};
|
|
30
|
-
var src_default = plugin;
|
|
31
30
|
|
|
32
31
|
//#endregion
|
|
33
|
-
exports.createWebpackPlugin =
|
|
34
|
-
exports.default =
|
|
32
|
+
exports.createWebpackPlugin = require_helpers_unplugin.createWebpackPlugin;
|
|
33
|
+
exports.default = plugin;
|
|
35
34
|
exports.plugin = plugin;
|
|
36
35
|
exports.resolveOptions = require_resolve_options.resolveOptions;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import { t as resolveOptions } from "./resolve-options-
|
|
2
|
-
import { a as __ΩWebpackPluginContext, c as __ΩWebpackPluginUserConfig, i as WebpackPluginUserConfig, n as WebpackPluginOptions, o as __ΩWebpackPluginOptions, r as WebpackPluginResolvedConfig, s as __ΩWebpackPluginResolvedConfig, t as WebpackPluginContext } from "./plugin
|
|
3
|
-
import { t as createWebpackPlugin } from "./unplugin-
|
|
4
|
-
import "./index-CiBIKhMu.cjs";
|
|
5
|
-
import "./index-B_e8BwCm.cjs";
|
|
1
|
+
import { t as resolveOptions } from "./resolve-options-UpQ8DhtP.cjs";
|
|
2
|
+
import { a as __ΩWebpackPluginContext, c as __ΩWebpackPluginUserConfig, i as WebpackPluginUserConfig, n as WebpackPluginOptions, o as __ΩWebpackPluginOptions, r as WebpackPluginResolvedConfig, s as __ΩWebpackPluginResolvedConfig, t as WebpackPluginContext } from "./plugin--CJErpdu.cjs";
|
|
3
|
+
import { t as createWebpackPlugin } from "./unplugin-DfOu6nzf.cjs";
|
|
6
4
|
import { Plugin } from "@powerlines/core";
|
|
7
5
|
|
|
8
6
|
//#region src/index.d.ts
|
package/dist/index.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.ts"],"
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.ts"],"mappings":";;;;;;;YAiCY,MAAA;IACR,OAAA,GAAU,oBAAA;EAAA;AAAA;;;;cAOD,MAAA,oBACM,oBAAA,GAAuB,oBAAA,EAExC,OAAA,GAAS,oBAAA,KACR,MAAA,CAAO,QAAA"}
|
package/dist/index.d.mts
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
import { t as resolveOptions } from "./resolve-options-
|
|
2
|
-
import "./
|
|
3
|
-
import {
|
|
4
|
-
import { t as createWebpackPlugin } from "./unplugin-BubjFjr2.mjs";
|
|
5
|
-
import "./index-2Ag-54t8.mjs";
|
|
6
|
-
import "./index-mH1MEWOz.mjs";
|
|
1
|
+
import { t as resolveOptions } from "./resolve-options-yCbwWgKL.mjs";
|
|
2
|
+
import { a as __ΩWebpackPluginContext, c as __ΩWebpackPluginUserConfig, i as WebpackPluginUserConfig, n as WebpackPluginOptions, o as __ΩWebpackPluginOptions, r as WebpackPluginResolvedConfig, s as __ΩWebpackPluginResolvedConfig, t as WebpackPluginContext } from "./plugin-CYgzAw-a.mjs";
|
|
3
|
+
import { t as createWebpackPlugin } from "./unplugin-CUN9CPLL.mjs";
|
|
7
4
|
import { Plugin } from "@powerlines/core";
|
|
8
5
|
|
|
9
6
|
//#region src/index.d.ts
|
package/dist/index.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"mappings":";;;;;;;YAiCY,MAAA;IACR,OAAA,GAAU,oBAAA;EAAA;AAAA;AAJU;;;AAAA,cAWX,MAAA,oBACM,oBAAA,GAAuB,oBAAA,EAExC,OAAA,GAAS,oBAAA,KACR,MAAA,CAAO,QAAA"}
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import "./helpers
|
|
1
|
+
import { resolveOptions } from "./helpers/resolve-options.mjs";
|
|
2
|
+
import { createWebpackPlugin } from "./helpers/unplugin.mjs";
|
|
3
|
+
import "./helpers/index.mjs";
|
|
4
4
|
import "./types/index.mjs";
|
|
5
5
|
import defu from "defu";
|
|
6
6
|
import build from "webpack";
|
|
@@ -24,8 +24,7 @@ const plugin = (options = {}) => {
|
|
|
24
24
|
}
|
|
25
25
|
};
|
|
26
26
|
};
|
|
27
|
-
var src_default = plugin;
|
|
28
27
|
|
|
29
28
|
//#endregion
|
|
30
|
-
export { createWebpackPlugin,
|
|
29
|
+
export { createWebpackPlugin, plugin as default, plugin, resolveOptions };
|
|
31
30
|
//# sourceMappingURL=index.mjs.map
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":[],"sources":["../src/index.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { Plugin } from \"@powerlines/core\";\nimport defu from \"defu\";\nimport build from \"webpack\";\nimport { resolveOptions } from \"./helpers/resolve-options\";\nimport { createWebpackPlugin } from \"./helpers/unplugin\";\nimport {\n WebpackPluginContext,\n WebpackPluginOptions,\n WebpackPluginResolvedConfig\n} from \"./types/plugin\";\n\nexport * from \"./helpers\";\nexport * from \"./types\";\n\ndeclare module \"@powerlines/core\" {\n interface Config {\n webpack?: WebpackPluginOptions;\n }\n}\n\n/**\n * A Powerlines plugin to assist in developing other Powerlines plugins.\n */\nexport const plugin = <\n TContext extends WebpackPluginContext = WebpackPluginContext\n>(\n options: WebpackPluginOptions = {}\n): Plugin<TContext> => {\n return {\n name: \"webpack\",\n config() {\n this.trace(\n \"Providing default configuration for the Powerlines `webpack` build plugin.\"\n );\n\n return {\n webpack: {\n ...options\n }\n } as Partial<WebpackPluginResolvedConfig>;\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: [createWebpackPlugin(this)]\n }\n )\n );\n }\n };\n};\n\nexport default plugin;\n"],"mappings":";;;;;;;;;;;AAyCA,MAAa,UAGX,UAAgC,EAAE,KACb;AACrB,QAAO;EACL,MAAM;EACN,SAAS;AACP,QAAK,MACH,6EACD;AAED,UAAO,EACL,SAAS,EACP,GAAG,SACJ,EACF;;EAEH,MAAM,QAAQ;AACZ,SACE,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,oBAAoB,KAAK,CAAC,EACrC,CACF,CACF;;EAEJ
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../src/index.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { Plugin } from \"@powerlines/core\";\nimport defu from \"defu\";\nimport build from \"webpack\";\nimport { resolveOptions } from \"./helpers/resolve-options\";\nimport { createWebpackPlugin } from \"./helpers/unplugin\";\nimport {\n WebpackPluginContext,\n WebpackPluginOptions,\n WebpackPluginResolvedConfig\n} from \"./types/plugin\";\n\nexport * from \"./helpers\";\nexport * from \"./types\";\n\ndeclare module \"@powerlines/core\" {\n interface Config {\n webpack?: WebpackPluginOptions;\n }\n}\n\n/**\n * A Powerlines plugin to assist in developing other Powerlines plugins.\n */\nexport const plugin = <\n TContext extends WebpackPluginContext = WebpackPluginContext\n>(\n options: WebpackPluginOptions = {}\n): Plugin<TContext> => {\n return {\n name: \"webpack\",\n config() {\n this.trace(\n \"Providing default configuration for the Powerlines `webpack` build plugin.\"\n );\n\n return {\n webpack: {\n ...options\n }\n } as Partial<WebpackPluginResolvedConfig>;\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: [createWebpackPlugin(this)]\n }\n )\n );\n }\n };\n};\n\nexport default plugin;\n"],"mappings":";;;;;;;;;;;AAyCA,MAAa,UAGX,UAAgC,EAAE,KACb;AACrB,QAAO;EACL,MAAM;EACN,SAAS;AACP,QAAK,MACH,6EACD;AAED,UAAO,EACL,SAAS,EACP,GAAG,SACJ,EACF;;EAEH,MAAM,QAAQ;AACZ,SACE,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,oBAAoB,KAAK,CAAC,EACrC,CACF,CACF;;EAEJ"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as WebpackOptions } from "./build-
|
|
1
|
+
import { t as WebpackOptions } from "./build-DOkvLIlZ.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 __ΩWebpackPluginResolvedConfig = any[];
|
|
|
16
16
|
declare type __ΩWebpackPluginContext = any[];
|
|
17
17
|
//#endregion
|
|
18
18
|
export { __ΩWebpackPluginContext as a, __ΩWebpackPluginUserConfig as c, WebpackPluginUserConfig as i, WebpackPluginOptions as n, __ΩWebpackPluginOptions as o, WebpackPluginResolvedConfig as r, __ΩWebpackPluginResolvedConfig as s, WebpackPluginContext as t };
|
|
19
|
-
//# sourceMappingURL=plugin
|
|
19
|
+
//# sourceMappingURL=plugin--CJErpdu.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin--CJErpdu.d.cts","names":[],"sources":["../src/types/plugin.ts"],"mappings":";;;;KAqBY,oBAAA,GAAuB,OAAA,CAAQ,cAAA;AAAA,UAE1B,uBAAA,SAAgC,UAAA;EAC/C,OAAA,GAAU,oBAAA;AAAA;AAAA,UAGK,2BAAA,SAAoC,cAAA;EACnD,OAAA,EAAS,cAAA;AAAA;AAAA,KAGC,oBAAA,yBACc,2BAAA,GACtB,2BAAA,IACA,aAAA,CAAc,eAAA;AAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as WebpackOptions } from "./build-
|
|
1
|
+
import { t as WebpackOptions } from "./build-CEzG_xp-.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 __ΩWebpackPluginResolvedConfig = any[];
|
|
|
16
16
|
declare type __ΩWebpackPluginContext = any[];
|
|
17
17
|
//#endregion
|
|
18
18
|
export { __ΩWebpackPluginContext as a, __ΩWebpackPluginUserConfig as c, WebpackPluginUserConfig as i, WebpackPluginOptions as n, __ΩWebpackPluginOptions as o, WebpackPluginResolvedConfig as r, __ΩWebpackPluginResolvedConfig as s, WebpackPluginContext as t };
|
|
19
|
-
//# sourceMappingURL=plugin-
|
|
19
|
+
//# sourceMappingURL=plugin-CYgzAw-a.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin-CYgzAw-a.d.mts","names":[],"sources":["../src/types/plugin.ts"],"mappings":";;;;KAqBY,oBAAA,GAAuB,OAAA,CAAQ,cAAA;AAAA,UAE1B,uBAAA,SAAgC,UAAA;EAC/C,OAAA,GAAU,oBAAA;AAAA;AAAA,UAGK,2BAAA,SAAoC,cAAA;EACnD,OAAA,EAAS,cAAA;AAAA;AAAA,KAGC,oBAAA,yBACc,2BAAA,GACtB,2BAAA,IACA,aAAA,CAAc,eAAA;AAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region
|
|
1
|
+
//#region \0rolldown/runtime.js
|
|
2
2
|
var __create = Object.create;
|
|
3
3
|
var __defProp = Object.defineProperty;
|
|
4
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -27,7 +27,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
27
27
|
//#endregion
|
|
28
28
|
let defu = require("defu");
|
|
29
29
|
defu = __toESM(defu);
|
|
30
|
-
let
|
|
30
|
+
let _stryke_path_join_paths = require("@stryke/path/join-paths");
|
|
31
31
|
|
|
32
32
|
//#region src/helpers/resolve-options.ts
|
|
33
33
|
/**
|
|
@@ -38,7 +38,7 @@ let __stryke_path_join_paths = require("@stryke/path/join-paths");
|
|
|
38
38
|
*/
|
|
39
39
|
function resolveOptions(context) {
|
|
40
40
|
return (0, defu.default)({ resolve: { alias: context.alias } }, context.config.webpack ? context.config.webpack : {}, {
|
|
41
|
-
output: { path: (0,
|
|
41
|
+
output: { path: (0, _stryke_path_join_paths.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.output.buildPath) },
|
|
42
42
|
name: context.config.name,
|
|
43
43
|
plugins: context.config.webpack?.plugins ?? [],
|
|
44
44
|
node: context.config.platform === "node" ? {
|
|
@@ -49,11 +49,11 @@ function resolveOptions(context) {
|
|
|
49
49
|
mode: context.config.mode === "development" ? "development" : "production",
|
|
50
50
|
cache: {
|
|
51
51
|
type: "filesystem",
|
|
52
|
-
cacheDirectory: (0,
|
|
52
|
+
cacheDirectory: (0, _stryke_path_join_paths.joinPaths)(context.cachePath, "webpack", "cache")
|
|
53
53
|
},
|
|
54
|
-
recordsInputPath: (0,
|
|
55
|
-
recordsOutputPath: (0,
|
|
56
|
-
context: (0,
|
|
54
|
+
recordsInputPath: (0, _stryke_path_join_paths.joinPaths)(context.cachePath, "webpack", ".webpack-records.json"),
|
|
55
|
+
recordsOutputPath: (0, _stryke_path_join_paths.joinPaths)(context.cachePath, "webpack", ".webpack-records.json"),
|
|
56
|
+
context: (0, _stryke_path_join_paths.joinPaths)(context.workspaceConfig.workspaceRoot, context.config.root),
|
|
57
57
|
noExternal: context.builtins,
|
|
58
58
|
devtool: context.config.mode !== "development" ? false : "source-map",
|
|
59
59
|
optimization: { minimize: context.config.mode !== "development" }
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { Configuration } from "webpack";
|
|
2
1
|
import { Context } from "@powerlines/core";
|
|
2
|
+
import { Configuration } from "webpack";
|
|
3
3
|
|
|
4
4
|
//#region src/helpers/resolve-options.d.ts
|
|
5
|
-
|
|
6
5
|
/**
|
|
7
6
|
* Resolves the options for [webpack](https://webpack.js.org/).
|
|
8
7
|
*
|
|
@@ -12,4 +11,4 @@ import { Context } from "@powerlines/core";
|
|
|
12
11
|
declare function resolveOptions(context: Context): Configuration;
|
|
13
12
|
//#endregion
|
|
14
13
|
export { resolveOptions as t };
|
|
15
|
-
//# sourceMappingURL=resolve-options-
|
|
14
|
+
//# sourceMappingURL=resolve-options-UpQ8DhtP.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolve-options-UpQ8DhtP.d.cts","names":[],"sources":["../src/helpers/resolve-options.ts"],"mappings":";;;;;;AA8BA;;;;iBAAgB,cAAA,CAAe,OAAA,EAAS,OAAA,GAAU,aAAA"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { Context } from "@powerlines/core";
|
|
2
1
|
import { Configuration } from "webpack";
|
|
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 [webpack](https://webpack.js.org/).
|
|
8
7
|
*
|
|
@@ -12,4 +11,4 @@ import { Configuration } from "webpack";
|
|
|
12
11
|
declare function resolveOptions(context: Context): Configuration;
|
|
13
12
|
//#endregion
|
|
14
13
|
export { resolveOptions as t };
|
|
15
|
-
//# sourceMappingURL=resolve-options-
|
|
14
|
+
//# sourceMappingURL=resolve-options-yCbwWgKL.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolve-options-yCbwWgKL.d.mts","names":[],"sources":["../src/helpers/resolve-options.ts"],"mappings":";;;;;;AA8BA;;;;iBAAgB,cAAA,CAAe,OAAA,EAAS,OAAA,GAAU,aAAA"}
|
package/dist/types/build.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as __ΩWebpackOptions, t as WebpackOptions } from "../build-
|
|
1
|
+
import { n as __ΩWebpackOptions, t as WebpackOptions } from "../build-DOkvLIlZ.cjs";
|
|
2
2
|
export { WebpackOptions, __ΩWebpackOptions };
|
package/dist/types/build.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as __ΩWebpackOptions, t as WebpackOptions } from "../build-
|
|
1
|
+
import { n as __ΩWebpackOptions, t as WebpackOptions } from "../build-CEzG_xp-.mjs";
|
|
2
2
|
export { WebpackOptions, __ΩWebpackOptions };
|
package/dist/types/index.d.cts
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import { a as __ΩWebpackPluginContext, c as __ΩWebpackPluginUserConfig, i as WebpackPluginUserConfig, n as WebpackPluginOptions, o as __ΩWebpackPluginOptions, r as WebpackPluginResolvedConfig, s as __ΩWebpackPluginResolvedConfig, t as WebpackPluginContext } from "../plugin
|
|
2
|
-
import "../index-B_e8BwCm.cjs";
|
|
1
|
+
import { a as __ΩWebpackPluginContext, c as __ΩWebpackPluginUserConfig, i as WebpackPluginUserConfig, n as WebpackPluginOptions, o as __ΩWebpackPluginOptions, r as WebpackPluginResolvedConfig, s as __ΩWebpackPluginResolvedConfig, t as WebpackPluginContext } from "../plugin--CJErpdu.cjs";
|
|
3
2
|
export { WebpackPluginContext, WebpackPluginOptions, WebpackPluginResolvedConfig, WebpackPluginUserConfig, __ΩWebpackPluginContext, __ΩWebpackPluginOptions, __ΩWebpackPluginResolvedConfig, __ΩWebpackPluginUserConfig };
|
package/dist/types/index.d.mts
CHANGED
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
import "../
|
|
2
|
-
import { a as __ΩWebpackPluginContext, c as __ΩWebpackPluginUserConfig, i as WebpackPluginUserConfig, n as WebpackPluginOptions, o as __ΩWebpackPluginOptions, r as WebpackPluginResolvedConfig, s as __ΩWebpackPluginResolvedConfig, t as WebpackPluginContext } from "../plugin-D-0RbJQ8.mjs";
|
|
3
|
-
import "../index-mH1MEWOz.mjs";
|
|
1
|
+
import { a as __ΩWebpackPluginContext, c as __ΩWebpackPluginUserConfig, i as WebpackPluginUserConfig, n as WebpackPluginOptions, o as __ΩWebpackPluginOptions, r as WebpackPluginResolvedConfig, s as __ΩWebpackPluginResolvedConfig, t as WebpackPluginContext } from "../plugin-CYgzAw-a.mjs";
|
|
4
2
|
export { WebpackPluginContext, WebpackPluginOptions, WebpackPluginResolvedConfig, WebpackPluginUserConfig, __ΩWebpackPluginContext, __ΩWebpackPluginOptions, __ΩWebpackPluginResolvedConfig, __ΩWebpackPluginUserConfig };
|
package/dist/types/plugin.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as __ΩWebpackPluginContext, c as __ΩWebpackPluginUserConfig, i as WebpackPluginUserConfig, n as WebpackPluginOptions, o as __ΩWebpackPluginOptions, r as WebpackPluginResolvedConfig, s as __ΩWebpackPluginResolvedConfig, t as WebpackPluginContext } from "../plugin
|
|
1
|
+
import { a as __ΩWebpackPluginContext, c as __ΩWebpackPluginUserConfig, i as WebpackPluginUserConfig, n as WebpackPluginOptions, o as __ΩWebpackPluginOptions, r as WebpackPluginResolvedConfig, s as __ΩWebpackPluginResolvedConfig, t as WebpackPluginContext } from "../plugin--CJErpdu.cjs";
|
|
2
2
|
export { WebpackPluginContext, WebpackPluginOptions, WebpackPluginResolvedConfig, WebpackPluginUserConfig, __ΩWebpackPluginContext, __ΩWebpackPluginOptions, __ΩWebpackPluginResolvedConfig, __ΩWebpackPluginUserConfig };
|
package/dist/types/plugin.d.mts
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import "../
|
|
2
|
-
import { a as __ΩWebpackPluginContext, c as __ΩWebpackPluginUserConfig, i as WebpackPluginUserConfig, n as WebpackPluginOptions, o as __ΩWebpackPluginOptions, r as WebpackPluginResolvedConfig, s as __ΩWebpackPluginResolvedConfig, t as WebpackPluginContext } from "../plugin-D-0RbJQ8.mjs";
|
|
1
|
+
import { a as __ΩWebpackPluginContext, c as __ΩWebpackPluginUserConfig, i as WebpackPluginUserConfig, n as WebpackPluginOptions, o as __ΩWebpackPluginOptions, r as WebpackPluginResolvedConfig, s as __ΩWebpackPluginResolvedConfig, t as WebpackPluginContext } from "../plugin-CYgzAw-a.mjs";
|
|
3
2
|
export { WebpackPluginContext, WebpackPluginOptions, WebpackPluginResolvedConfig, WebpackPluginUserConfig, __ΩWebpackPluginContext, __ΩWebpackPluginOptions, __ΩWebpackPluginResolvedConfig, __ΩWebpackPluginUserConfig };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { t as WebpackPluginContext } from "./plugin-CYgzAw-a.mjs";
|
|
2
|
+
import * as webpack from "webpack";
|
|
3
|
+
|
|
4
|
+
//#region src/helpers/unplugin.d.ts
|
|
5
|
+
declare function createWebpackPlugin(context: WebpackPluginContext): webpack.WebpackPluginInstance;
|
|
6
|
+
//#endregion
|
|
7
|
+
export { createWebpackPlugin as t };
|
|
8
|
+
//# sourceMappingURL=unplugin-CUN9CPLL.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unplugin-CUN9CPLL.d.mts","names":[],"sources":["../src/helpers/unplugin.ts"],"mappings":";;;;iBAsBgB,mBAAA,CAAoB,OAAA,EAAS,oBAAA,GAAoB,OAAA,CAAA,qBAAA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { t as WebpackPluginContext } from "./plugin--CJErpdu.cjs";
|
|
2
|
+
import * as webpack from "webpack";
|
|
3
|
+
|
|
4
|
+
//#region src/helpers/unplugin.d.ts
|
|
5
|
+
declare function createWebpackPlugin(context: WebpackPluginContext): webpack.WebpackPluginInstance;
|
|
6
|
+
//#endregion
|
|
7
|
+
export { createWebpackPlugin as t };
|
|
8
|
+
//# sourceMappingURL=unplugin-DfOu6nzf.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unplugin-DfOu6nzf.d.cts","names":[],"sources":["../src/helpers/unplugin.ts"],"mappings":";;;;iBAsBgB,mBAAA,CAAoB,OAAA,EAAS,oBAAA,GAAoB,OAAA,CAAA,qBAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerlines/plugin-webpack",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.346",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "A package containing a Powerlines plugin to build projects using Webpack.",
|
|
6
6
|
"keywords": ["webpack", "powerlines", "storm-software", "powerlines-plugin"],
|
|
@@ -40,30 +40,31 @@
|
|
|
40
40
|
],
|
|
41
41
|
"type": "module",
|
|
42
42
|
"exports": {
|
|
43
|
-
".": { "
|
|
43
|
+
".": { "import": "./dist/index.mjs", "require": "./dist/index.cjs" },
|
|
44
44
|
"./helpers": {
|
|
45
|
-
"
|
|
46
|
-
"
|
|
45
|
+
"import": "./dist/helpers/index.mjs",
|
|
46
|
+
"require": "./dist/helpers/index.cjs"
|
|
47
47
|
},
|
|
48
48
|
"./helpers/resolve-options": {
|
|
49
|
-
"
|
|
50
|
-
"
|
|
49
|
+
"import": "./dist/helpers/resolve-options.mjs",
|
|
50
|
+
"require": "./dist/helpers/resolve-options.cjs"
|
|
51
51
|
},
|
|
52
52
|
"./helpers/unplugin": {
|
|
53
|
-
"
|
|
54
|
-
"
|
|
53
|
+
"import": "./dist/helpers/unplugin.mjs",
|
|
54
|
+
"require": "./dist/helpers/unplugin.cjs"
|
|
55
55
|
},
|
|
56
|
+
"./resolve-options-DeOdP6uU": "./dist/resolve-options-DeOdP6uU.cjs",
|
|
56
57
|
"./types": {
|
|
57
|
-
"
|
|
58
|
-
"
|
|
58
|
+
"import": "./dist/types/index.mjs",
|
|
59
|
+
"require": "./dist/types/index.cjs"
|
|
59
60
|
},
|
|
60
61
|
"./types/build": {
|
|
61
|
-
"
|
|
62
|
-
"
|
|
62
|
+
"import": "./dist/types/build.mjs",
|
|
63
|
+
"require": "./dist/types/build.cjs"
|
|
63
64
|
},
|
|
64
65
|
"./types/plugin": {
|
|
65
|
-
"
|
|
66
|
-
"
|
|
66
|
+
"import": "./dist/types/plugin.mjs",
|
|
67
|
+
"require": "./dist/types/plugin.cjs"
|
|
67
68
|
},
|
|
68
69
|
"./*": "./*"
|
|
69
70
|
},
|
|
@@ -73,7 +74,7 @@
|
|
|
73
74
|
"typings": "dist/index.d.mts",
|
|
74
75
|
"files": ["dist/**/*"],
|
|
75
76
|
"dependencies": {
|
|
76
|
-
"@powerlines/core": "^0.
|
|
77
|
+
"@powerlines/core": "^0.3.0",
|
|
77
78
|
"@stryke/path": "^0.26.19",
|
|
78
79
|
"defu": "^6.1.4",
|
|
79
80
|
"unplugin": "^3.0.0"
|
|
@@ -82,5 +83,5 @@
|
|
|
82
83
|
"peerDependencies": { "webpack": ">=5.101.0" },
|
|
83
84
|
"peerDependenciesMeta": { "webpack": { "optional": false } },
|
|
84
85
|
"publishConfig": { "access": "public" },
|
|
85
|
-
"gitHead": "
|
|
86
|
+
"gitHead": "40d1f94407720be23c3801f9145fdad1fe27dfb2"
|
|
86
87
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"build-Be4opB6C.d.cts","names":[],"sources":["../src/types/build.ts"],"sourcesContent":[],"mappings":";;;KAoBY,cAAA,GAAiB,KAC3B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"build-CX5LkFn-.d.mts","names":[],"sources":["../src/types/build.ts"],"sourcesContent":[],"mappings":";;;KAoBY,cAAA,GAAiB,KAC3B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { };
|
|
File without changes
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { };
|
package/dist/plugin-BykaHmY4.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { };
|
package/dist/plugin-Ckx8qAq8.cjs
DELETED
|
File without changes
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-CzRwwkrS.d.cts","names":[],"sources":["../src/types/plugin.ts"],"sourcesContent":[],"mappings":";;;;KAqBY,oBAAA,GAAuB,QAAQ;UAE1B,uBAAA,SAAgC;EAFrC,OAAA,CAAA,EAGA,oBAHoB;AAEhC;AAIiB,UAAA,2BAAA,SAAoC,cAAA,CAAA;EAIzC,OAAA,EAHD,cAGqB;;AAE5B,KAFQ,oBAER,CAAA,wBADsB,2BACtB,GAAA,2BAAA,CAAA,GACA,aADA,CACc,eADd,CAAA;AACc,uCAAA,GAAA,EAAA;AAAd,0CAAA,GAAA,EAAA;AAAa,8CAAA,GAAA,EAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-D-0RbJQ8.d.mts","names":[],"sources":["../src/types/plugin.ts"],"sourcesContent":[],"mappings":";;;;KAqBY,oBAAA,GAAuB,QAAQ;UAE1B,uBAAA,SAAgC;EAFrC,OAAA,CAAA,EAGA,oBAHoB;AAEhC;AAIiB,UAAA,2BAAA,SAAoC,cAAA,CAAA;EAIzC,OAAA,EAHD,cAGqB;;AAE5B,KAFQ,oBAER,CAAA,wBADsB,2BACtB,GAAA,2BAAA,CAAA,GACA,aADA,CACc,eADd,CAAA;AACc,uCAAA,GAAA,EAAA;AAAd,0CAAA,GAAA,EAAA;AAAa,8CAAA,GAAA,EAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"resolve-options-COX0cHB5.d.mts","names":[],"sources":["../src/helpers/resolve-options.ts"],"sourcesContent":[],"mappings":";;;;;;;AA8BA;;;;iBAAgB,cAAA,UAAwB,UAAU"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"resolve-options-DDI_x0af.d.cts","names":[],"sources":["../src/helpers/resolve-options.ts"],"sourcesContent":[],"mappings":";;;;;;;AA8BA;;;;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 [webpack](https://webpack.js.org/).
|
|
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.webpack ? context.config.webpack : {}, {
|
|
13
|
-
output: { path: joinPaths(context.workspaceConfig.workspaceRoot, context.config.output.buildPath) },
|
|
14
|
-
name: context.config.name,
|
|
15
|
-
plugins: context.config.webpack?.plugins ?? [],
|
|
16
|
-
node: context.config.platform === "node" ? {
|
|
17
|
-
__dirname: true,
|
|
18
|
-
__filename: true,
|
|
19
|
-
global: true
|
|
20
|
-
} : false,
|
|
21
|
-
mode: context.config.mode === "development" ? "development" : "production",
|
|
22
|
-
cache: {
|
|
23
|
-
type: "filesystem",
|
|
24
|
-
cacheDirectory: joinPaths(context.cachePath, "webpack", "cache")
|
|
25
|
-
},
|
|
26
|
-
recordsInputPath: joinPaths(context.cachePath, "webpack", ".webpack-records.json"),
|
|
27
|
-
recordsOutputPath: joinPaths(context.cachePath, "webpack", ".webpack-records.json"),
|
|
28
|
-
context: joinPaths(context.workspaceConfig.workspaceRoot, context.config.root),
|
|
29
|
-
noExternal: context.builtins,
|
|
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-u4_-_S6N.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"resolve-options-u4_-_S6N.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 { joinPaths } from \"@stryke/path/join-paths\";\nimport defu from \"defu\";\nimport type { Configuration as ExternalWebpackOptions } from \"webpack\";\nimport { WebpackPluginResolvedConfig } from \"../types\";\n\n/**\n * Resolves the options for [webpack](https://webpack.js.org/).\n *\n * @param context - The build context.\n * @returns The resolved options.\n */\nexport function resolveOptions(context: Context): ExternalWebpackOptions {\n return defu(\n {\n resolve: {\n alias: context.alias\n }\n },\n (context.config as WebpackPluginResolvedConfig).webpack\n ? (context.config as WebpackPluginResolvedConfig).webpack\n : {},\n {\n output: {\n path: joinPaths(\n context.workspaceConfig.workspaceRoot,\n context.config.output.buildPath\n )\n },\n name: context.config.name,\n plugins:\n (context.config as WebpackPluginResolvedConfig).webpack?.plugins ?? [],\n node:\n context.config.platform === \"node\"\n ? ({\n __dirname: true,\n __filename: true,\n global: true\n } as ExternalWebpackOptions[\"node\"])\n : false,\n mode:\n context.config.mode === \"development\"\n ? (\"development\" as const)\n : (\"production\" as const),\n cache: {\n type: \"filesystem\" as const,\n cacheDirectory: joinPaths(context.cachePath, \"webpack\", \"cache\")\n },\n recordsInputPath: joinPaths(\n context.cachePath,\n \"webpack\",\n \".webpack-records.json\"\n ),\n recordsOutputPath: joinPaths(\n context.cachePath,\n \"webpack\",\n \".webpack-records.json\"\n ),\n context: joinPaths(\n context.workspaceConfig.workspaceRoot,\n context.config.root\n ),\n noExternal: context.builtins,\n devtool: (context.config.mode !== \"development\"\n ? false\n : \"source-map\") as string | false,\n optimization: {\n minimize: context.config.mode !== \"development\"\n }\n }\n );\n}\n"],"mappings":";;;;;;;;;;AA8BA,SAAgB,eAAe,SAA0C;AACvE,QAAO,KACL,EACE,SAAS,EACP,OAAO,QAAQ,OAChB,EACF,EACA,QAAQ,OAAuC,UAC3C,QAAQ,OAAuC,UAChD,EAAE,EACN;EACE,QAAQ,EACN,MAAM,UACJ,QAAQ,gBAAgB,eACxB,QAAQ,OAAO,OAAO,UACvB,EACF;EACD,MAAM,QAAQ,OAAO;EACrB,SACG,QAAQ,OAAuC,SAAS,WAAW,EAAE;EACxE,MACE,QAAQ,OAAO,aAAa,SACvB;GACC,WAAW;GACX,YAAY;GACZ,QAAQ;GACT,GACD;EACN,MACE,QAAQ,OAAO,SAAS,gBACnB,gBACA;EACP,OAAO;GACL,MAAM;GACN,gBAAgB,UAAU,QAAQ,WAAW,WAAW,QAAQ;GACjE;EACD,kBAAkB,UAChB,QAAQ,WACR,WACA,wBACD;EACD,mBAAmB,UACjB,QAAQ,WACR,WACA,wBACD;EACD,SAAS,UACP,QAAQ,gBAAgB,eACxB,QAAQ,OAAO,KAChB;EACD,YAAY,QAAQ;EACpB,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-CzhvxyM8.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 createWebpackPlugin(context) {
|
|
7
|
-
return (0, unplugin.createWebpackPlugin)((0, __powerlines_core_lib_unplugin.createUnplugin)(context))({});
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
//#endregion
|
|
11
|
-
Object.defineProperty(exports, 'createWebpackPlugin', {
|
|
12
|
-
enumerable: true,
|
|
13
|
-
get: function () {
|
|
14
|
-
return createWebpackPlugin;
|
|
15
|
-
}
|
|
16
|
-
});
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { createUnplugin } from "@powerlines/core/lib/unplugin";
|
|
2
|
-
import { createWebpackPlugin } from "unplugin";
|
|
3
|
-
|
|
4
|
-
//#region src/helpers/unplugin.ts
|
|
5
|
-
function createWebpackPlugin$1(context) {
|
|
6
|
-
return createWebpackPlugin(createUnplugin(context))({});
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
//#endregion
|
|
10
|
-
export { createWebpackPlugin$1 as t };
|
|
11
|
-
//# sourceMappingURL=unplugin-BpdMF4ey.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"unplugin-BpdMF4ey.mjs","names":["createWebpackPlugin","createWebpackUnplugin"],"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 { createWebpackPlugin as createWebpackUnplugin } from \"unplugin\";\nimport { WebpackPluginContext } from \"../types/plugin\";\n\nexport function createWebpackPlugin(context: WebpackPluginContext) {\n return createWebpackUnplugin(createUnplugin(context))({});\n}\n"],"mappings":";;;;AAsBA,SAAgBA,sBAAoB,SAA+B;AACjE,QAAOC,oBAAsB,eAAe,QAAQ,CAAC,CAAC,EAAE,CAAC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { t as WebpackPluginContext } from "./plugin-D-0RbJQ8.mjs";
|
|
2
|
-
import * as webpack0 from "webpack";
|
|
3
|
-
|
|
4
|
-
//#region src/helpers/unplugin.d.ts
|
|
5
|
-
declare function createWebpackPlugin(context: WebpackPluginContext): webpack0.WebpackPluginInstance;
|
|
6
|
-
//#endregion
|
|
7
|
-
export { createWebpackPlugin as t };
|
|
8
|
-
//# sourceMappingURL=unplugin-BubjFjr2.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"unplugin-BubjFjr2.d.mts","names":[],"sources":["../src/helpers/unplugin.ts"],"sourcesContent":[],"mappings":";;;;iBAsBgB,mBAAA,UAA6B,uBAAoB,QAAA,CAAA"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { t as WebpackPluginContext } from "./plugin-CzRwwkrS.cjs";
|
|
2
|
-
import * as webpack0 from "webpack";
|
|
3
|
-
|
|
4
|
-
//#region src/helpers/unplugin.d.ts
|
|
5
|
-
declare function createWebpackPlugin(context: WebpackPluginContext): webpack0.WebpackPluginInstance;
|
|
6
|
-
//#endregion
|
|
7
|
-
export { createWebpackPlugin as t };
|
|
8
|
-
//# sourceMappingURL=unplugin-D-6t9TmW.d.cts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"unplugin-D-6t9TmW.d.cts","names":[],"sources":["../src/helpers/unplugin.ts"],"sourcesContent":[],"mappings":";;;;iBAsBgB,mBAAA,UAA6B,uBAAoB,QAAA,CAAA"}
|