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