Skip to content

Commit

Permalink
Update README with extension and plugin properties
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikek2252 committed Jul 2, 2022
1 parent 8b740e2 commit 3068bd9
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,28 @@ externalPaths: ['@*/*']
```
will look up translations in scoped addons like `node_modules/@company/scoped-addon/translations`.

### `babelParserPlugins` `extensions`

If your application uses doesn't parse correctly because it requires a specific babel plugin you can specifiy them in the config file under the key `babelParserPlugins` a list on plugins can be found [here](https://babeljs.io/docs/en/babel-parser#plugins).

For example if you would like typescript support you can specify the `typescript` plugin, although please note if the plugin introduces a new file extension you will also need to specifiy that in the `extensions` property. See the examples below.

Typescript example
```js
export default {
babelParserPlugins: ['typescript'],
extensions: ['.ts'],
};
```

Jsx example
```js
export default {
babelParserPlugins: ['jsx'],
extensions: ['.jsx'],
};
```

### `--fix`
If your application has a lot of unused translations you can run the command with
the `--fix` to remove them. Remember to double check your translations as dynamic
Expand Down

0 comments on commit 3068bd9

Please sign in to comment.