Closed bpetetot closed 5 years ago
And if you add this on your project directly ? And add information on README.md of @k-ramel/driver-redux-form
?
One of the problem I can see right now is that if this plugin (babel-plugin-transform-runtime) transpile Map/Symbol/etc, and includes core-js
.
If you target a recent browser, you don't need core-js. Your bundle is bloated for ... almost nothing, by core-js.
In other hand, the runtimeGenerator
is a pain, and it could be great to transpile it: maybe with an other plugin.
Right now, we use this in our current projects :
"regenerator-runtime": "^0.12.0"
/* eslint-env browser */
import React from 'react'
import ReactDOM from 'react-dom'
import 'normalize.css'
import 'regenerator-runtime/runtime' // <- here
import 'react-vis/dist/style.css'
import App from './app.wrapped'
ReactDOM.render(React.createElement(App), document.getElementById('root'))
This have a minimal bundle size impact.
And BTW, this is also needed for the @k-ramel/driver-http
;)
No problem, I will add "regenerator-runtime": "^0.12.0"
to my app. Thx.
So you can close this issue and the associated PR #198
Before closing this issue, we should add a line into the README.md
I configured redux-form driver with my project and it seems that the build of
@k-ramel/driver-redux-form
needs to haveregeneratorRuntime
as dev dependency to use it in my app.I get this error when I try to use
asyncSubmit
methodsWhen I inspect the transpiled / uglyfied lib, I get that
@k-ramel/driver-redux-form
:So you should use
babel-plugin-transform-runtime
when the lib is transpiled. See explaination here