build(static): fix webpack build warngins

This commit is contained in:
2026-07-06 10:56:02 +03:00
parent 12774db70f
commit 72fd148a54
2 changed files with 15 additions and 2 deletions

View File

@@ -1,8 +1,10 @@
{ {
"name": "gallery", "name": "gallery",
"version": "0.4.2", "version": "0.4.2",
"type": "module",
"scripts": { "scripts": {
"build": "webpack" "build": "webpack --mode production",
"dev": "webpack --watch --mode development"
}, },
"author": "shmyga <shmyga.z@gmail.com>", "author": "shmyga <shmyga.z@gmail.com>",
"license": "ISC", "license": "ISC",

View File

@@ -28,7 +28,13 @@ const config: webpack.Configuration = {
use: [ use: [
MiniCssExtractPlugin.loader, MiniCssExtractPlugin.loader,
{ loader: "css-loader", options: { sourceMap: true, url: false } }, { loader: "css-loader", options: { sourceMap: true, url: false } },
{ loader: "sass-loader", options: { sourceMap: true } }, {
loader: "sass-loader",
options: {
sourceMap: true,
sassOptions: { quietDeps: true, silenceDeprecations: ["color-functions", "global-builtin", "import"] },
},
},
], ],
}, },
], ],
@@ -60,6 +66,11 @@ const config: webpack.Configuration = {
], ],
}), }),
], ],
performance: {
hints: false,
maxEntrypointSize: 512000,
maxAssetSize: 512000,
},
}; };
export default config; export default config;