We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3ce64f5 commit c7fdc93Copy full SHA for c7fdc93
src/extract-react-intl/index.ts
@@ -10,6 +10,7 @@ import {
10
PluginItem
11
} from '@babel/core'
12
import readBabelrcUp from 'read-babelrc-up'
13
+import babelPluginReactIntl from 'babel-plugin-react-intl'
14
15
type LocaleMap = Record<string, Record<string, {}>>
16
@@ -90,10 +91,7 @@ export default async (
90
91
const presets = babelrc.presets || []
92
const plugins = babelrc.plugins || []
93
- presets.unshift({
94
- // eslint-disable-next-line global-require, @typescript-eslint/no-require-imports
95
- plugins: [[require('babel-plugin-react-intl'), pluginOptions]]
96
- })
+ presets.unshift({ plugins: [[babelPluginReactIntl, pluginOptions]] })
97
98
const extractFromFile = async (file: string) => {
99
const babelOpts = {
0 commit comments