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