babel-plugin-macros icon indicating copy to clipboard operation
babel-plugin-macros copied to clipboard

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

Open vjpr opened this issue 4 years ago • 1 comments

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',
        },
      },
    ],
  ],
}

vjpr avatar Jan 13 '21 00:01 vjpr

Sure, feel free to open a PR. Thanks.

kentcdodds avatar Jan 13 '21 01:01 kentcdodds