var kb = {
"q":"й",
"w":"ц",
"e":"у",
"r":"к",
"t":"е",
"y":"н"
// и дальше
};
function chkb(s) {
var ret = '';
for(let i = 0; i < s.length; i++) {
if(s[i] in kb) {
ret = ret + kb[s[i]];
} else {
ret = ret + s[i];
}
}
return ret;
}
console.log( chkb("qwer") ); // йцук
{
test: /\.(png|jpe?g|gif)$/i,
use: [
{
loader: 'file-loader',
options: {
name: '[name].[ext]',
publicPath: 'img',
outputPath: 'img',
useRelativePath: true,
esModule: false,
}
},
{
loader: 'image-webpack-loader',
options: {
mozjpeg: {
progressive: true,
quality: 65
}
}
}
]
}
<?php wp_footer(); ?>