weboptimizer 4.0.48 → 4.0.49
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 +10 -8
- package/webpackConfigurator.js +9 -9
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "weboptimizer",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.49",
|
|
4
4
|
"description": "A generic web optimizer, (module) bundler and development environment.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"webpack",
|
|
@@ -94,7 +94,7 @@
|
|
|
94
94
|
"babel-loader": "^10.1.1",
|
|
95
95
|
"babel-plugin-polyfill-corejs3": "^1.0.0",
|
|
96
96
|
"babel-plugin-transform-rewrite-imports": "^1.5.4",
|
|
97
|
-
"clientnode": "4.0.
|
|
97
|
+
"clientnode": "4.0.1482",
|
|
98
98
|
"core-js": "^3.49.0",
|
|
99
99
|
"ejs": "^6.0.1",
|
|
100
100
|
"exports-loader": "^5.0.0",
|
|
@@ -127,15 +127,15 @@
|
|
|
127
127
|
"@types/postcss-url": "^10.0.4",
|
|
128
128
|
"@types/webpack-env": "^1.18.8",
|
|
129
129
|
"@types/webpack-sources": "^3.2.3",
|
|
130
|
-
"@typescript-eslint/parser": "^8.
|
|
130
|
+
"@typescript-eslint/parser": "^8.66.0",
|
|
131
131
|
"css-loader": "^7.1.4",
|
|
132
132
|
"cssnano": "^8.0.2",
|
|
133
133
|
"eslint": "^10.8.0",
|
|
134
134
|
"eslint-config-google": "^0.14.0",
|
|
135
|
-
"eslint-plugin-jsdoc": "^63.3.
|
|
135
|
+
"eslint-plugin-jsdoc": "^63.3.3",
|
|
136
136
|
"favicons": "^7.3.1",
|
|
137
137
|
"favicons-webpack-plugin": "^6.0.1",
|
|
138
|
-
"globals": "^17.
|
|
138
|
+
"globals": "^17.9.0",
|
|
139
139
|
"image-minimizer-webpack-plugin": "^5.0.0",
|
|
140
140
|
"jest": "^30.4.2",
|
|
141
141
|
"jsdoc": "^4.0.5",
|
|
@@ -155,9 +155,9 @@
|
|
|
155
155
|
"stylelint-config-standard": "^40.0.0",
|
|
156
156
|
"stylelint-config-standard-scss": "^17.0.0",
|
|
157
157
|
"terser-webpack-plugin": "^5.6.1",
|
|
158
|
-
"typescript-eslint": "^8.
|
|
158
|
+
"typescript-eslint": "^8.66.0",
|
|
159
159
|
"typescript-plugin-css-modules": "^5.2.0",
|
|
160
|
-
"web-documentation": "^1.0.
|
|
160
|
+
"web-documentation": "^1.0.45",
|
|
161
161
|
"workbox-webpack-plugin": "^7.4.1"
|
|
162
162
|
},
|
|
163
163
|
"peerDependencies": {
|
|
@@ -383,7 +383,7 @@
|
|
|
383
383
|
"types": {
|
|
384
384
|
"default": {
|
|
385
385
|
"filePathPattern": {
|
|
386
|
-
"__evaluate__": "`^${string.maskForRegularExpression(self.path.target.asset.javaScript)}.+(?:\\\\.[^.]+(?:\\\\.map)?)?\\\\.js$`"
|
|
386
|
+
"__evaluate__": "`^${string.maskForRegularExpression(self.path.target.asset.javaScript)}.+(?:\\\\.[^.]+(?:\\\\.map)?)?\\\\.c?js$`"
|
|
387
387
|
},
|
|
388
388
|
"outputExtension": "js",
|
|
389
389
|
"preinstall": {
|
|
@@ -1117,6 +1117,7 @@
|
|
|
1117
1117
|
"loader": "ejs-loader",
|
|
1118
1118
|
"options": {
|
|
1119
1119
|
"compiler": {
|
|
1120
|
+
"async": true,
|
|
1120
1121
|
"cache": true,
|
|
1121
1122
|
"compileDebug": false,
|
|
1122
1123
|
"debug": false,
|
|
@@ -1567,6 +1568,7 @@
|
|
|
1567
1568
|
"watchOptions": {
|
|
1568
1569
|
"ignored": [
|
|
1569
1570
|
"./.yarn",
|
|
1571
|
+
"./*.cjs",
|
|
1570
1572
|
"./*.js",
|
|
1571
1573
|
"./end-to-end-tests",
|
|
1572
1574
|
"**/.*",
|
package/webpackConfigurator.js
CHANGED
|
@@ -290,13 +290,13 @@ if (module.enforceDeduplication) {
|
|
|
290
290
|
const absoluteContextPath = resolve(configuration.path.context);
|
|
291
291
|
const consolidator = async result => {
|
|
292
292
|
const targetPath = result.createData.resource;
|
|
293
|
-
if (targetPath && /((
|
|
293
|
+
if (targetPath && /((?:^|\/)node_modules\/.+)/.test(targetPath) && (!targetPath.startsWith(absoluteContextPath) || /((?:^|\/)node_modules\/.+){2}/.test(targetPath)) && isFileSync(targetPath)) {
|
|
294
294
|
const packageDescriptor = await getClosestPackageDescriptor(targetPath);
|
|
295
295
|
if (packageDescriptor) {
|
|
296
296
|
let pathPrefixes;
|
|
297
297
|
let pathSuffix;
|
|
298
298
|
if (targetPath.startsWith(absoluteContextPath)) {
|
|
299
|
-
const matches = targetPath.match(/((
|
|
299
|
+
const matches = targetPath.match(/((?:^|.*?\/)node_modules\/)/g);
|
|
300
300
|
if (matches === null) return;
|
|
301
301
|
pathPrefixes = Array.from(matches);
|
|
302
302
|
/*
|
|
@@ -309,7 +309,7 @@ if (module.enforceDeduplication) {
|
|
|
309
309
|
if (index > 0) pathPrefixes[index] = resolve(pathPrefixes[index - 1], pathPrefix);
|
|
310
310
|
index += 1;
|
|
311
311
|
}
|
|
312
|
-
pathSuffix = targetPath.replace(/(
|
|
312
|
+
pathSuffix = targetPath.replace(/(?:^|.*\/)node_modules\/(.+$)/, '$1');
|
|
313
313
|
} else {
|
|
314
314
|
pathPrefixes = [resolve(absoluteContextPath, 'node_modules')];
|
|
315
315
|
// Find longest common prefix.
|
|
@@ -574,7 +574,7 @@ const genericLoader = {
|
|
|
574
574
|
}
|
|
575
575
|
return Boolean(result);
|
|
576
576
|
},
|
|
577
|
-
test: /\.s?css(
|
|
577
|
+
test: /\.s?css(?:\?.*)?$/i,
|
|
578
578
|
use: cssUse
|
|
579
579
|
},
|
|
580
580
|
// endregion
|
|
@@ -589,7 +589,7 @@ const genericLoader = {
|
|
|
589
589
|
generator: {
|
|
590
590
|
filename: join(relative(configuration.path.target.base, configuration.path.target.asset.font), '[name][ext]') + `?${configuration.hashAlgorithm}=[contenthash]`
|
|
591
591
|
},
|
|
592
|
-
test: /\.eot(
|
|
592
|
+
test: /\.eot(?:\?.*)?$/i,
|
|
593
593
|
type: 'asset/resource',
|
|
594
594
|
parser: {
|
|
595
595
|
dataUrlCondition: {
|
|
@@ -613,7 +613,7 @@ const genericLoader = {
|
|
|
613
613
|
maxSize: configuration.inPlace.otherMaximumFileSizeLimitInByte
|
|
614
614
|
}
|
|
615
615
|
},
|
|
616
|
-
test: /\.svg(
|
|
616
|
+
test: /\.svg(?:\?.*)?$/i,
|
|
617
617
|
type: 'asset/resource',
|
|
618
618
|
use: await Promise.all(module.optimizer.font.svg.loader.map(createEvaluateMapper('font.svg')))
|
|
619
619
|
},
|
|
@@ -625,7 +625,7 @@ const genericLoader = {
|
|
|
625
625
|
generator: {
|
|
626
626
|
filename: join(relative(configuration.path.target.base, configuration.path.target.asset.font), '[name][ext]') + `?${configuration.hashAlgorithm}=[contenthash]`
|
|
627
627
|
},
|
|
628
|
-
test: /\.ttf(
|
|
628
|
+
test: /\.ttf(?:\?.*)?$/i,
|
|
629
629
|
type: 'asset/resource',
|
|
630
630
|
mimetype: 'application/octet-stream',
|
|
631
631
|
parser: {
|
|
@@ -643,7 +643,7 @@ const genericLoader = {
|
|
|
643
643
|
generator: {
|
|
644
644
|
filename: join(relative(configuration.path.target.base, configuration.path.target.asset.font), '[name][ext]') + `?${configuration.hashAlgorithm}=[contenthash]`
|
|
645
645
|
},
|
|
646
|
-
test: /\.woff2?(
|
|
646
|
+
test: /\.woff2?(?:\?.*)?$/i,
|
|
647
647
|
type: 'asset/resource',
|
|
648
648
|
parser: {
|
|
649
649
|
dataUrlCondition: {
|
|
@@ -664,7 +664,7 @@ const genericLoader = {
|
|
|
664
664
|
filename: typeof configuration.path.target.asset.image === 'string' ? join(relative(configuration.path.target.base, configuration.path.target.asset.image), '[name][ext]') + `?${configuration.hashAlgorithm}=[contenthash]` : configuration.path.target.asset.image
|
|
665
665
|
},
|
|
666
666
|
include: configuration.path.source.asset.image,
|
|
667
|
-
test: /\.(?:
|
|
667
|
+
test: /\.(?:gif|ico|jpg|png|svg)(?:\?.*)?$/i,
|
|
668
668
|
type: 'asset/resource',
|
|
669
669
|
parser: {
|
|
670
670
|
dataUrlCondition: {
|