weboptimizer 2.0.1548 → 2.0.1550
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 +12 -8
- package/type.d.ts +2 -4
- package/webpackConfigurator.js +8 -10
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "weboptimizer",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.1550",
|
|
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.
|
|
104
|
+
"clientnode": "3.0.1253",
|
|
105
105
|
"ejs": "^3.1.10",
|
|
106
106
|
"exports-loader": "^5.0.0",
|
|
107
107
|
"extract-loader": "^5.1.0",
|
|
@@ -121,25 +121,25 @@
|
|
|
121
121
|
"devDependencies": {
|
|
122
122
|
"@babel/cli": "^7.26.4",
|
|
123
123
|
"@babel/eslint-parser": "^7.25.9",
|
|
124
|
-
"@stylistic/eslint-plugin": "^2.12.
|
|
125
|
-
"@stylistic/eslint-plugin-ts": "^2.12.
|
|
124
|
+
"@stylistic/eslint-plugin": "^2.12.1",
|
|
125
|
+
"@stylistic/eslint-plugin-ts": "^2.12.1",
|
|
126
126
|
"@types/ejs": "^3.1.5",
|
|
127
127
|
"@types/eslint": "^9.6.1",
|
|
128
128
|
"@types/html-minifier": "^4.0.5",
|
|
129
129
|
"@types/html-minifier-terser": "^7.0.2",
|
|
130
130
|
"@types/imagemin": "^9.0.0",
|
|
131
|
-
"@types/node": "^22.10.
|
|
131
|
+
"@types/node": "^22.10.2",
|
|
132
132
|
"@types/postcss-import": "^14.0.3",
|
|
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.
|
|
136
|
+
"@typescript-eslint/parser": "^8.18.0",
|
|
137
137
|
"css-loader": "^7.1.2",
|
|
138
138
|
"cssnano": "^7.0.6",
|
|
139
139
|
"documentation-website": "^1.0.341",
|
|
140
140
|
"eslint": "^9.16.0",
|
|
141
141
|
"eslint-config-google": "^0.14.0",
|
|
142
|
-
"eslint-plugin-jsdoc": "^50.6.
|
|
142
|
+
"eslint-plugin-jsdoc": "^50.6.1",
|
|
143
143
|
"favicons": "^7.2.0",
|
|
144
144
|
"favicons-webpack-plugin": "^6.0.1",
|
|
145
145
|
"globals": "^15.13.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.
|
|
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
|
},
|
|
@@ -740,6 +740,9 @@
|
|
|
740
740
|
"./declarations.d.ts",
|
|
741
741
|
"./dummy",
|
|
742
742
|
"./dummyPlugin",
|
|
743
|
+
"./end-to-end-tests",
|
|
744
|
+
"./eslint.config.ts",
|
|
745
|
+
"./playwright.config.ts",
|
|
743
746
|
"./test",
|
|
744
747
|
"./test.js",
|
|
745
748
|
"./test.ts",
|
|
@@ -1546,6 +1549,7 @@
|
|
|
1546
1549
|
"watchOptions": {
|
|
1547
1550
|
"ignored": [
|
|
1548
1551
|
"./*.js",
|
|
1552
|
+
"./end-to-end-tests",
|
|
1549
1553
|
"**/deprecated",
|
|
1550
1554
|
"**/exclude",
|
|
1551
1555
|
"**/node_modules",
|
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
|
-
|
|
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
|
-
|
|
459
|
-
Offline?: {
|
|
457
|
+
offline?: {
|
|
460
458
|
GenerateSW: typeof OfflinePlugin.GenerateSW;
|
|
461
459
|
InjectManifest: typeof OfflinePlugin.InjectManifest;
|
|
462
460
|
};
|
package/webpackConfigurator.js
CHANGED
|
@@ -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
|
-
|
|
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, '
|
|
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.
|
|
177
|
-
|
|
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
|