weboptimizer 2.0.1547 → 2.0.1549

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.1547",
3
+ "version": "2.0.1549",
4
4
  "description": "A generic web optimizer, (module) bundler and development environment.",
5
5
  "keywords": [
6
6
  "webpack",
@@ -101,7 +101,7 @@
101
101
  "babel-loader": "^9.2.1",
102
102
  "babel-plugin-transform-modern-regexp": "^0.0.6",
103
103
  "babel-preset-minify": "^0.5.2",
104
- "clientnode": "3.0.1248",
104
+ "clientnode": "3.0.1252",
105
105
  "ejs": "^3.1.10",
106
106
  "exports-loader": "^5.0.0",
107
107
  "extract-loader": "^5.1.0",
@@ -121,8 +121,8 @@
121
121
  "devDependencies": {
122
122
  "@babel/cli": "^7.26.4",
123
123
  "@babel/eslint-parser": "^7.25.9",
124
- "@stylistic/eslint-plugin": "^2.11.0",
125
- "@stylistic/eslint-plugin-ts": "^2.11.0",
124
+ "@stylistic/eslint-plugin": "^2.12.0",
125
+ "@stylistic/eslint-plugin-ts": "^2.12.0",
126
126
  "@types/ejs": "^3.1.5",
127
127
  "@types/eslint": "^9.6.1",
128
128
  "@types/html-minifier": "^4.0.5",
@@ -133,10 +133,10 @@
133
133
  "@types/postcss-url": "^10.0.4",
134
134
  "@types/webpack-env": "^1.18.5",
135
135
  "@types/webpack-sources": "^3.2.3",
136
- "@typescript-eslint/parser": "^8.17.0",
136
+ "@typescript-eslint/parser": "^8.18.0",
137
137
  "css-loader": "^7.1.2",
138
138
  "cssnano": "^7.0.6",
139
- "documentation-website": "^1.0.340",
139
+ "documentation-website": "^1.0.341",
140
140
  "eslint": "^9.16.0",
141
141
  "eslint-config-google": "^0.14.0",
142
142
  "eslint-plugin-jsdoc": "^50.6.0",
@@ -161,7 +161,7 @@
161
161
  "stylelint": "^16.11.0",
162
162
  "stylelint-config-standard": "^36.0.1",
163
163
  "stylelint-config-standard-scss": "^14.0.0",
164
- "typescript-eslint": "^8.17.0",
164
+ "typescript-eslint": "^8.18.0",
165
165
  "typescript-plugin-css-modules": "^5.1.0",
166
166
  "workbox-webpack-plugin": "^7.3.0"
167
167
  },
package/type.d.ts CHANGED
@@ -375,7 +375,7 @@ export interface ResolvedConfiguration {
375
375
  offline: (null | {
376
376
  common: WorkboxBaseCommonOptions & WorkboxCommonOptions;
377
377
  injectionManifest: WorkboxInjectManifestOptions;
378
- serviceWorker: WorkboxGenerateSWOptions;
378
+ generateServiceWorker: WorkboxGenerateSWOptions;
379
379
  use: 'injectionManifest' | 'serviceWorker';
380
380
  });
381
381
  package: {
@@ -452,11 +452,9 @@ export interface WebpackAssets extends WebpackBaseAssets {
452
452
  export type WebpackPlugin = webpackLibrary.AbstractLibraryPlugin<unknown> & Mapping<unknown>;
453
453
  export type WebpackPlugins = Mapping<WebpackPlugin> & {
454
454
  Favicon?: typeof FaviconWebpackPlugin;
455
- GenerateServiceWorker?: typeof OfflinePlugin.GenerateSW;
456
455
  HTML?: typeof HtmlWebpackPlugin;
457
456
  ImageMinimizer?: typeof ImageMinimizerWebpackPlugin;
458
- InjectManifest?: typeof OfflinePlugin.InjectManifest;
459
- Offline?: {
457
+ offline?: {
460
458
  GenerateSW: typeof OfflinePlugin.GenerateSW;
461
459
  InjectManifest: typeof OfflinePlugin.InjectManifest;
462
460
  };
@@ -64,11 +64,11 @@ var updateRule = (_optionalRequire = optionalRequire('postcss-sprites/lib/core')
64
64
  var postcssURL = optionalRequire('postcss-url');
65
65
  /// endregion
66
66
  var pluginNameResourceMapping = {
67
- HTML: 'html-webpack-plugin',
68
- MiniCSSExtract: 'mini-css-extract-plugin',
69
67
  Favicon: 'favicons-webpack-plugin',
70
68
  ImageMinimizer: 'image-minimizer-webpack-plugin',
71
- Offline: 'workbox-webpack-plugin',
69
+ HTML: 'html-webpack-plugin',
70
+ MiniCSSExtract: 'mini-css-extract-plugin',
71
+ offline: 'workbox-webpack-plugin',
72
72
  Terser: 'terser-webpack-plugin'
73
73
  };
74
74
  var plugins = {};
@@ -79,10 +79,6 @@ for (var _i = 0, _Object$entries = Object.entries(pluginNameResourceMapping); _i
79
79
  var plugin = optionalRequire(alias);
80
80
  if (plugin) plugins[name] = plugin;else console.debug("Optional webpack plugin \"".concat(name, "\" not available."));
81
81
  }
82
- if (plugins.Offline) {
83
- plugins.GenerateServiceWorker = plugins.Offline.GenerateSW;
84
- plugins.InjectManifest = plugins.Offline.InjectManifest;
85
- }
86
82
  // endregion
87
83
  var configuration = (0, _configurator["default"])();
88
84
  var _module = configuration.module;
@@ -155,7 +151,7 @@ if (plugins.HTML) {
155
151
  if (htmlAvailable && Object.prototype.hasOwnProperty.call(configuration, 'favicon') && plugins.Favicon && (0, _clientnode.isFileSync)([].concat(configuration.favicon.logo)[0])) pluginInstances.push(new plugins.Favicon(configuration.favicon));
156
152
  //// endregion
157
153
  //// region provide offline functionality
158
- if (htmlAvailable && configuration.offline && Object.prototype.hasOwnProperty.call(plugins, 'Offline')) {
154
+ if (htmlAvailable && configuration.offline && Object.prototype.hasOwnProperty.call(plugins, 'offline')) {
159
155
  if (!['serve', 'test:browser'].includes(configuration.givenCommandLineArguments[2])) for (var _i3 = 0, _Object$entries3 = Object.entries({
160
156
  cascadingStyleSheet: 'css',
161
157
  javaScript: 'js'
@@ -173,8 +169,10 @@ if (htmlAvailable && configuration.offline && Object.prototype.hasOwnProperty.ca
173
169
  }
174
170
  }
175
171
  }
176
- if (plugins.InjectManifest && [].concat(configuration.offline.use).includes('injectionManifest')) pluginInstances.push(new plugins.InjectManifest((0, _clientnode.extend)(true, configuration.offline.common, configuration.offline.injectionManifest)));
177
- if (plugins.GenerateServiceWorker && [].concat(configuration.offline.use).includes('generateServiceWorker')) pluginInstances.push(new plugins.GenerateServiceWorker((0, _clientnode.extend)(true, configuration.offline.common, configuration.offline.serviceWorker)));
172
+ if (plugins.offline) {
173
+ if ([].concat(configuration.offline.use).includes('injectionManifest')) pluginInstances.push(new plugins.offline.InjectManifest((0, _clientnode.extend)(true, configuration.offline.common, configuration.offline.injectionManifest)));
174
+ if ([].concat(configuration.offline.use).includes('generateServiceWorker')) pluginInstances.push(new plugins.offline.GenerateSW((0, _clientnode.extend)(true, configuration.offline.common, configuration.offline.generateServiceWorker)));
175
+ }
178
176
  }
179
177
  //// endregion
180
178
  //// region provide build environment