1 Star 0 Fork 0

draymondgewade/sentry

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
babel.config.js 1.71 KB
一键复制 编辑 原始数据 按行查看 历史
/*eslint-env node*/
module.exports = {
presets: [
'@babel/react',
'@babel/env',
'@babel/preset-typescript',
[
'@emotion/babel-preset-css-prop',
{
autoLabel: true,
sourceMap: false,
labelFormat: '[local]',
},
],
],
plugins: [
'@babel/plugin-syntax-dynamic-import',
'@babel/plugin-proposal-object-rest-spread',
'@babel/plugin-transform-runtime',
// NOTE: The order of the decorator and class-property plugins is important
// here. Decorators must be processed first before class properties, see:
// https://babeljs.io/docs/en/plugins#plugin-ordering
['@babel/plugin-proposal-decorators', {legacy: true}],
['@babel/plugin-proposal-class-properties', {loose: true}],
],
env: {
production: {
plugins: [
[
'transform-react-remove-prop-types',
{
mode: 'remove', // remove from bundle
removeImport: true, // removes `prop-types` import statements
classNameMatchers: [
'SelectField',
'FormField',
'AsyncComponent',
'AsyncView',
],
additionalLibraries: [/app\/sentryTypes$/],
},
],
['babel-plugin-add-react-displayname'],
],
},
development: {
presets: [
[
'@emotion/babel-preset-css-prop',
{
autoLabel: true,
sourceMap: false,
},
],
],
plugins: [
'@babel/plugin-transform-react-jsx-source',
!!process.env.SENTRY_UI_HOT_RELOAD ? 'react-refresh/babel' : null,
].filter(Boolean),
},
test: {
plugins: ['dynamic-import-node'],
},
},
};
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/draymondgewade/sentry.git
[email protected]:draymondgewade/sentry.git
draymondgewade
sentry
sentry
master

搜索帮助