1
0
mirror of https://github.com/MisskeyIO/misskey synced 2024-12-18 00:29:00 +09:00
MisskeyIO/webpack/module/rules/i18n.ts
2018-02-15 19:59:07 +09:00

23 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
}
}]
};
};