UNPKG

361 BJavaScriptView Raw
1const intlPlugin = require('babel-plugin-react-intl').default;
2
3const namespacePlugin = require('./namespace-plugin');
4
5module.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};