Files
talk/babel.config.js
T
KiwiandWyatt Johnson 90e67ca479 [next] improve tree shaking + update webpack & babel (#2132)
* feat: improve tree shaking + update webpack & babel

* fix: tests
2018-12-17 16:56:48 +00:00

29 lines
644 B
JavaScript

/**
* This is a project wide babel configuration.
* https://babeljs.io/docs/en/config-files#project-wide-configuration
*
* We use this file to apply babel configuration to packages in `node_modules`
* for testing with jest.
*/
const lodashOptimizations = ["use-lodash-es", "lodash"];
module.exports = {
env: {
production: {
plugins: [...lodashOptimizations],
},
development: {
plugins: [...lodashOptimizations],
},
test: {
presets: [
[
"@babel/env",
{ targets: "last 2 versions, ie 11", modules: "commonjs" },
],
"@babel/react",
],
},
},
};