Web:Client: disable copy file with file-loader and return copy-webpack-plugin for locales

This commit is contained in:
Timofey Boyko 2023-02-01 11:02:32 +03:00
parent 64005a3576
commit 930b71b424

View File

@ -125,7 +125,8 @@ const config = {
{ {
loader: "file-loader", loader: "file-loader",
options: { options: {
name: (resourcePath, resourceQuery) => { emitFile: false,
name: (resourcePath) => {
let result = resourcePath.split("public\\")[1].split("\\"); let result = resourcePath.split("public\\")[1].split("\\");
result.pop(); result.pop();
@ -227,26 +228,19 @@ const config = {
new CleanWebpackPlugin(), new CleanWebpackPlugin(),
new ExternalTemplateRemotesPlugin(), new ExternalTemplateRemotesPlugin(),
// new CopyPlugin({ new CopyPlugin({
// patterns: [ patterns: [
// // { // {
// // context: path.resolve(__dirname, "public"), // context: path.resolve(__dirname, "public"),
// // from: "images/**/*.*", // from: "images/**/*.*",
// // }, // },
// { {
// context: path.resolve(__dirname, "public"), context: path.resolve(__dirname, "public"),
// from: "locales/**/*.json", from: "locales/**/*.json",
// transform: minifyJson, transform: minifyJson,
// // to: ({ context, absoluteFilename }) => { },
// // const newPath = absoluteFilename.replace(context, "").split("\\"); ],
}),
// // newPath.splice(-1);
// // return `/${newPath.join("/")}/[name].[contenthash][ext]`;
// // },
// },
// ],
// }),
], ],
}; };