Skip to content

Commit 9913461

Browse files
author
kaptron
committed
Update to webpacker 4 + babel 7
1 parent c4cd9ba commit 9913461

File tree

4 files changed

+3674
-1891
lines changed

4 files changed

+3674
-1891
lines changed

.babelrc

Lines changed: 7 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,14 @@
11
{
22
"presets": [
3-
[
4-
"env",
5-
{
6-
"test": {
7-
"modules": "commonjs"
8-
},
9-
"development": {
10-
"modules": false
11-
},
12-
"production": {
13-
"modules": false
14-
},
15-
"targets": {
16-
"uglify": true
17-
},
18-
"useBuiltIns": true
19-
}
20-
],
21-
"react"
3+
"@babel/preset-env",
4+
"@babel/preset-react"
225
],
236
"plugins": [
247
"lodash",
25-
"syntax-dynamic-import",
26-
"transform-decorators-legacy",
27-
"transform-object-rest-spread",
28-
"transform-class-properties",
8+
"@babel/plugin-syntax-dynamic-import",
9+
["@babel/plugin-proposal-decorators", { "legacy": true }],
10+
["@babel/plugin-proposal-class-properties", { "loose" : true }],
11+
"@babel/plugin-transform-modules-commonjs",
2912
[
3013
"module-resolver",
3114
{
@@ -39,18 +22,11 @@
3922
}
4023
],
4124
[
42-
"transform-runtime",
25+
"@babel/plugin-transform-runtime",
4326
{
4427
"helpers": false,
45-
"polyfill": false,
4628
"regenerator": true
4729
}
48-
],
49-
[
50-
"transform-class-properties",
51-
{
52-
"spec": true
53-
}
5430
]
5531
],
5632
"env": {
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1-
import 'babel-polyfill'
1+
import 'core-js/stable'
2+
import 'regenerator-runtime/runtime'
23
import 'whatwg-fetch'
4+
// eslint-disable-next-line
35
import '~/utils/otherPolyfills'

package.json

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -71,20 +71,15 @@
7171
"dependencies": {
7272
"@firebase/app-types": "^0.3.2",
7373
"@material-ui/core": "^1.5",
74-
"@rails/webpacker": "4.0.0-pre.2",
74+
"@rails/webpacker": "4.0.7",
7575
"@sentry/browser": "^5.4.0",
7676
"@sentry/webpack-plugin": "^1.6.2",
7777
"actioncable": "^5.2.0",
7878
"axios": "^0.18.0",
7979
"babel-plugin-lodash": "^3.3.2",
8080
"babel-plugin-module-resolver": "^3.1.1",
8181
"babel-plugin-styled-components": "^1.7.0",
82-
"babel-plugin-transform-class-properties": "^6.24.1",
8382
"babel-plugin-transform-decorators-legacy": "^1.3.4",
84-
"babel-plugin-transform-es2015-template-literals": "^6.22.0",
85-
"babel-plugin-transform-runtime": "^6.23.0",
86-
"babel-polyfill": "^6.26.0",
87-
"babel-preset-react": "^6.24.1",
8883
"browserslist": "^4.5.5",
8984
"caniuse-lite": "^1.0.30000830",
9085
"date-fns": "2.0.0-alpha.27",
@@ -160,13 +155,18 @@
160155
"whatwg-fetch": "^3.0.0"
161156
},
162157
"devDependencies": {
163-
"babel-core": "^6.26.0",
158+
"@babel/core": "^7.0.0",
159+
"@babel/plugin-proposal-class-properties": "^7.4.4",
160+
"@babel/plugin-proposal-decorators": "^7.4.0",
161+
"@babel/plugin-syntax-dynamic-import": "^7.2.0",
162+
"@babel/plugin-transform-modules-commonjs": "^7.4.3",
163+
"@babel/plugin-transform-runtime": "^7.4.4",
164+
"@babel/preset-env": "^7.0.0",
165+
"@babel/preset-react": "^7.0.0",
164166
"babel-engine-plugin": "^0.2.1",
165-
"babel-eslint": "~8.2.1",
166-
"babel-jest": "^22.1.0",
167-
"babel-loader": "^7.1.2",
168-
"babel-preset-env": "^1.6.1",
169-
"babel-runtime": "~6.26.0",
167+
"babel-eslint": "^10.0.0",
168+
"babel-jest": "^24.8.0",
169+
"babel-loader": "^8.0.0",
170170
"cypress": "^3.3.1",
171171
"cypress-cucumber-preprocessor": "ideo/cypress-cucumber-preprocessor#3e39b05",
172172
"dotenv": "^5.0.1",
@@ -186,6 +186,7 @@
186186
"eslint-plugin-promise": "~3.5.0",
187187
"eslint-plugin-react": "~7.11.0",
188188
"eslint-plugin-standard": "~3.0.1",
189+
"file-loader": "^4.0.0",
189190
"identity-obj-proxy": "^3.0.0",
190191
"jest": "^22.4.3",
191192
"jest-css-modules": "^1.1.0",
@@ -198,7 +199,8 @@
198199
"react-test-renderer": "^16.2.0",
199200
"wait-on": "^3.1.0",
200201
"webpack-bundle-analyzer": "^2.11.1",
201-
"webpack-dev-server": "^3.1.3"
202+
"webpack-cli": "^3.3.4",
203+
"webpack-dev-server": "^3.7.1"
202204
},
203205
"resolutions": {
204206
"react-draggable": "git+https://[email protected]/ideo/react-draggable.git#3.0.5-beta.1",

0 commit comments

Comments
 (0)