1 | const intlPlugin = require('babel-plugin-react-intl').default;
|
2 |
|
3 | const namespacePlugin = require('./namespace-plugin');
|
4 |
|
5 | module.exports = function reactIntlPreset(_, options = {}) {
|
6 | const { prefix, ...rest } = options;
|
7 |
|
8 | return {
|
9 | plugins: [
|
10 | [namespacePlugin, { prefix }],
|
11 | [intlPlugin, { extractSourceLocation: true, ...rest }],
|
12 | ],
|
13 | };
|
14 | };
|