naive-ui/babel.config.js

34 lines
803 B
JavaScript
Raw Normal View History

2020-12-04 19:40:17 +08:00
// the file is used for jest testing & site building
// > 2%, make template string not compiled to concat, since it's not fast
2019-06-03 23:42:44 +08:00
module.exports = {
2021-02-17 14:55:44 +08:00
presets:
process.env.NODE_ENV === 'test'
? [
['@babel/preset-env', { targets: { node: 'current' } }],
[
'@babel/preset-typescript',
{
allExtensions: true,
isTSX: true,
jsxPragma: 'h',
jsxPragmaFrag: 'Fragment'
}
],
[
'@babel/preset-react',
{
pragma: 'h',
pragmaFrag: 'Fragment'
}
]
2021-02-17 14:55:44 +08:00
]
: [
[
'@babel/preset-env',
{
targets: '>2%, not IE 11'
}
]
2021-02-17 14:55:44 +08:00
]
2019-06-03 23:42:44 +08:00
}