1 Star 0 Fork 0

Mraz / math.gl

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
babel.config.js 1.62 KB
一键复制 编辑 原始数据 按行查看 历史
Ib Green 提交于 2019-06-02 18:29 . Benchmarks (#69)
// COPIED FROM ocular-dev-tools
const TARGETS = {
chrome: '60',
edge: '16',
firefox: '53',
ios: '10.3',
safari: '10.1',
node: '8'
};
const COMMON_CONFIG = {
comments: false
};
const ENV_CONFIG = {
es5: {
presets: [
[
'@babel/env',
{
forceAllTransforms: true,
modules: 'commonjs'
}
]
],
plugins: ['@babel/transform-runtime', ['transform-builtin-extend', {globals: ['Array']}]]
},
esm: {
presets: [
[
'@babel/env',
{
modules: false
// Transpiling classes kills object creation performance
// exclude: ['@babel/plugin-transform-classes']
}
]
],
plugins: [
['@babel/transform-runtime', {useESModules: true}],
// Transpiling classes kills object creation performance
['transform-builtin-extend', {globals: ['Array']}]
]
},
es6: {
presets: [
[
'@babel/env',
{
targets: TARGETS,
modules: false
}
]
],
plugins: [['@babel/transform-runtime', {useESModules: true}]]
},
test: {
presets: ['@babel/preset-env'],
plugins: ['istanbul']
}
};
// Ensure we have an entry for the default BABEL_ENV
ENV_CONFIG.development = ENV_CONFIG.es6;
module.exports = api => {
api.cache.using(() => process.env.BABEL_ENV);
return Object.assign({}, COMMON_CONFIG, ENV_CONFIG[api.env()]);
};
// END COPY
const getBabelConfig = require('ocular-dev-tools/config/babel.config');
module.exports = api => {
return getBabelConfig(api, {
plugins: [['transform-builtin-extend', {globals: ['Array']}]]
});
};
1
https://gitee.com/leemraz/math.gl.git
git@gitee.com:leemraz/math.gl.git
leemraz
math.gl
math.gl
master

搜索帮助