// console.log(require.resolve('@babel/preset-env'));
// console.log(require.resolve('@vue/babel-plugin-jsx'));
// // @vue/cli-plugin-babel/preset
// console.log(process.env);
module.exports = {
presets: [
[
'@babel/preset-env',
{
loose: false,
debug: false,
useBuiltIns: 'usage',
corejs: require('core-js/package.json').version,
modules: false,
bugfixes: true,
},
],
// ['@babel/preset-typescript', {}],
],
plugins: [
['@babel/plugin-transform-typescript', { isTSX: true }],
['@vue/babel-plugin-jsx', {}],
// [
// 'import',
// {
// libraryName: 'ant-design-vue',
// libraryDirectory: 'es',
// style: true,
// },
// 'ant-design-vue',
// ],
/* @antd-vue/pro-layout 按需引入 */
// [
// 'import',
// {
// libraryName: '@antd-vue/pro-layout',
// libraryDirectory: 'es',
// style: true,
// camel2DashComponentName: false,
// },
// '@antd-vue/pro-layout',
// ],
[
'@babel/plugin-transform-runtime',
{
helpers: false,
},
],
],
};