mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-24 02:47:35 -07:00
22 lines
373 B
TypeScript
22 lines
373 B
TypeScript
/**
|
|
* Replace i18n texts
|
|
*/
|
|
|
|
import Replacer from '../../../src/common/build/i18n';
|
|
|
|
export default lang => {
|
|
const replacer = new Replacer(lang);
|
|
|
|
return {
|
|
enforce: 'pre',
|
|
test: /\.(vue|js|ts)$/,
|
|
exclude: /node_modules/,
|
|
use: [{
|
|
loader: 'replace-string-loader',
|
|
options: {
|
|
search: replacer.pattern,
|
|
replace: replacer.replacement
|
|
}
|
|
}]
|
|
};
|
|
};
|