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,9 +1,10 @@
{
"presets": [
["env", {
[
"@babel/env",
{
"modules": false,
"targets": {
// See config/browser.rb
"browsers": [
"> 1%",
"Chrome >= 50",
@ -16,13 +17,38 @@
],
"uglify": true
},
"useBuiltIns": true
}]
"forceAllTransforms": true,
"useBuiltIns": "entry"
}
]
],
"plugins": [
"syntax-dynamic-import",
"transform-object-rest-spread",
["transform-class-properties", { "spec": true }]
"@babel/plugin-transform-destructuring",
"@babel/plugin-syntax-dynamic-import",
[
"@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.
// Due to .babelrc's 'useBuiltIns', only polyfills actually
// 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
// to avoid loading javascript files from other domains on the frontpage.

View file

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

View file

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

5301
yarn.lock

File diff suppressed because it is too large Load diff