const { override, addLessLoader, adjustWorkbox, addBabelPlugin, addDecoratorsLegacy, addWebpackAlias } = require('customize-cra');
const path = require('path');
const overrideCssLoader = require('./overrideCssLoader');
module.exports = override(
  addBabelPlugin(['import', { libraryName: 'antd', style: 'css' }, 'antd']),
  addDecoratorsLegacy(),
  adjustWorkbox(wb =>
    Object.assign(wb, {
      skipWaiting: true
    })
  ),
  addWebpackAlias({
    react: path.resolve('./node_modules/react')
  }),
  addLessLoader({
    lessOptions: {
      javascriptEnabled: true
    }
  }),
  overrideCssLoader()
);
