Fix babel transpiling.
parent
c45be9a476
commit
594c0f54a9
31
.babelrc
31
.babelrc
|
@ -1,25 +1,22 @@
|
||||||
{
|
{
|
||||||
"presets": [
|
"presets": [
|
||||||
["babel-preset-env", {
|
["babel-preset-env", {
|
||||||
"loose": false,
|
"targets": {
|
||||||
"modules": false
|
"browsers": [
|
||||||
}],
|
"> 1%",
|
||||||
"babel-preset-react"
|
"last 4 versions",
|
||||||
|
"Firefox ESR",
|
||||||
|
"ios >= 8"
|
||||||
|
],
|
||||||
|
"uglify": false
|
||||||
|
},
|
||||||
|
"spec": true,
|
||||||
|
"debug": true
|
||||||
|
}]
|
||||||
],
|
],
|
||||||
"plugins": [
|
"plugins": [
|
||||||
"react-hot-loader/babel",
|
"babel-plugin-transform-react-constant-elements",
|
||||||
"babel-plugin-transform-react-constant-elements", [
|
"babel-plugin-transform-class-properties",
|
||||||
"babel-plugin-transform-react-remove-prop-types", {}
|
|
||||||
],
|
|
||||||
"babel-plugin-transform-decorators-legacy",
|
|
||||||
"babel-plugin-transform-class-properties", [
|
|
||||||
"babel-plugin-transform-runtime", {
|
|
||||||
"helpers": false,
|
|
||||||
"polyfill": false,
|
|
||||||
"regenerator": true,
|
|
||||||
"moduleName": "nwb"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"babel-plugin-syntax-dynamic-import"
|
"babel-plugin-syntax-dynamic-import"
|
||||||
]
|
]
|
||||||
}
|
}
|
|
@ -0,0 +1,32 @@
|
||||||
|
{
|
||||||
|
"presets": [
|
||||||
|
["babel-preset-env", {
|
||||||
|
"targets": {
|
||||||
|
"browsers": [
|
||||||
|
"> 1%",
|
||||||
|
"last 4 versions",
|
||||||
|
"Firefox ESR",
|
||||||
|
"ios >= 8"
|
||||||
|
],
|
||||||
|
"uglify": false
|
||||||
|
},
|
||||||
|
/*"spec": true,*/
|
||||||
|
"debug": true,
|
||||||
|
"modules": false
|
||||||
|
}],
|
||||||
|
"babel-preset-react"
|
||||||
|
],
|
||||||
|
"plugins": [
|
||||||
|
"react-hot-loader/babel",
|
||||||
|
"babel-plugin-transform-react-constant-elements",
|
||||||
|
/*"babel-plugin-transform-react-remove-prop-types",*/
|
||||||
|
/*"babel-plugin-transform-decorators-legacy",*/
|
||||||
|
"babel-plugin-transform-class-properties",
|
||||||
|
["babel-plugin-transform-runtime", {
|
||||||
|
"helpers": false,
|
||||||
|
"polyfill": false,
|
||||||
|
"regenerator": true
|
||||||
|
}],
|
||||||
|
"babel-plugin-syntax-dynamic-import"
|
||||||
|
]
|
||||||
|
}
|
|
@ -16,7 +16,6 @@ Footer.propTypes = {
|
||||||
className: PropTypes.string,
|
className: PropTypes.string,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
Footer.defaultProps = {
|
Footer.defaultProps = {
|
||||||
children: null,
|
children: null,
|
||||||
className: null,
|
className: null,
|
||||||
|
|
|
@ -142,6 +142,9 @@ export default (options) => {
|
||||||
importLoaders: 1,
|
importLoaders: 1,
|
||||||
sourceMap: true,
|
sourceMap: true,
|
||||||
modules: true,
|
modules: true,
|
||||||
|
localIdentName: production
|
||||||
|
? '[name]__[local]--[hash:base64:5]'
|
||||||
|
: '[name]__[local]--[hash:base64:5]',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -210,10 +213,12 @@ export default (options) => {
|
||||||
loader: 'babel-loader',
|
loader: 'babel-loader',
|
||||||
exclude: /node_modules/,
|
exclude: /node_modules/,
|
||||||
options: {
|
options: {
|
||||||
// Look for babel configuration in project directory
|
// Look for babel configuration in project directory
|
||||||
babelrc: true,
|
babelrc: true,
|
||||||
// Cache transformations to the filesystem (in default temp dir)
|
// Cache transformations to the filesystem (in default temp dir)
|
||||||
cacheDirectory: true,
|
cacheDirectory: true,
|
||||||
|
// Skip module transpiling as Webpack 2+ support it ootb
|
||||||
|
forceEnv: 'browser',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
...[
|
...[
|
||||||
|
|
Loading…
Reference in New Issue