Ideas for Arc XP

Add babel macros

I know that your policy of keeping configurations to babel or webpack as restricted as possible can help you ensure the developer can't mess with internals, allowing you to give guarantees that everything is going to work as expected, and making it easier for you to give support. That's the same policy found in react template projects like the popular create-react-app, which also only includes some preselected "safe" babel and webpack plugins, and restrict the developer from changing their configuration.


In create-react-app they have enable a babel feature which they consider safe, and which enables really awesome build time tools like shown [here](https://github.com/jgierer12/awesome-babel-macros), [babel macros](https://github.com/kentcdodds/babel-plugin-macros). I'm working on some interesting features to simplify our development, and would be really benefited to have macros enabled.

On the other hand we are choosing the css-in-js tool that we like the most, and Emotion is great option but requires a babel plugin to enable some of its features, I know it is not a good Idea to add a babel plugin related to a specific css-in-js lib, but emotion also has the alternative to use babel macros instead of the plugin. Do you think it is possible you could add this macros plugin?

  • Guest
  • Feb 10 2020
  • Future consideration
  • Attach files
  • Goran Gligorin commented
    August 11, 2021 14:29

    Hi. Is there any updates on potentially supporting babel macros? We'd like to use a macro called twin.macro (https://github.com/ben-rogerson/twin.macro) that would allow use to mix TailwindCSS and styled-components.

  • JP Blanchette commented
    April 23, 2021 13:36

    I'm not sure where this is documented on the ALC, or which PBF version it was added in, but it appears that PB Fusion now supports https://styled-components.com

  • JP Blanchette commented
    September 25, 2020 20:03

    A little bird told me WaPo was in Q3 now. How's that CSS-in-JS support progressing?

  • Tania Lee commented
    February 20, 2020 16:46

    Thank for this super thoughtful idea, we can definitely dive in to take a look. Appreciate it!

    In the future, we will be adding support for CSS and JS, sometime around Q3.