mirror of
https://github.com/mattermost/mattermost.git
synced 2026-02-03 20:40:00 -05:00
57 lines
1.3 KiB
JavaScript
57 lines
1.3 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,
|
|
},
|
|
modules: false,
|
|
corejs: {
|
|
version: '3.26',
|
|
proposals: true,
|
|
},
|
|
debug: false,
|
|
shippedProposals: true,
|
|
useBuiltIns: 'usage',
|
|
}],
|
|
['@babel/preset-react', {
|
|
useBuiltIns: true,
|
|
}],
|
|
['@babel/typescript', {
|
|
allExtensions: true,
|
|
isTSX: true,
|
|
}],
|
|
],
|
|
plugins: [
|
|
'@babel/plugin-transform-runtime',
|
|
[
|
|
'babel-plugin-styled-components',
|
|
{
|
|
ssr: false,
|
|
fileName: false,
|
|
},
|
|
],
|
|
[
|
|
'formatjs',
|
|
{
|
|
idInterpolationPattern: '[sha512:contenthash:base64:6]',
|
|
ast: true,
|
|
},
|
|
],
|
|
],
|
|
};
|
|
|
|
config.env = {
|
|
test: {
|
|
presets: config.presets,
|
|
plugins: config.plugins,
|
|
},
|
|
};
|
|
config.env.test.presets[0][1].modules = 'auto';
|
|
|
|
module.exports = config;
|