piral-cli-webpack5 0.14.3-beta.3295 → 0.14.3-beta.3303

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.
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/enhancers/piral-instance-webpack-config-enhancer/index.ts"],"names":[],"mappings":";;;AAAA,qCAAsD;AACtD,uCAA6E;AAStE,MAAM,kCAAkC,GAAG,CAAC,OAA0C,EAAE,EAAE,CAAC,CAChG,eAA8B,EAC9B,EAAE;IACF,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,GAAG,OAAO,CAAC;IAC7C,MAAM,WAAW,GAAG,OAAO,CAAC,GAAG,CAAC,QAAQ,IAAI,aAAa,CAAC;IAC1D,MAAM,SAAS,mCACV,IAAA,sBAAY,EAAC,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,WAAW,CAAC,GACnD,OAAO,CAAC,SAAS,CACrB,CAAC;IAEF,MAAM,OAAO,GAAG,CAAC,IAAI,sBAAY,CAAC,IAAA,4BAAkB,EAAC,SAAS,CAAC,CAAC,CAAC,CAAC;IAElE,IAAA,wBAAc,EAAC,SAAS,CAAC,CAAC;IAE1B,eAAe,CAAC,OAAO,GAAG,CAAC,GAAG,CAAC,eAAe,CAAC,OAAO,IAAI,EAAE,CAAC,EAAE,GAAG,OAAO,CAAC,CAAC;IAE3E,OAAO,eAAe,CAAC;AACzB,CAAC,CAAC;AAjBW,QAAA,kCAAkC,sCAiB7C"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/enhancers/piral-instance-webpack-config-enhancer/index.ts"],"names":[],"mappings":";;;AAAA,qCAAsD;AACtD,uCAA6E;AAStE,MAAM,kCAAkC,GAC7C,CAAC,OAA0C,EAAE,EAAE,CAAC,CAAC,eAA8B,EAAE,EAAE;IACjF,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,GAAG,OAAO,CAAC;IAC7C,MAAM,WAAW,GAAG,OAAO,CAAC,GAAG,CAAC,QAAQ,IAAI,aAAa,CAAC;IAC1D,MAAM,SAAS,mCACV,IAAA,sBAAY,EAAC,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,WAAW,CAAC,GACnD,OAAO,CAAC,SAAS,CACrB,CAAC;IAEF,MAAM,OAAO,GAAG,CAAC,IAAI,sBAAY,CAAC,IAAA,4BAAkB,EAAC,SAAS,CAAC,CAAC,CAAC,CAAC;IAElE,IAAA,wBAAc,EAAC,SAAS,CAAC,CAAC;IAE1B,eAAe,CAAC,OAAO,GAAG,CAAC,GAAG,CAAC,eAAe,CAAC,OAAO,IAAI,EAAE,CAAC,EAAE,GAAG,OAAO,CAAC,CAAC;IAE3E,OAAO,eAAe,CAAC;AACzB,CAAC,CAAC;AAhBS,QAAA,kCAAkC,sCAgB3C"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "piral-cli-webpack5",
3
- "version": "0.14.3-beta.3295",
3
+ "version": "0.14.3-beta.3303",
4
4
  "description": "Provides debug and build capabilities for pilets and Piral instances using Webpack v5.",
5
5
  "keywords": [
6
6
  "piral-cli",
@@ -48,7 +48,7 @@
48
48
  "@types/node": "^13.9.0",
49
49
  "@types/terser-webpack-plugin": "^5.0.0",
50
50
  "@types/yargs": "^15.0.4",
51
- "piral-cli": "0.14.3-beta.3295",
51
+ "piral-cli": "0.14.3-beta.3303",
52
52
  "strip-ansi": "^3.0.0",
53
53
  "typescript": "^4.0.2"
54
54
  },
@@ -78,5 +78,5 @@
78
78
  "webpack": "^5.1.3",
79
79
  "webpack-inject-plugin": "^1.5.5"
80
80
  },
81
- "gitHead": "699a617d9f89c76c277feba775da285b99cf370c"
81
+ "gitHead": "da89ec453fdcf613a0c68ff75d53d47a052ce356"
82
82
  }
@@ -8,21 +8,20 @@ export interface PiralInstanceWebpackPluginOptions {
8
8
  variables?: Record<string, boolean | string>;
9
9
  }
10
10
 
11
- export const piralInstanceWebpackConfigEnhancer = (options: PiralInstanceWebpackPluginOptions) => (
12
- compilerOptions: Configuration,
13
- ) => {
14
- const { name, version, externals } = options;
15
- const environment = process.env.NODE_ENV || 'development';
16
- const variables = {
17
- ...getVariables(name, version, externals, environment),
18
- ...options.variables,
19
- };
11
+ export const piralInstanceWebpackConfigEnhancer =
12
+ (options: PiralInstanceWebpackPluginOptions) => (compilerOptions: Configuration) => {
13
+ const { name, version, externals } = options;
14
+ const environment = process.env.NODE_ENV || 'development';
15
+ const variables = {
16
+ ...getVariables(name, version, externals, environment),
17
+ ...options.variables,
18
+ };
20
19
 
21
- const plugins = [new DefinePlugin(getDefineVariables(variables))];
20
+ const plugins = [new DefinePlugin(getDefineVariables(variables))];
22
21
 
23
- setEnvironment(variables);
22
+ setEnvironment(variables);
24
23
 
25
- compilerOptions.plugins = [...(compilerOptions.plugins || []), ...plugins];
24
+ compilerOptions.plugins = [...(compilerOptions.plugins || []), ...plugins];
26
25
 
27
- return compilerOptions;
28
- };
26
+ return compilerOptions;
27
+ };