kentcdodds / babel-plugin-macros

🎣 Allows you to build simple compile-time libraries
https://npm.im/babel-plugin-macros
MIT License
2.63k stars 135 forks source link

Add to docs that plugin config can also come from babel plugin config #166

Open vjpr opened 3 years ago

vjpr commented 3 years ago
https://github.com/kentcdodds/babel-plugin-macros/blob/master/other/docs/user.md#config

The following is valid:

babel.config.js

module.exports = {
  presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
  plugins: [
    [
      'babel-plugin-macros',
      {
        twin: {
          preset: 'styled-components',
        },
      },
    ],
  ],
}
kentcdodds commented 3 years ago

Sure, feel free to open a PR. Thanks.