Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

Babel preset/plugin customization is undocumented? #71

Closed
dbkaplun opened this issue Feb 26, 2017 · 2 comments
Closed

Babel preset/plugin customization is undocumented? #71

dbkaplun opened this issue Feb 26, 2017 · 2 comments

Comments

@dbkaplun
Copy link

I would like to use Radium with neutrino-dev but it seems like neutrino does not come with babel plugins for class decorators or properties as in Radium's default usage. Is there any way to customize neutrino's babel configuration?

@eliperelman
Copy link
Member

Yes, you can certainly enhance the Babel configuration, and the documentation is here: https://neutrino.js.org/customization/advanced.html

In your override file, you can start a modification with:

module.exports = neutrino => {
  neutrino.config.module
    .rule('compile')
      .loader('babel', ({ options }) => {
        options.presets...
        options.plugins...

        return { options };
      });
};

Add this file to your preset list and you should be good to go.

@eliperelman
Copy link
Member

Closing, and informed of documentation for overriding Babel configuration. Please re-open if something is insufficient for you. Thanks!

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

No branches or pull requests

2 participants