mirror of
https://github.com/mattermost/mattermost.git
synced 2026-02-14 08:15:22 -05:00
49 lines
1.1 KiB
JavaScript
49 lines
1.1 KiB
JavaScript
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
// See LICENSE.txt for license information.
|
|
|
|
const config = {
|
|
presets: [
|
|
['@babel/preset-env', {
|
|
targets: {
|
|
chrome: 66,
|
|
firefox: 60,
|
|
edge: 42,
|
|
safari: 12,
|
|
},
|
|
corejs: 3,
|
|
useBuiltIns: 'usage',
|
|
shippedProposals: true,
|
|
}],
|
|
['@babel/preset-react', {
|
|
useBuiltIns: true,
|
|
}],
|
|
['@babel/typescript', {
|
|
allExtensions: true,
|
|
isTSX: true,
|
|
}],
|
|
],
|
|
plugins: [
|
|
'babel-plugin-typescript-to-proptypes',
|
|
[
|
|
'babel-plugin-styled-components',
|
|
{
|
|
ssr: false,
|
|
fileName: false,
|
|
},
|
|
],
|
|
],
|
|
sourceType: 'unambiguous',
|
|
};
|
|
|
|
config.env = {
|
|
test: {
|
|
presets: config.presets,
|
|
plugins: config.plugins,
|
|
},
|
|
production: {
|
|
presets: config.presets,
|
|
plugins: config.plugins.filter((plugin) => plugin !== 'babel-plugin-typescript-to-proptypes'),
|
|
},
|
|
};
|
|
|
|
module.exports = config;
|