Closed depoulo closed 4 years ago
.babelrc
:
{
"presets": [
[
"@babel/preset-env",
{
"useBuiltIns": "usage"
}
],
"@babel/preset-react"
],
"plugins": [
"babel-plugin-dynamic-import-node",
"@babel/plugin-proposal-class-properties",
"@babel/plugin-proposal-object-rest-spread",
"@babel/plugin-syntax-dynamic-import",
"loadable-components/babel",
"transform-react-handled-props"
],
"env": {
"production": {
"plugins": [
[
"babel-plugin-lodash",
{
"id": ["lodash", "recompose"],
"workaround": "https://github.com/facebook/jest/issues/3959",
"reason": "https://github.com/istanbuljs/babel-plugin-istanbul/issues/116"
}
],
[
"transform-react-remove-prop-types",
{
"mode": "remove",
"removeImport": true,
"ignoreFilenames": ["node_modules"],
"additionalLibraries": ["react-immutable-proptypes"]
}
]
]
},
"development": {
"plugins": [["babel-plugin-lodash", { "id": ["lodash", "recompose"] }]]
}
}
}
Been helping myself with the export hack, would have preferred this module here though...
@depoulo can you please provide a minimal source code to repro this issue?
I narrowed it down to default exported anonymous functional HOCs.
Has anyone encountered this issue? Setup: React 16.4, Webpack 4, Babel 7 (more details coming)