How to add multiple babel plugin
See original GitHub issueI want to add babel-plugin-import and babel-plugin-transform-decorators-legacy in the config-overrides.js.
config = injectBabelPlugin(
['transform-decorators-legacy',
'import', { libraryName: 'antd', libraryDirectory: 'es', style: 'css' }
], config)
config = injectBabelPlugin([
['import', { libraryName: 'antd', libraryDirectory: 'es', style: 'css' }],
'transform-decorators-legacy',
], config)
These two does not work. Could you please add document?
Issue Analytics
- State:
- Created 5 years ago
- Comments:5
Top Results From Across the Web
Plugins - Babel.js
Using a Plugin. If the plugin is on npm, you can pass in the name of the plugin and Babel will check that...
Read more >How to Add Extra Functionality to Your Modules With Babel
Building the Plugin With a Visitor ... Based on the type of the node, you can add properties to this object, that will...
Read more >Babel: Plugins, Presets and Parsers | Laurie on Tech
The first type of plugin is a syntax plugin. Out of the box, Babel is unable to work with code written using JSX...
Read more >Is it possible to use more than one Babel preset in a project?
add them as items to the array of presets { "presets": ["babel-preset-expo","react-native","flow"] "env": { "development": { "plugins": ...
Read more >Adding Babel presets and plugins in Next.js - Netlify
"plugins": [] }. If you want to add more presets than the next/babel one, you can add them to that array in an...
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 Free
Top 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
This works.
config = injectBabelPlugin([‘import’, {libraryName: ‘antd-mobile’, style: ‘css’}, ‘antd-mobile’], config) config = injectBabelPlugin([‘import’, {libraryName: ‘antd’, style: ‘css’}, ‘antd’], config)