@lipemat/js-boilerplate
Version:
Dependencies and scripts for a no config JavaScript app
40 lines • 1.27 kB
JavaScript
import { getBrowsersList } from '@lipemat/js-boilerplate-shared/helpers/browserslist.js';
import coreJS from 'core-js/package.json' with { type: 'json' };
/**
* Use Babel's preset-env to add support for target browsers.
*
* @note Set the `debug` option to `true` to debug the included polyfills and plugins.
*
* @see https://babeljs.io/docs/en/babel-preset-env
*/
const presetEnv = {
bugfixes: true,
corejs: {
// Use the core-js version currently installed in the project.
version: coreJS.version,
proposals: false,
},
// Enable the `debug` option to debug the included polyfills and plugins.
debug: false,
// Ignore any external browserslist in favor of `getBrowsersList()`.
ignoreBrowserslistConfig: true,
shippedProposals: false,
targets: {
browsers: getBrowsersList(),
},
useBuiltIns: 'usage',
};
const babelConfig = {
cacheDirectory: true,
presets: [
['@babel/preset-env', presetEnv],
['@babel/preset-react', {
development: 'production' !== process.env.NODE_ENV,
runtime: 'automatic',
}],
'@babel/preset-typescript',
],
plugins: [],
};
export default babelConfig;
//# sourceMappingURL=babel.config.js.map