module.exports = {
  presets: ['@vue/cli-plugin-babel/preset'],
  plugins: [
    [
      'import',
      {
        libraryName: '@qg/cherry-ui',
        libraryDirectory: 'src',
        style: name => {
          // eslint-disable-next-line no-useless-escape
          const lessName = name.match(/[^\/]+$/)[0];
          return `${name}/${lessName}.less`;
        }
      }
    ],
    '@babel/plugin-proposal-nullish-coalescing-operator',
    '@babel/plugin-proposal-optional-chaining'
  ]
};
