Compare commits

..

2 Commits

Author SHA1 Message Date
Icedream 392cda25ea
Upgrade packages. 2017-08-25 23:36:14 +02:00
Icedream 594c0f54a9
Fix babel transpiling. 2017-08-25 23:35:33 +02:00
6 changed files with 472 additions and 321 deletions

View File

@ -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"
]
}

711
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -59,8 +59,8 @@
"eslint-plugin-babel": "^4.1.2",
"eslint-plugin-import": "^2.7.0",
"eslint-plugin-json": "^1.2.0",
"eslint-plugin-jsx-a11y": "^5.1.1",
"eslint-plugin-react": "^7.2.1",
"eslint-plugin-jsx-a11y": "^6.0.2",
"eslint-plugin-react": "^7.3.0",
"extract-text-webpack-plugin": "^3.0.0",
"file-loader": "^0.11.2",
"html-webpack-plugin": "^2.30.1",
@ -69,7 +69,7 @@
"nwb": "^0.18.10",
"nwb-sass": "^0.8.1",
"postcss-loader": "^2.0.6",
"preact": "^8.2.1",
"preact": "^8.2.4",
"preact-compat": "^3.17.0",
"progress-bar-webpack-plugin": "^1.10.0",
"prop-types": "^15.5.10",
@ -78,7 +78,7 @@
"react-fontawesome": "^1.6.1",
"react-helmet": "^5.1.3",
"react-hot-loader": "^3.0.0-beta.7",
"react-router": "^4.1.2",
"react-router": "^4.2.0",
"resolve-url-loader": "^2.1.0",
"sass-loader": "^6.0.6",
"slash": "^1.0.0",
@ -94,6 +94,7 @@
"body-parser": "^1.17.2",
"express": "^4.15.4",
"moment-timezone": "^0.5.13",
"mysql": "^2.14.1"
"mysql": "^2.14.1",
"nodemon": "^1.11.0"
}
}

32
src/.babelrc Normal file
View File

@ -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"
]
}

View File

@ -16,7 +16,6 @@ Footer.propTypes = {
className: PropTypes.string,
};
Footer.defaultProps = {
children: null,
className: null,

View File

@ -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',
},
},
...[