We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I have a child repo called fetch, which wrap the origin fetch. This project is designed to be used both in node (with node-fetch) and browser.
fetch
node-fetch
but it is running into error, even we've precompiled it.
{ "presets": [ [ "env", { "targets": { "node": "current" } } ], "stage-0" ], "plugins": [ [ "transform-builtin-extend", { "globals": ["Error", "Array"] } ] ] }
Here we use targets node, since it is required for async/await transforming.
async/await
related babel dependencies.
"babel-cli": "^6.26.0", "babel-core": "^6.26.3", "babel-eslint": "^7.2.3", "babel-jest": "^23.2.0", "babel-plugin-transform-builtin-extend": "^1.1.2", "babel-polyfill": "^6.26.0", "babel-preset-env": "^1.7.0", "babel-preset-stage-0": "^6.24.1"
https://gist.github.com/zzswang/9763fe903b364d2e4f11b1a4618aa669
It is running into the minify error. There must be something wrong with my .babelrc.
.babelrc
If we change targets from:
[ "env", { "targets": { "node": "current" } } ]
to
[ "env", { "modules": false } ]
minify will be ok, but start dev will failed due to:
ReferenceError: regeneratorRuntime is not defined
Could anyone help? Thanks.
The text was updated successfully, but these errors were encountered:
Hi! This is a general babel configuration question that we can't help troubleshoot, sorry!
My suggestion though, use axios instead of writing your own library.
axios
Thanks!
Sorry, something went wrong.
No branches or pull requests
I have a child repo called
fetch
, which wrap the origin fetch. This project is designed to be used both in node (withnode-fetch
) and browser.but it is running into error, even we've precompiled it.
the .babelrc for repo
fetch
Here we use targets node, since it is required for
async/await
transforming.related babel dependencies.
compile to
https://gist.github.com/zzswang/9763fe903b364d2e4f11b1a4618aa669
when used it in create-react-app
It is running into the minify error.
There must be something wrong with my
.babelrc
.If we change targets from:
to
minify will be ok, but start dev will failed due to:
Could anyone help?
Thanks.
The text was updated successfully, but these errors were encountered: