emoji-mart-lazyload/babel.config.js

66 lines
1.1 KiB
JavaScript
Raw Normal View History

2019-12-29 20:33:26 +00:00
const { devDependencies } = require('./package.json')
module.exports = {
presets: ['@babel/preset-react'],
plugins: [
'@babel/plugin-transform-runtime',
[
'babel-plugin-transform-define',
{
'process.env.NODE_ENV': 'production',
EMOJI_DATASOURCE_VERSION: devDependencies['emoji-datasource'],
},
],
],
env: {
'legacy-es': {
presets: [
[
'@babel/preset-env',
{
modules: false,
},
],
],
},
'legacy-cjs': {
presets: [
[
'@babel/preset-env',
{
modules: 'cjs',
},
],
],
},
modern: {
presets: [
[
'@babel/preset-env',
{
targets: {
chrome: '77',
edge: '18',
firefox: '71',
safari: '13',
},
modules: false,
},
],
],
},
test: {
presets: [
[
'@babel/preset-env',
{
targets: {
node: 'current',
}
},
],
],
},
},
}