Update webpacker (babel7)

This commit is contained in:
Paul Chavard 2018-11-08 15:43:06 +01:00
parent 3cd2f75f71
commit c492e1cd88
5 changed files with 2196 additions and 3189 deletions

View file

@ -1,28 +1,54 @@
{ {
"presets": [ "presets": [
["env", { [
"modules": false, "@babel/env",
"targets": { {
// See config/browser.rb "modules": false,
"browsers": [ "targets": {
"> 1%", "browsers": [
"Chrome >= 50", "> 1%",
"IE >= 11", "Chrome >= 50",
"Edge >= 14", "IE >= 11",
"Firefox >= 50", "Edge >= 14",
"Opera >= 40", "Firefox >= 50",
"Safari >= 8", "Opera >= 40",
"iOS >= 8" "Safari >= 8",
], "iOS >= 8"
"uglify": true ],
}, "uglify": true
"useBuiltIns": true },
}] "forceAllTransforms": true,
"useBuiltIns": "entry"
}
]
], ],
"plugins": [ "plugins": [
"syntax-dynamic-import", "@babel/plugin-transform-destructuring",
"transform-object-rest-spread", "@babel/plugin-syntax-dynamic-import",
["transform-class-properties", { "spec": true }] [
"@babel/plugin-proposal-object-rest-spread",
{
"useBuiltIns": true
}
],
[
"@babel/plugin-transform-runtime",
{
"helpers": false,
"regenerator": true
}
],
[
"@babel/plugin-transform-regenerator",
{
"async": false
}
],
[
"@babel/plugin-proposal-class-properties",
{
"loose": true
}
]
] ]
} }

View file

@ -1,7 +1,7 @@
// Include runtime-polyfills for older browsers. // Include runtime-polyfills for older browsers.
// Due to .babelrc's 'useBuiltIns', only polyfills actually // Due to .babelrc's 'useBuiltIns', only polyfills actually
// required by the browsers we support will be included. // required by the browsers we support will be included.
import 'babel-polyfill'; import '@babel/polyfill';
// This file is copied from mailjet. We serve here a copy of it ourselves // This file is copied from mailjet. We serve here a copy of it ourselves
// to avoid loading javascript files from other domains on the frontpage. // to avoid loading javascript files from other domains on the frontpage.

View file

@ -1,5 +1,5 @@
// Include runtime-polyfills for older browsers. // Include runtime-polyfills for older browsers.
// Due to .babelrc's 'useBuiltIns', only polyfills actually // Due to .babelrc's 'useBuiltIns', only polyfills actually
// required by the browsers we support will be included. // required by the browsers we support will be included.
import 'babel-polyfill'; import '@babel/polyfill';
import 'dom4'; import 'dom4';

View file

@ -1,6 +1,6 @@
{ {
"dependencies": { "dependencies": {
"@rails/webpacker": "4.0.0-pre.2", "@rails/webpacker": "4.0.0-pre.3",
"@sentry/browser": "^4.0.4", "@sentry/browser": "^4.0.4",
"@turf/area": "^6.0.1", "@turf/area": "^6.0.1",
"activestorage": "^5.2.1", "activestorage": "^5.2.1",
@ -19,10 +19,10 @@
}, },
"devDependencies": { "devDependencies": {
"eclint": "^2.8.0", "eclint": "^2.8.0",
"eslint": "^5.6.0", "eslint": "^5.9.0",
"eslint-config-prettier": "^3.1.0", "eslint-config-prettier": "^3.3.0",
"eslint-plugin-prettier": "^2.6.2", "eslint-plugin-prettier": "^3.0.0",
"prettier": "^1.14.3", "prettier": "^1.15.3",
"webpack-dev-server": "^3.1.9" "webpack-dev-server": "^3.1.9"
}, },
"scripts": { "scripts": {

5301
yarn.lock

File diff suppressed because it is too large Load diff