From 820472796befb4322a004e887aa03129a0f15275 Mon Sep 17 00:00:00 2001 From: shmyga Date: Mon, 6 Jul 2026 10:56:02 +0300 Subject: [PATCH] build(static): fix webpack build warngins --- static/package.json | 4 +++- static/webpack.config.ts | 13 ++++++++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/static/package.json b/static/package.json index b9c6979..f44ced5 100644 --- a/static/package.json +++ b/static/package.json @@ -1,8 +1,10 @@ { "name": "gallery", "version": "0.4.1", + "type": "module", "scripts": { - "build": "webpack" + "build": "webpack --mode production", + "dev": "webpack --watch --mode development" }, "author": "shmyga ", "license": "ISC", diff --git a/static/webpack.config.ts b/static/webpack.config.ts index 1dbcc81..b981e99 100644 --- a/static/webpack.config.ts +++ b/static/webpack.config.ts @@ -28,7 +28,13 @@ const config: webpack.Configuration = { use: [ MiniCssExtractPlugin.loader, { 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;