i18next-scanner-typescript
Typescript support for i18next-scanner
Install
yarn add -D i18next-scanner-typescript
Usage
const typescriptTransform = require('i18next-scanner-typescript');
module.exports = {
options: {
func: {
extensions: ['.js', '.jsx'],
},
trans: {
extensions: ['.js', '.jsx'],
},
},
transform: typescriptTransform({
extensions: [".ts", ".tsx"],
tsOptions: {
target: "es2017",
},
function customTransform(outputText, file, enc, done) {
parser.parseTransFromString(outputText);
parser.parseFuncFromString(outputText});
done();
},
}),
};
Double check that you don't have TS extensions in the non-transform configuration