question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to add multiple babel plugin

See original GitHub issue

I 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:closed
  • Created 5 years ago
  • Comments:5

github_iconTop GitHub Comments

3reactions
toearthcommented, Mar 22, 2018
    config = injectBabelPlugin('transform-decorators-legacy',config)
    config = injectBabelPlugin(['import', { libraryName: 'antd', libraryDirectory: 'es', style: 'css' }], config)

This works.

0reactions
webdevsydcommented, Mar 13, 2019

config = injectBabelPlugin([‘import’, {libraryName: ‘antd-mobile’, style: ‘css’}, ‘antd-mobile’], config) config = injectBabelPlugin([‘import’, {libraryName: ‘antd’, style: ‘css’}, ‘antd’], config)

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found