0.0.6 • Published 6 years ago
@stevefan1999/fuck-babel-helper-jsx v0.0.6
fuck-babel-helper-jsx
This package is used to resolve the problem of preact-compat#238, I'm not sure this is going to work for all instances
Utility for reverting babelHelper.jsx calls back to React.createElement
Why?
The plugin, babel-plugin-transform-react-inline-elements, is rewriting every React.createElement calls to the more optimized babelHelpers.jsx for production environment.
The intentions of doing this were good. However, since babelHelper.jsx is specially designed for the VNode structure of React, this would break compatibilities if alias shim is used instead to activate preact-compat or inferno-compat.
Usage
If you are using webpack then you only needed to add a new alias:
module.exports = {
...
resolve: {
"alias": {
...
"babel-runtime/helpers/jsx": "@stevefan1999/fuck-babel-helper-jsx",
...
}
}
...
}