boopathi/react-svg-loader

require.resolve for 'babel-preset-react'

libo1106 opened this issue · 4 comments

presets: [jsx ? void 0 : "react"].filter(Boolean),

current babel-preset-react is not require.resolve

try this

presets: jsx ? [] : [require.resolve('babel-preset-react')],

why is this required? is it causing a bug for you?

like this:

https://github.com/boopathi/react-svg-loader/blob/master/packages/react-svg-core/src/index.js#L25

when react-svg-loader is a devDependencies , require.resolve can help to find module correct

now presets should be

presets: jsx ? [] : [require.resolve('@babel/preset-react')],

because babel upgrade

stale commented

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.