Search results
@babel/standalone provides a standalone build of Babel for use in browsers and other non-Node.js environments. When (not) to use @babel/standalone. If you're using Babel in production, you should normally not use @babel/standalone.
Standalone build of Babel for use in non-Node.js environments. Similar to the (now deprecacted) babel-browser - Simple. Fast. Reliable. Content delivery at its finest. cdnjs is a free and open-source CDN service trusted by over 12.5% of all websites, serving over 200 billion requests each month, powered by Cloudflare.
You've configured Babel but you haven't made it actually do anything. Create a babel.config.json config in your project root and enable some presets . To start, you can use the env preset , which enables transforms for ES2015+
You can use the npm package runner that comes with npm@5.2.0 to shorten that command by replacing ./node_modules/.bin/babel with npx babel. Read on for a step-by-step explanation of how this works and an introduction to each of the tools used.
You can use @babel/standalone as a precompiled version of Babel or run a bundler on Babel yourself. Check the usage section below for how to use it as a script. You can also use the many online tools to prototype a script: Babel's own REPL; CodeSandbox
Babel ships with built-in support for JSX. Use it together with the babel-sublime package to bring syntax highlighting to a whole new level.
Babel is a tool that helps you write code in the latest version of JavaScript. When your supported environments don't support certain features natively, Babel will help you compile those features down to a supported version.