Skip to content
New issue

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

babel使用指南 #32

Closed
zhouzhongyuan opened this issue Mar 23, 2017 · 3 comments
Closed

babel使用指南 #32

zhouzhongyuan opened this issue Mar 23, 2017 · 3 comments
Labels

Comments

@zhouzhongyuan
Copy link
Owner

zhouzhongyuan commented Mar 23, 2017

@zhouzhongyuan
Copy link
Owner Author

Lookup behavior

Babel will look for a .babelrc in the current directory of the file being transpiled. If one does not exist, it will travel up the directory tree until it finds either a .babelrc, or a package.json with a "babel": {} hash within.

Use "babelrc": false in options to stop lookup behavior, or provide the --no-babelrc CLI flag.

@zhouzhongyuan
Copy link
Owner Author

zhouzhongyuan commented Mar 2, 2018

shim vs polyfill

  • A shim is a library that brings a new(own) API to an older environment, using only the means of that environment.
  • A polyfill is a shim for a browser API.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant