Fix babel transpiling.
parent
c45be9a476
commit
594c0f54a9
31
.babelrc
31
.babelrc
|
@ -1,25 +1,22 @@
|
|||
{
|
||||
"presets": [
|
||||
["babel-preset-env", {
|
||||
"loose": false,
|
||||
"modules": false
|
||||
}],
|
||||
"babel-preset-react"
|
||||
"targets": {
|
||||
"browsers": [
|
||||
"> 1%",
|
||||
"last 4 versions",
|
||||
"Firefox ESR",
|
||||
"ios >= 8"
|
||||
],
|
||||
"uglify": false
|
||||
},
|
||||
"spec": true,
|
||||
"debug": true
|
||||
}]
|
||||
],
|
||||
"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,
|
||||
"moduleName": "nwb"
|
||||
}
|
||||
],
|
||||
"babel-plugin-transform-react-constant-elements",
|
||||
"babel-plugin-transform-class-properties",
|
||||
"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,
|
||||
};
|
||||
|
||||
|
||||
Footer.defaultProps = {
|
||||
children: null,
|
||||
className: null,
|
||||
|
|
|
@ -142,6 +142,9 @@ export default (options) => {
|
|||
importLoaders: 1,
|
||||
sourceMap: 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',
|
||||
exclude: /node_modules/,
|
||||
options: {
|
||||
// Look for babel configuration in project directory
|
||||
// Look for babel configuration in project directory
|
||||
babelrc: true,
|
||||
// Cache transformations to the filesystem (in default temp dir)
|
||||
cacheDirectory: true,
|
||||
// Skip module transpiling as Webpack 2+ support it ootb
|
||||
forceEnv: 'browser',
|
||||
},
|
||||
},
|
||||
...[
|
||||
|
|
Loading…
Reference in New Issue