DEV Community

Discussion on: Optional chaining: What is it, and how can you add it to your JavaScript application right now?

Collapse
yuritoledo profile image
Yuri Toledo

Anyway how to add it to rewired app?

Collapse
nimmo profile image
Nimmo Author

I'm sorry, I'm not sure I understand your question. What do you mean?

Collapse
sabarasaba profile image
Ignacio Rivas

This works for me:

const {
  override,
  addBabelPlugins,
} = require('customize-cra');

...

module.exports = override(
  ...
  addBabelPlugins('@babel/plugin-proposal-optional-chaining'),
  ...
);