WEBAPP: обновлены настройки WebPack для корректной загрузки изображений из CSS подключаемых как модули (import)

This commit is contained in:
Mim 2026-04-02 17:54:22 +03:00
parent e441d940ba
commit 96dc129f24

View File

@ -27,7 +27,7 @@ module.exports = {
}, },
output: { output: {
path: path.resolve(__dirname, "dist"), path: path.resolve(__dirname, "dist"),
publicPath: "/dist/", publicPath: "dist/",
filename: "p8-panels.js" filename: "p8-panels.js"
}, },
module: { module: {
@ -42,14 +42,14 @@ module.exports = {
} }
} }
}, },
{ test: /\.css$/, use: ["style-loader", "css-loader"] },
{ {
test: /\.(jpg|png|svg)$/, test: /\.(jpg|png|svg)$/,
loader: "file-loader", type: "asset/resource",
options: { generator: {
name: "[path][name].[hash].[ext]" filename: "[path][name].[hash].[ext]"
} }
}, }
{ test: /\.css$/, use: ["style-loader", "css-loader"] }
] ]
} }
}; };