@nlabs/lex 1.59.2 → 1.59.3
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 +15 -10
- package/webpack.config.js +37 -26
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nlabs/lex",
|
|
3
|
-
"version": "1.59.
|
|
3
|
+
"version": "1.59.3",
|
|
4
4
|
"description": "Lex",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -136,7 +136,7 @@
|
|
|
136
136
|
"html-loader": "^5.1.0",
|
|
137
137
|
"html-webpack-plugin": "^5.6.7",
|
|
138
138
|
"https-browserify": "^1.0.0",
|
|
139
|
-
"image-webpack-
|
|
139
|
+
"image-minimizer-webpack-plugin": "^5.0.0",
|
|
140
140
|
"jsdom": "^29.1.1",
|
|
141
141
|
"latest-version": "9.0.0",
|
|
142
142
|
"lodash": "^4.18.1",
|
|
@@ -170,6 +170,7 @@
|
|
|
170
170
|
"resolve": "^1.22.12",
|
|
171
171
|
"rimraf": "^6.1.3",
|
|
172
172
|
"semver": "^7.8.5",
|
|
173
|
+
"sharp": "^0.35.3",
|
|
173
174
|
"source-map-loader": "^5.0.0",
|
|
174
175
|
"storybook": "^10.4.6",
|
|
175
176
|
"stream-browserify": "^3.0.0",
|
|
@@ -200,18 +201,22 @@
|
|
|
200
201
|
"@types/webpack": "^5.28.5"
|
|
201
202
|
},
|
|
202
203
|
"overrides": {
|
|
204
|
+
"@babel/core": "^7.29.7",
|
|
205
|
+
"@xhmikosr/decompress": "^11.1.3",
|
|
206
|
+
"brace-expansion": "^5.0.7",
|
|
203
207
|
"cross-spawn": "^7.0.6",
|
|
204
|
-
"fast-uri": "^3.1.2",
|
|
205
|
-
"fast-xml-builder": "^1.2.0",
|
|
206
208
|
"fast-xml-parser": "^5.8.0",
|
|
207
209
|
"got": "^14.6.6",
|
|
208
|
-
"
|
|
209
|
-
"
|
|
210
|
-
"
|
|
211
|
-
"
|
|
210
|
+
"http-proxy-middleware": "^3.0.7",
|
|
211
|
+
"js-yaml": "^4.3.0",
|
|
212
|
+
"piscina": "^4.9.3",
|
|
213
|
+
"qs": "^6.15.3",
|
|
212
214
|
"semver-regex": "^4.0.5",
|
|
213
|
-
"tmp": "^0.2.
|
|
214
|
-
"
|
|
215
|
+
"tmp": "^0.2.7",
|
|
216
|
+
"undici": "^7.28.0",
|
|
217
|
+
"webpack-plugin-serve": {
|
|
218
|
+
"ws": "^7.5.11"
|
|
219
|
+
}
|
|
215
220
|
},
|
|
216
221
|
"gitHead": "0f5fb22fc0f0ab1abab5adf62afed24c7c87e4a8"
|
|
217
222
|
}
|
package/webpack.config.js
CHANGED
|
@@ -15,6 +15,7 @@ import FaviconsWebpackPlugin from 'favicons-webpack-plugin';
|
|
|
15
15
|
import {existsSync} from 'fs';
|
|
16
16
|
import {sync as globSync} from 'glob';
|
|
17
17
|
import HtmlWebPackPlugin from 'html-webpack-plugin';
|
|
18
|
+
import ImageMinimizerPlugin from 'image-minimizer-webpack-plugin';
|
|
18
19
|
import isEmpty from 'lodash/isEmpty.js';
|
|
19
20
|
import {createRequire} from 'module';
|
|
20
21
|
import {resolve as pathResolve} from 'path';
|
|
@@ -558,31 +559,7 @@ export default (webpackEnv, webpackOptions) => {
|
|
|
558
559
|
type: 'asset/resource',
|
|
559
560
|
generator: {
|
|
560
561
|
filename: '[name].[hash][ext]'
|
|
561
|
-
}
|
|
562
|
-
use: isProduction ? [
|
|
563
|
-
{
|
|
564
|
-
loader: 'image-webpack-loader',
|
|
565
|
-
options: {
|
|
566
|
-
mozjpeg: {
|
|
567
|
-
progressive: true,
|
|
568
|
-
quality: 65
|
|
569
|
-
},
|
|
570
|
-
optipng: {
|
|
571
|
-
enabled: false
|
|
572
|
-
},
|
|
573
|
-
pngquant: {
|
|
574
|
-
quality: [0.65, 0.90],
|
|
575
|
-
speed: 4
|
|
576
|
-
},
|
|
577
|
-
gifsicle: {
|
|
578
|
-
interlaced: false
|
|
579
|
-
},
|
|
580
|
-
webp: {
|
|
581
|
-
quality: 75
|
|
582
|
-
}
|
|
583
|
-
}
|
|
584
|
-
}
|
|
585
|
-
] : []
|
|
562
|
+
}
|
|
586
563
|
},
|
|
587
564
|
{
|
|
588
565
|
test: /\.json$/,
|
|
@@ -607,7 +584,41 @@ export default (webpackEnv, webpackOptions) => {
|
|
|
607
584
|
isProduction && isWeb
|
|
608
585
|
? {
|
|
609
586
|
minimizer: [
|
|
610
|
-
new CssMinimizerPlugin()
|
|
587
|
+
new CssMinimizerPlugin(),
|
|
588
|
+
new ImageMinimizerPlugin({
|
|
589
|
+
include: staticPathFull,
|
|
590
|
+
minimizer: [
|
|
591
|
+
{
|
|
592
|
+
filter: (_source, sourcePath) => /\.(gif|jpe?g|png|webp)$/i.test(sourcePath),
|
|
593
|
+
implementation: ImageMinimizerPlugin.sharpMinify,
|
|
594
|
+
options: {
|
|
595
|
+
encodeOptions: {
|
|
596
|
+
jpeg: {
|
|
597
|
+
progressive: true,
|
|
598
|
+
quality: 65
|
|
599
|
+
},
|
|
600
|
+
png: {
|
|
601
|
+
quality: 90
|
|
602
|
+
},
|
|
603
|
+
webp: {
|
|
604
|
+
quality: 75
|
|
605
|
+
}
|
|
606
|
+
}
|
|
607
|
+
}
|
|
608
|
+
},
|
|
609
|
+
{
|
|
610
|
+
filter: (_source, sourcePath) => /\.svg$/i.test(sourcePath),
|
|
611
|
+
implementation: ImageMinimizerPlugin.svgoMinify,
|
|
612
|
+
options: {
|
|
613
|
+
encodeOptions: {
|
|
614
|
+
multipass: true,
|
|
615
|
+
plugins: ['preset-default']
|
|
616
|
+
}
|
|
617
|
+
}
|
|
618
|
+
}
|
|
619
|
+
],
|
|
620
|
+
test: /\.(gif|jpe?g|png|svg|webp)$/i
|
|
621
|
+
})
|
|
611
622
|
],
|
|
612
623
|
runtimeChunk: 'single',
|
|
613
624
|
splitChunks: {
|