weboptimizer 2.0.1101 → 2.0.1110

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "weboptimizer",
3
- "version": "2.0.1101",
3
+ "version": "2.0.1110",
4
4
  "description": "A generic web optimizer, (module) bundler and development environment.",
5
5
  "keywords": [
6
6
  "webpack",
@@ -136,7 +136,6 @@
136
136
  "favicons": "*",
137
137
  "favicons-webpack-plugin": "*",
138
138
  "image-minimizer-webpack-plugin": "*",
139
- "imagemin": "*",
140
139
  "jest": "*",
141
140
  "jsdoc": "*",
142
141
  "mini-css-extract-plugin": "*",
@@ -490,6 +489,8 @@
490
489
  "'**/plugins/*'",
491
490
  "--ignore-pattern",
492
491
  "'*.d.ts'",
492
+ "--resolve-plugins-relative-to",
493
+ ".",
493
494
  "'**/*.{jsx,ts,tsx}'"
494
495
  ],
495
496
  "command": "eslint",
@@ -1002,35 +1003,37 @@
1002
1003
  "image": {
1003
1004
  "content": {
1004
1005
  "minimizer": {
1005
- "plugins": [
1006
- [
1007
- "gifsicle",
1008
- {
1009
- "colors": 256,
1010
- "interlanced": false,
1011
- "optimizationLevel": 3
1012
- }
1013
- ],
1014
- [
1015
- "jpegtran",
1016
- {
1017
- "arithmetic": true,
1018
- "progressive": true
1019
- }
1020
- ],
1021
- [
1022
- "optipng",
1023
- {
1024
- "optimizationLevel": 7
1025
- }
1026
- ],
1027
- [
1028
- "svgo",
1029
- {
1030
- "plugins": []
1031
- }
1006
+ "options": {
1007
+ "plugins": [
1008
+ [
1009
+ "gifsicle",
1010
+ {
1011
+ "colors": 256,
1012
+ "interlanced": false,
1013
+ "optimizationLevel": 3
1014
+ }
1015
+ ],
1016
+ [
1017
+ "jpegtran",
1018
+ {
1019
+ "arithmetic": true,
1020
+ "progressive": true
1021
+ }
1022
+ ],
1023
+ [
1024
+ "optipng",
1025
+ {
1026
+ "optimizationLevel": 7
1027
+ }
1028
+ ],
1029
+ [
1030
+ "svgo",
1031
+ {
1032
+ "plugins": []
1033
+ }
1034
+ ]
1032
1035
  ]
1033
- ]
1036
+ }
1034
1037
  },
1035
1038
  "exclude": {
1036
1039
  "__evaluate__": "self.debug || 2 < self.givenCommandLineArguments.length && self.givenCommandLineArguments[2] !== 'build' ? /.*/ : self.debug && console.warn(`Image compression disabled. Use configuration: \"{module:{optimizer:{image:{content:{exclude:undefined}}}}}\" to enable default image file including.`) || /.*/"
@@ -1038,11 +1041,7 @@
1038
1041
  },
1039
1042
  "loader": []
1040
1043
  },
1041
- "minimize": true,
1042
- "minimizer": {
1043
- "#": "HTML-Templates shouldn't be transformed via terser to avoid html webpack plugin throwing to not get markup as intermediate result.",
1044
- "__evaluate__": "[new (require('terser-webpack-plugin'))({exclude: /\\.html(?:\\.js)?(?:\\?.*)?$/, extractComments: false, parallel: true})]"
1045
- }
1044
+ "minimize": true
1046
1045
  },
1047
1046
  "preprocessor": {
1048
1047
  "cascadingStyleSheet": {
@@ -1357,6 +1356,24 @@
1357
1356
  "__evaluate__": "self.files.compose.image ? path.resolve(self.path.source.asset.image, path.relative(self.path.target.asset.image, self.files.compose.image)) : null"
1358
1357
  }
1359
1358
  ],
1359
+ "tidyUpGlobs": {
1360
+ "options": {
1361
+ "glob": {
1362
+ "ignore": [
1363
+ "node_modules/**/*.css.js",
1364
+ "**/node_modules/**/*.css.js"
1365
+ ]
1366
+ }
1367
+ },
1368
+ "pattern": [
1369
+ {
1370
+ "__evaluate__": "path.resolve(self.path.target.base, '*.css.js')"
1371
+ },
1372
+ {
1373
+ "__evaluate__": "path.resolve(self.path.target.base, '**/*.css.js')"
1374
+ }
1375
+ ]
1376
+ },
1360
1377
  "tidyUpOnClear": [
1361
1378
  {
1362
1379
  "__evaluate__": "path.resolve(self.path.target.base, 'yarn-error.log')"
@@ -1634,7 +1651,7 @@
1634
1651
  "files": {
1635
1652
  "compose": {
1636
1653
  "cascadingStyleSheet": {
1637
- "__evaluate__": "self.debug && 2 < self.givenCommandLineArguments.length && ['serve', 'test:browser'].includes(self.givenCommandLineArguments[2]) ? null : `${path.resolve(self.path.target.asset.cascadingStyleSheet, `[name]${self.path.target.asset.cascadingStyleSheet === self.path.source.asset.cascadingStyleSheet ? '.compiled' : ''}.css`)}?${self.hashAlgorithm}=[chunkhash]`"
1654
+ "__evaluate__": "self.debug && 2 < self.givenCommandLineArguments.length && ['serve', 'test:browser'].includes(self.givenCommandLineArguments[2]) ? null : ({chunk: {name}}) => `${path.relative(self.path.target.base, path.resolve(self.path.target.asset.cascadingStyleSheet, `${path.basename(name, '.css')}${self.path.target.asset.cascadingStyleSheet === self.path.source.asset.cascadingStyleSheet ? '.compiled' : ''}.css`))}?${self.hashAlgorithm}=[chunkhash]`"
1638
1655
  }
1639
1656
  },
1640
1657
  "defaultHTML": {
@@ -27,7 +27,8 @@ exports["default"] = void 0;
27
27
  var _configurator = _interopRequireDefault(require("./configurator"));
28
28
 
29
29
  // endregion
30
- module.exports = _configurator["default"].stylelint;
30
+ var configuration = (0, _configurator["default"])();
31
+ module.exports = configuration.stylelint;
31
32
  var _default = module.exports; // region vim modline
32
33
  // vim: set tabstop=4 shiftwidth=4 expandtab:
33
34
  // vim: foldmethod=marker foldmarker=region,endregion:
package/type.d.ts CHANGED
@@ -8,6 +8,7 @@ import ImageMinimizerWebpackPlugin from 'image-minimizer-webpack-plugin';
8
8
  import { JSDOM } from 'jsdom';
9
9
  import MiniCSSExtractPlugin from 'mini-css-extract-plugin';
10
10
  import { Options as RemoveDirectoryRecursivelyOptions } from 'rimraf';
11
+ import TerserWebpackPlugin from 'terser-webpack-plugin';
11
12
  import { DefinePlugin as WebpackDefinePlugin, Configuration as BaseWebpackConfiguration, IgnorePlugin as WebpackIgnorePlugin, library as webpackLibrary, ModuleOptions as WebpackModuleOptions, RuleSetRule as WebpackRuleSetRule, RuleSetUseItem as WebpackRuleSetUseItem, WebpackOptionsNormalized } from 'webpack';
12
13
  import OfflinePlugin, { CommonOptions as WorkboxCommonOptions, GenerateSWOptions as WorkboxGenerateSWOptions, InjectManifestOptions as WorkboxInjectManifestOptions } from 'workbox-webpack-plugin';
13
14
  export interface Browser {
@@ -108,6 +109,10 @@ export interface PathConfiguration extends BasePathConfiguration {
108
109
  context: string;
109
110
  ignore: Array<string>;
110
111
  tidyUp: Array<string>;
112
+ tidyUpGlobs: {
113
+ options: RemoveDirectoryRecursivelyOptions;
114
+ pattern: Array<string>;
115
+ };
111
116
  tidyUpOnClear: Array<string>;
112
117
  tidyUpOnClearGlobs: {
113
118
  options: RemoveDirectoryRecursivelyOptions;
@@ -278,7 +283,7 @@ export interface ResolvedConfiguration {
278
283
  files: {
279
284
  additionalPaths: Array<string>;
280
285
  compose: {
281
- cascadingStyleSheet: string;
286
+ cascadingStyleSheet: string | ((_asset: unknown) => string);
282
287
  image: string;
283
288
  javaScript: string;
284
289
  };
@@ -450,6 +455,7 @@ export declare type WebpackPlugins = Mapping<WebpackPlugin> & {
450
455
  InjectManifest: typeof OfflinePlugin.InjectManifest;
451
456
  };
452
457
  MiniCSSExtract?: typeof MiniCSSExtractPlugin;
458
+ Terser?: typeof TerserWebpackPlugin;
453
459
  };
454
460
  export declare type WebpackResolveData = Parameters<WebpackIgnorePlugin['checkIgnore']>[0];
455
461
  export declare type WebpackExtendedResolveData = WebpackResolveData & {
package/type.js CHANGED
@@ -15,7 +15,7 @@
15
15
  See https://creativecommons.org/licenses/by/3.0/deed.de
16
16
  endregion
17
17
  */
18
- // region imports
18
+ // region import s
19
19
 
20
20
  Object.defineProperty(exports, "__esModule", {
21
21
  value: true