babel.config.erb 513 B

1234567891011121314151617181920
  1. const { getConfig } = require('@airbnb/config-babel');
  2. const config = getConfig({
  3. library: true,
  4. react: true,
  5. next: true,
  6. esm: process.env.BABEL_OUTPUT === 'esm',
  7. node: process.env.NODE_ENV === 'test',
  8. typescript: true,
  9. env: {
  10. targets: { esmodules: true },
  11. },
  12. });
  13. config.plugins = [
  14. ['babel-plugin-transform-dev', { evaluate: false }],
  15. ['babel-plugin-typescript-to-proptypes', { loose: true }],
  16. ['@babel/plugin-proposal-class-properties', { loose: true }],
  17. ];
  18. module.exports = config;