Skip to content

Commit e788711

Browse files
committed
Use Sagui’s own Babel preset
This is a step towards given control to the user how babel is configured in his own project using standard Babel configurations.
1 parent 0ac8159 commit e788711

File tree

3 files changed

+4
-8
lines changed

3 files changed

+4
-8
lines changed

.babelrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"presets": ["es2015", "stage-0"]
2+
"presets": ["sagui"]
33
}

package.json

+1-3
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,7 @@
4040
"babel-plugin-react-transform": "^2.0.2",
4141
"babel-plugin-transform-es2015-modules-commonjs": "^6.7.0",
4242
"babel-plugin-transform-runtime": "^6.4.3",
43-
"babel-preset-es2015": "^6.5.0",
44-
"babel-preset-react": "^6.5.0",
45-
"babel-preset-stage-0": "^6.5.0",
43+
"babel-preset-sagui": "^6.5.0",
4644
"babel-register": "^6.7.2",
4745
"chai": "^3.3.0",
4846
"chalk": "^1.1.1",

src/configure/webpack/plugins/babel.js

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
import reactTransform from 'babel-plugin-react-transform'
2-
import es2015 from 'babel-preset-es2015'
3-
import stage0 from 'babel-preset-stage-0'
4-
import react from 'babel-preset-react'
2+
import sagui from 'babel-preset-sagui'
53

64
export default {
75
name: 'webpack-babel',
@@ -22,7 +20,7 @@ export default {
2220

2321
return {
2422
babel: {
25-
presets: [es2015, stage0, react],
23+
presets: [sagui],
2624
env: buildTarget === 'develop' ? hmrEnv : {}
2725
},
2826

0 commit comments

Comments
 (0)