Change the shorthands from babel-plugin-… to @babel/plugin-…
See original GitHub issuehttps://babeljs.io/docs/en/plugins#plugin-shorthand says:
If the name of the package is prefixed with babel-plugin-, you can use a shorthand: … (skip this prefix)
https://babeljs.io/docs/en/presets#preset-shorthand says:
If the name of the package is prefixed with babel-preset-, you can use a shorthand: (skip this prefix)
As plugins and presets are commonly not prefixed with babel-plugin-
or babel-preset-
, but with @babel/plugin-
and @babel/preset-
change the shorthand options to @babel/preset-
and @babel/plugin-
.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
babel/plugin-transform-shorthand-properties
Installation. npm install --save-dev @babel/plugin-transform-shorthand-properties. Copy. Usage. With a configuration file (Recommended).
Read more >@babel/plugin-transform-shorthand-properties - npm
Start using @babel/plugin-transform-shorthand-properties in your project by running `npm i @babel/plugin-transform-shorthand-properties`.
Read more >@babel/plugin-transform-shorthand-properties | Yarn - Yarn
Fast, reliable, and secure dependency management.
Read more >Babel - Storybook
Babel. Storybook's webpack config by default sets up Babel for ES6 transpiling. It has three different modes: CRA - the mode for Create...
Read more >Migrating from Babel - SWC
Comparison ; babel-plugin-transform-runtime, ✔️ ; babel-plugin-transform-shorthand-properties, ✔️ ; babel-plugin-transform-spread, ✔️ ; babel- ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I think we can list both
@babel/plugin
andbabel-plugin
as supported prefixes because@babel/core
supports both of thembabel
repo start withbabel-plugin-
: e.g.babel-plugin-istanbul
,babel-plugin-dynamic-import-node
and a few others to name.Not sure if behavior changed but testing
babel-cli --presets='typescript'
(preset should be presets) will give the errorwhich is expected since you need the org
@babel
part assuming@babel/preset-typescript
was installedBut the example may be confusing if you are using Babel’s presets vs one on npm so we can change that