Skip to content

Instantly share code, notes, and snippets.

@serhii-havrylenko
Created October 28, 2018 13:22
Show Gist options
  • Save serhii-havrylenko/170c09c06aa76fa67a0cafbe6dd02ed8 to your computer and use it in GitHub Desktop.
Save serhii-havrylenko/170c09c06aa76fa67a0cafbe6dd02ed8 to your computer and use it in GitHub Desktop.
module.exports = (api) => {
api.cache(true);
return {
presets: [
[
'@babel/env',
{
targets: {
browsers: 'Last 2 Chrome versions, Firefox ESR',
node: '8.9',
},
},
],
[
'@babel/preset-react',
{
development: process.env.BABEL_ENV !== 'build',
},
],
'@babel/preset-typescript',
],
env: {
build: {
ignore: [
'**/*.test.tsx',
'**/*.test.ts',
'**/*.story.tsx',
'__snapshots__',
'__tests__',
'__stories__',
],
},
},
ignore: ['node_modules'],
};
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment