1 Star 0 Fork 0

xhua / wp-calypso

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
babel.config.js 855 Bytes
一键复制 编辑 原始数据 按行查看 历史
const isBrowser = process.env.BROWSERSLIST_ENV !== 'server';
// We implicitly use browserslist configuration in package.json for build targets.
const babelConfig = {
presets: [ '@automattic/calypso-build/babel/default' ],
plugins: [ [ '@automattic/transform-wpcalypso-async', { async: isBrowser } ] ],
env: {
production: {
plugins: [ 'babel-plugin-transform-react-remove-prop-types' ],
},
build_pot: {
plugins: [
[
'@automattic/babel-plugin-i18n-calypso',
{
dir: 'build/i18n-calypso/',
headers: {
'content-type': 'text/plain; charset=UTF-8',
'x-generator': 'calypso',
},
},
],
],
},
test: {
presets: [ [ '@babel/env', { targets: { node: 'current' } } ] ],
plugins: [ 'add-module-exports', 'babel-plugin-dynamic-import-node' ],
},
},
};
module.exports = babelConfig;
1
https://gitee.com/xhua/wp-calypso.git
git@gitee.com:xhua/wp-calypso.git
xhua
wp-calypso
wp-calypso
master

搜索帮助