WEBAPP: обновлены настройки WebPack для корректной загрузки изображений из CSS подключаемых как модули (import)
This commit is contained in:
parent
e441d940ba
commit
96dc129f24
@ -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"] }
|
||||
}
|
||||
]
|
||||
}
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user