-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🐠 Add babel-preset-accurapp! 🎊 fixes #22
- Loading branch information
1 parent
cf37f21
commit 07bee66
Showing
2 changed files
with
45 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
module.exports = function (context, opts = {}) { | ||
const env = process.env.BABEL_ENV || process.env.NODE_ENV | ||
const isDevelopment = env === 'development' | ||
|
||
return { | ||
presets: [ | ||
// Browsers are taken from the browserslist field in package.json | ||
[require('@babel/preset-env').default, { | ||
modules: false, | ||
useBuiltIns: 'usage', | ||
}], | ||
[require('@babel/preset-react').default, { | ||
// Adds component stack to warning messages | ||
// Adds __self attribute to JSX which React will use for some warnings | ||
development: isDevelopment, | ||
}], | ||
require('@babel/preset-stage-0').default, | ||
], | ||
plugins: [ | ||
require('babel-plugin-lodash'), | ||
require('babel-plugin-macros'), | ||
], | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"name": "babel-preset-accurapp", | ||
"version": "3.0.0", | ||
"description": "Babel preset used by Accurat", | ||
"repository": "accurat/accurapp", | ||
"license": "MIT", | ||
"engines": { | ||
"node": ">=7" | ||
}, | ||
"files": [ | ||
"index.js" | ||
], | ||
"dependencies": { | ||
"@babel/core": "^7.0.0-beta.39", | ||
"@babel/preset-env": "^7.0.0-beta.39", | ||
"@babel/preset-react": "^7.0.0-beta.39", | ||
"@babel/preset-stage-0": "^7.0.0-beta.39", | ||
"babel-plugin-lodash": "^3.3.2", | ||
"babel-plugin-macros": "^2.1.0" | ||
} | ||
} |