@powerlines/plugin-webpack 0.5.56 → 0.5.57
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/helpers/index.cjs +1 -1
- package/dist/helpers/index.d.cts +4 -24
- package/dist/helpers/index.d.mts +4 -0
- package/dist/helpers/index.mjs +1 -0
- package/dist/helpers/unplugin.cjs +1 -7
- package/dist/helpers/unplugin.d.cts +3 -27
- package/dist/helpers/unplugin.d.mts +3 -0
- package/dist/helpers/unplugin.mjs +1 -0
- package/dist/helpers-CRPRhztf.mjs +1 -0
- package/dist/index-9iG2qHLe.d.mts +1 -0
- package/dist/index-D4ELpJXS.d.cts +1 -0
- package/dist/index-D6CnpA_r.d.cts +1 -0
- package/dist/index-DL0uimUT.d.mts +1 -0
- package/dist/index.cjs +1 -7
- package/dist/index.d.cts +9 -27
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.mts +14 -0
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +2 -0
- package/dist/index.mjs.map +1 -0
- package/dist/plugin-BjiGfRHE.mjs +1 -0
- package/dist/plugin-CSFGUBL0.d.cts +1653 -0
- package/dist/plugin-CSFGUBL0.d.cts.map +1 -0
- package/dist/plugin-DLvJDpI5.d.mts +1654 -0
- package/dist/plugin-DLvJDpI5.d.mts.map +1 -0
- package/dist/plugin-DsBmD-9a.d.mts +1655 -0
- package/dist/plugin-DsBmD-9a.d.mts.map +1 -0
- package/dist/plugin-pBKbb5K9.cjs +0 -0
- package/dist/types/index.cjs +1 -1
- package/dist/types/index.d.cts +3 -23
- package/dist/types/index.d.mts +3 -0
- package/dist/types/index.mjs +1 -0
- package/dist/types/plugin.cjs +1 -1
- package/dist/types/plugin.d.cts +2 -23
- package/dist/types/plugin.d.mts +2 -0
- package/dist/types/plugin.mjs +1 -0
- package/dist/types-n6NgD0QK.mjs +1 -0
- package/dist/types-o3zWarRp.cjs +0 -0
- package/dist/unplugin-BNhFMCge.d.mts +8 -0
- package/dist/unplugin-BNhFMCge.d.mts.map +1 -0
- package/dist/unplugin-CCaRukvF.d.cts +8 -0
- package/dist/unplugin-CCaRukvF.d.cts.map +1 -0
- package/dist/unplugin-CGa2oP9g.d.mts +8 -0
- package/dist/unplugin-CGa2oP9g.d.mts.map +1 -0
- package/dist/unplugin-DtvG3aeH.cjs +44 -0
- package/dist/unplugin-Dx7gIi1g.mjs +7 -0
- package/dist/unplugin-Dx7gIi1g.mjs.map +1 -0
- package/package.json +51 -33
- package/dist/chunk-FBBMZ4NC.cjs +0 -7
- package/dist/chunk-UCUR73HG.js +0 -7
- package/dist/helpers/index.d.ts +0 -24
- package/dist/helpers/index.js +0 -1
- package/dist/helpers/unplugin.d.ts +0 -27
- package/dist/helpers/unplugin.js +0 -7
- package/dist/index-BmoI4-Bn.d.cts +0 -1564
- package/dist/index-BmoI4-Bn.d.ts +0 -1564
- package/dist/index.d.ts +0 -32
- package/dist/index.js +0 -7
- package/dist/types/index.d.ts +0 -23
- package/dist/types/index.js +0 -1
- package/dist/types/plugin.d.ts +0 -23
- /package/dist/{types/plugin.js → helpers-LF26RHol.cjs} +0 -0
package/dist/helpers/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const e=require(`../unplugin-DtvG3aeH.cjs`);require(`../helpers-LF26RHol.cjs`),exports.createWebpackPlugin=e.t;
|
package/dist/helpers/index.d.cts
CHANGED
|
@@ -1,24 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
import '@stryke/http/fetch';
|
|
6
|
-
import '@stryke/types/base';
|
|
7
|
-
import '@stryke/types/package-json';
|
|
8
|
-
import 'jiti';
|
|
9
|
-
import 'magic-string';
|
|
10
|
-
import 'oxc-parser';
|
|
11
|
-
import 'semver';
|
|
12
|
-
import 'ts-morph';
|
|
13
|
-
import 'undici';
|
|
14
|
-
import 'unplugin';
|
|
15
|
-
import '@storm-software/build-tools/types';
|
|
16
|
-
import '@storm-software/config-tools/types';
|
|
17
|
-
import '@storm-software/config/types';
|
|
18
|
-
import '@stryke/types/configuration';
|
|
19
|
-
import '@stryke/types/file';
|
|
20
|
-
import 'vite';
|
|
21
|
-
import '@stryke/fs/resolve';
|
|
22
|
-
import '@stryke/types/array';
|
|
23
|
-
import '@stryke/types/tsconfig';
|
|
24
|
-
import 'typescript';
|
|
1
|
+
import "../plugin-CSFGUBL0.cjs";
|
|
2
|
+
import { t as createWebpackPlugin } from "../unplugin-CCaRukvF.cjs";
|
|
3
|
+
import "../index-D6CnpA_r.cjs";
|
|
4
|
+
export { createWebpackPlugin };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"../unplugin-Dx7gIi1g.mjs";import"../helpers-CRPRhztf.mjs";export{e as createWebpackPlugin};
|
|
@@ -1,7 +1 @@
|
|
|
1
|
-
|
|
2
|
-
*
|
|
3
|
-
* ⚡ Built by Storm Software
|
|
4
|
-
*
|
|
5
|
-
*****************************************/
|
|
6
|
-
|
|
7
|
-
function u(t){return unplugin.createWebpackPlugin(unplugin$1.createUnplugin(t))({})}chunkFBBMZ4NC_cjs.a(u,"createWebpackPlugin");exports.createWebpackPlugin=u;
|
|
1
|
+
const e=require(`../unplugin-DtvG3aeH.cjs`);exports.createWebpackPlugin=e.t;
|
|
@@ -1,27 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
import '@stryke/http/fetch';
|
|
5
|
-
import '@stryke/types/base';
|
|
6
|
-
import '@stryke/types/package-json';
|
|
7
|
-
import 'jiti';
|
|
8
|
-
import 'magic-string';
|
|
9
|
-
import 'oxc-parser';
|
|
10
|
-
import 'semver';
|
|
11
|
-
import 'ts-morph';
|
|
12
|
-
import 'undici';
|
|
13
|
-
import 'unplugin';
|
|
14
|
-
import '@storm-software/build-tools/types';
|
|
15
|
-
import '@storm-software/config-tools/types';
|
|
16
|
-
import '@storm-software/config/types';
|
|
17
|
-
import '@stryke/types/configuration';
|
|
18
|
-
import '@stryke/types/file';
|
|
19
|
-
import 'vite';
|
|
20
|
-
import '@stryke/fs/resolve';
|
|
21
|
-
import '@stryke/types/array';
|
|
22
|
-
import '@stryke/types/tsconfig';
|
|
23
|
-
import 'typescript';
|
|
24
|
-
|
|
25
|
-
declare function createWebpackPlugin(context: WebpackPluginContext): webpack.WebpackPluginInstance;
|
|
26
|
-
|
|
27
|
-
export { createWebpackPlugin };
|
|
1
|
+
import "../plugin-CSFGUBL0.cjs";
|
|
2
|
+
import { t as createWebpackPlugin } from "../unplugin-CCaRukvF.cjs";
|
|
3
|
+
export { createWebpackPlugin };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"../unplugin-Dx7gIi1g.mjs";export{e as createWebpackPlugin};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{};
|
|
@@ -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,7 +1 @@
|
|
|
1
|
-
|
|
2
|
-
*
|
|
3
|
-
* ⚡ Built by Storm Software
|
|
4
|
-
*
|
|
5
|
-
*****************************************/
|
|
6
|
-
|
|
7
|
-
const l=chunkFBBMZ4NC_cjs.a((o={})=>({name:"webpack",config(){return this.log(types$1.LogLevelLabel.TRACE,"Providing default configuration for the Powerlines `webpack` build plugin."),{build:{...o,variant:"webpack"}}},async build(){a__default.default(n__default.default({entry:this.entry.reduce((i,e)=>(i[e.output||e.name||e.file]=e.file,i),{})},webpack.extractWebpackConfig(this),{plugins:[unplugin.createWebpackPlugin(this)]}));}}),"plugin");var w=l;exports.default=w;exports.plugin=l;Object.keys(helpers).forEach(function(k){if(k!=='default'&&!Object.prototype.hasOwnProperty.call(exports,k))Object.defineProperty(exports,k,{enumerable:true,get:function(){return helpers[k]}})});Object.keys(types).forEach(function(k){if(k!=='default'&&!Object.prototype.hasOwnProperty.call(exports,k))Object.defineProperty(exports,k,{enumerable:true,get:function(){return types[k]}})});
|
|
1
|
+
Object.defineProperty(exports,`__esModule`,{value:!0});const e=require(`./unplugin-DtvG3aeH.cjs`);require(`./helpers-LF26RHol.cjs`),require(`./plugin-pBKbb5K9.cjs`),require(`./types-o3zWarRp.cjs`);let t=require(`@storm-software/config-tools/types`),n=require(`defu`);n=e.n(n);let r=require(`@stryke/helpers/omit`),i=require(`@stryke/path/join-paths`),a=require(`webpack`);a=e.n(a);function o(e){return(0,n.default)({resolve:{alias:e.builtins.reduce((t,n)=>{if(!t[n]){let r=e.fs.ids[n];r&&(t[n]=r)}return t},e.config.build.alias?Array.isArray(e.config.build.alias)?e.config.build.alias.reduce((e,t)=>(e[t.find.toString()]||(e[t.find.toString()]=t.replacement),e),{}):e.config.build.alias:{})}},e.config.build.variant===`webpack`?e.config.build.override:{},e.config.build.variant===`webpack`?(0,r.omit)(e.config.build,[`override`,`variant`]):{},{output:{path:(0,i.joinPaths)(e.workspaceConfig.workspaceRoot,e.config.output.buildPath)},name:e.config.name,node:e.config.build.platform===`node`?{__dirname:!0,__filename:!0,global:!0}:!1,mode:e.config.mode===`development`?`development`:`production`,cache:{type:`filesystem`,cacheDirectory:(0,i.joinPaths)(e.cachePath,`webpack`,`cache`)},recordsInputPath:(0,i.joinPaths)(e.cachePath,`webpack`,`.webpack-records.json`),recordsOutputPath:(0,i.joinPaths)(e.cachePath,`webpack`,`.webpack-records.json`),context:(0,i.joinPaths)(e.workspaceConfig.workspaceRoot,e.config.projectRoot),noExternal:e.builtins,devtool:e.config.mode===`development`?`source-map`:!1,optimization:{minimize:e.config.mode!==`development`}})}const s=(r={})=>({name:`webpack`,config(){return this.log(t.LogLevelLabel.TRACE,"Providing default configuration for the Powerlines `webpack` build plugin."),{build:{...r,variant:`webpack`}}},async build(){(0,a.default)((0,n.default)({entry:this.entry.reduce((e,t)=>(e[t.output||t.name||t.file]=t.file,e),{})},o(this),{plugins:[e.t(this)]}))}});var c=s;exports.createWebpackPlugin=e.t,exports.default=c,exports.plugin=s;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,32 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
import '@stryke/types/base';
|
|
8
|
-
import '@stryke/types/package-json';
|
|
9
|
-
import 'jiti';
|
|
10
|
-
import 'magic-string';
|
|
11
|
-
import 'oxc-parser';
|
|
12
|
-
import 'semver';
|
|
13
|
-
import 'ts-morph';
|
|
14
|
-
import 'undici';
|
|
15
|
-
import 'unplugin';
|
|
16
|
-
import '@storm-software/build-tools/types';
|
|
17
|
-
import '@storm-software/config-tools/types';
|
|
18
|
-
import '@storm-software/config/types';
|
|
19
|
-
import '@stryke/types/configuration';
|
|
20
|
-
import '@stryke/types/file';
|
|
21
|
-
import 'vite';
|
|
22
|
-
import '@stryke/fs/resolve';
|
|
23
|
-
import '@stryke/types/array';
|
|
24
|
-
import '@stryke/types/tsconfig';
|
|
25
|
-
import 'typescript';
|
|
1
|
+
import { a as __ΩWebpackPluginOptions, i as __ΩWebpackPluginContext, n as WebpackPluginOptions, o as __ΩWebpackPluginResolvedConfig, r as WebpackPluginResolvedConfig, s as Plugin, t as WebpackPluginContext } from "./plugin-CSFGUBL0.cjs";
|
|
2
|
+
import { t as createWebpackPlugin } from "./unplugin-CCaRukvF.cjs";
|
|
3
|
+
import "./index-D6CnpA_r.cjs";
|
|
4
|
+
import "./index-D4ELpJXS.cjs";
|
|
5
|
+
|
|
6
|
+
//#region src/index.d.ts
|
|
26
7
|
|
|
27
8
|
/**
|
|
28
9
|
* A Powerlines plugin to assist in developing other Powerlines plugins.
|
|
29
10
|
*/
|
|
30
11
|
declare const plugin: <TContext extends WebpackPluginContext = WebpackPluginContext>(options?: WebpackPluginOptions) => Plugin<TContext>;
|
|
31
|
-
|
|
32
|
-
export { WebpackPluginContext, WebpackPluginOptions, plugin as default, plugin };
|
|
12
|
+
//#endregion
|
|
13
|
+
export { WebpackPluginContext, WebpackPluginOptions, WebpackPluginResolvedConfig, __ΩWebpackPluginContext, __ΩWebpackPluginOptions, __ΩWebpackPluginResolvedConfig, createWebpackPlugin, plugin as default, plugin };
|
|
14
|
+
//# sourceMappingURL=index.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.ts"],"sourcesContent":[],"mappings":";;;;;;;;;AAiCA;AACmB,cADN,MACM,EAAA,CAAA,iBAAA,oBAAA,GAAuB,oBAAvB,CAAA,CAAA,OAAA,CAAA,EAER,oBAFQ,EAAA,GAGhB,MAHgB,CAGT,QAHS,CAAA"}
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { a as __ΩWebpackPluginOptions, i as __ΩWebpackPluginContext, n as WebpackPluginOptions, o as __ΩWebpackPluginResolvedConfig, r as WebpackPluginResolvedConfig, s as Plugin, t as WebpackPluginContext } from "./plugin-DsBmD-9a.mjs";
|
|
2
|
+
import { t as createWebpackPlugin } from "./unplugin-CGa2oP9g.mjs";
|
|
3
|
+
import "./index-DL0uimUT.mjs";
|
|
4
|
+
import "./index-9iG2qHLe.mjs";
|
|
5
|
+
|
|
6
|
+
//#region src/index.d.ts
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* A Powerlines plugin to assist in developing other Powerlines plugins.
|
|
10
|
+
*/
|
|
11
|
+
declare const plugin: <TContext extends WebpackPluginContext = WebpackPluginContext>(options?: WebpackPluginOptions) => Plugin<TContext>;
|
|
12
|
+
//#endregion
|
|
13
|
+
export { WebpackPluginContext, WebpackPluginOptions, WebpackPluginResolvedConfig, __ΩWebpackPluginContext, __ΩWebpackPluginOptions, __ΩWebpackPluginResolvedConfig, createWebpackPlugin, plugin as default, plugin };
|
|
14
|
+
//# sourceMappingURL=index.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"sourcesContent":[],"mappings":";;;;;;;;;AAiCA;AACmB,cADN,MACM,EAAA,CAAA,iBAAA,oBAAA,GAAuB,oBAAvB,CAAA,CAAA,OAAA,CAAA,EAER,oBAFQ,EAAA,GAGhB,MAHgB,CAGT,QAHS,CAAA"}
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{t as e}from"./unplugin-Dx7gIi1g.mjs";import"./helpers-CRPRhztf.mjs";import"./plugin-BjiGfRHE.mjs";import"./types-n6NgD0QK.mjs";import{LogLevelLabel as t}from"@storm-software/config-tools/types";import n from"defu";import{omit as r}from"@stryke/helpers/omit";import{joinPaths as i}from"@stryke/path/join-paths";import a from"webpack";function o(e){return n({resolve:{alias:e.builtins.reduce((t,n)=>{if(!t[n]){let r=e.fs.ids[n];r&&(t[n]=r)}return t},e.config.build.alias?Array.isArray(e.config.build.alias)?e.config.build.alias.reduce((e,t)=>(e[t.find.toString()]||(e[t.find.toString()]=t.replacement),e),{}):e.config.build.alias:{})}},e.config.build.variant===`webpack`?e.config.build.override:{},e.config.build.variant===`webpack`?r(e.config.build,[`override`,`variant`]):{},{output:{path:i(e.workspaceConfig.workspaceRoot,e.config.output.buildPath)},name:e.config.name,node:e.config.build.platform===`node`?{__dirname:!0,__filename:!0,global:!0}:!1,mode:e.config.mode===`development`?`development`:`production`,cache:{type:`filesystem`,cacheDirectory:i(e.cachePath,`webpack`,`cache`)},recordsInputPath:i(e.cachePath,`webpack`,`.webpack-records.json`),recordsOutputPath:i(e.cachePath,`webpack`,`.webpack-records.json`),context:i(e.workspaceConfig.workspaceRoot,e.config.projectRoot),noExternal:e.builtins,devtool:e.config.mode===`development`?`source-map`:!1,optimization:{minimize:e.config.mode!==`development`}})}const s=(r={})=>({name:`webpack`,config(){return this.log(t.TRACE,"Providing default configuration for the Powerlines `webpack` build plugin."),{build:{...r,variant:`webpack`}}},async build(){a(n({entry:this.entry.reduce((e,t)=>(e[t.output||t.name||t.file]=t.file,e),{})},o(this),{plugins:[e(this)]}))}});var c=s;export{e as createWebpackPlugin,c as default,s as plugin};
|
|
2
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","names":["defu","defu"],"sources":["../../powerlines/src/lib/build/webpack.ts","../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 { omit } from \"@stryke/helpers/omit\";\nimport { joinPaths } from \"@stryke/path/join-paths\";\nimport defu from \"defu\";\nimport type { Configuration as ExternalWebpackOptions } from \"webpack\";\nimport { Context } from \"../../types/context\";\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 extractWebpackConfig(context: Context): ExternalWebpackOptions {\n return defu(\n {\n resolve: {\n alias: context.builtins.reduce(\n (ret, id) => {\n if (!ret[id]) {\n const path = context.fs.ids[id];\n if (path) {\n ret[id] = path;\n }\n }\n\n return ret;\n },\n context.config.build.alias\n ? Array.isArray(context.config.build.alias)\n ? context.config.build.alias.reduce(\n (ret, alias) => {\n if (!ret[alias.find.toString()]) {\n ret[alias.find.toString()] = alias.replacement;\n }\n\n return ret;\n },\n {} as Record<string, string>\n )\n : context.config.build.alias\n : {}\n )\n }\n },\n context.config.build.variant === \"webpack\"\n ? context.config.build.override\n : {},\n context.config.build.variant === \"webpack\"\n ? omit(context.config.build, [\"override\", \"variant\"])\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.build.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.projectRoot\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","/* -------------------------------------------------------------------\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 { LogLevelLabel } from \"@storm-software/config-tools/types\";\nimport defu from \"defu\";\nimport { extractWebpackConfig } from \"powerlines/lib/build/webpack\";\nimport { WebpackUserConfig } from \"powerlines/types/config\";\nimport { Plugin } from \"powerlines/types/plugin\";\nimport build from \"webpack\";\nimport { createWebpackPlugin } from \"./helpers/unplugin\";\nimport { WebpackPluginContext, WebpackPluginOptions } 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 WebpackPluginContext = WebpackPluginContext\n>(\n options: WebpackPluginOptions = {}\n): Plugin<TContext> => {\n return {\n name: \"webpack\",\n config() {\n this.log(\n LogLevelLabel.TRACE,\n \"Providing default configuration for the Powerlines `webpack` build plugin.\"\n );\n\n return {\n build: {\n ...options,\n variant: \"webpack\"\n }\n } as Partial<WebpackUserConfig>;\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 extractWebpackConfig(this),\n {\n plugins: [createWebpackPlugin(this)]\n }\n )\n );\n }\n };\n};\n\nexport default plugin;\n"],"mappings":"oVA8BA,SAAgB,EAAqB,EAA0C,CAC7E,OAAOA,EACL,CACE,QAAS,CACP,MAAO,EAAQ,SAAS,QACrB,EAAK,IAAO,CACX,GAAI,CAAC,EAAI,GAAK,CACZ,IAAM,EAAO,EAAQ,GAAG,IAAI,GACxB,IACF,EAAI,GAAM,GAId,OAAO,GAET,EAAQ,OAAO,MAAM,MACjB,MAAM,QAAQ,EAAQ,OAAO,MAAM,MAAM,CACvC,EAAQ,OAAO,MAAM,MAAM,QACxB,EAAK,KACC,EAAI,EAAM,KAAK,UAAU,IAC5B,EAAI,EAAM,KAAK,UAAU,EAAI,EAAM,aAG9B,GAET,EAAE,CACH,CACD,EAAQ,OAAO,MAAM,MACvB,EAAE,CACP,CACF,CACF,CACD,EAAQ,OAAO,MAAM,UAAY,UAC7B,EAAQ,OAAO,MAAM,SACrB,EAAE,CACN,EAAQ,OAAO,MAAM,UAAY,UAC7B,EAAK,EAAQ,OAAO,MAAO,CAAC,WAAY,UAAU,CAAC,CACnD,EAAE,CACN,CACE,OAAQ,CACN,KAAM,EACJ,EAAQ,gBAAgB,cACxB,EAAQ,OAAO,OAAO,UACvB,CACF,CACD,KAAM,EAAQ,OAAO,KACrB,KACE,EAAQ,OAAO,MAAM,WAAa,OAC7B,CACC,UAAW,GACX,WAAY,GACZ,OAAQ,GACT,CACD,GACN,KACE,EAAQ,OAAO,OAAS,cACnB,cACA,aACP,MAAO,CACL,KAAM,aACN,eAAgB,EAAU,EAAQ,UAAW,UAAW,QAAQ,CACjE,CACD,iBAAkB,EAChB,EAAQ,UACR,UACA,wBACD,CACD,kBAAmB,EACjB,EAAQ,UACR,UACA,wBACD,CACD,QAAS,EACP,EAAQ,gBAAgB,cACxB,EAAQ,OAAO,YAChB,CACD,WAAY,EAAQ,SACpB,QAAU,EAAQ,OAAO,OAAS,cAE9B,aADA,GAEJ,aAAc,CACZ,SAAU,EAAQ,OAAO,OAAS,cACnC,CACF,CACF,CCjFH,MAAa,GAGX,EAAgC,EAAE,IAE3B,CACL,KAAM,UACN,QAAS,CAMP,OALA,KAAK,IACH,EAAc,MACd,6EACD,CAEM,CACL,MAAO,CACL,GAAG,EACH,QAAS,UACV,CACF,EAEH,MAAM,OAAQ,CACZ,EACEC,EACE,CACE,MAAO,KAAK,MAAM,QACf,EAAK,KACJ,EAAI,EAAM,QAAU,EAAM,MAAQ,EAAM,MAAQ,EAAM,KAE/C,GAET,EAAE,CACH,CACF,CACD,EAAqB,KAAK,CAC1B,CACE,QAAS,CAAC,EAAoB,KAAK,CAAC,CACrC,CACF,CACF,EAEJ,EAGH,IAAA,EAAe"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{};
|