From 0fa8667d9ba4240edef074fd0708d8c32d92b946 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Manuel=20Aguirre?= Date: Fri, 27 Jul 2018 14:24:00 -0400 Subject: [PATCH 1/5] Added @babel/preset-stage-0 Missing configuration causes this example to break. --- examples/with-sw-precache/package.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/with-sw-precache/package.json b/examples/with-sw-precache/package.json index 0656ec64ea683..293198da22caf 100644 --- a/examples/with-sw-precache/package.json +++ b/examples/with-sw-precache/package.json @@ -10,5 +10,8 @@ "react": "^16.0.0", "react-dom": "^16.0.0", "sw-precache-webpack-plugin": "^0.11.3" + }, + "devDependencies": { + "@babel/preset-stage-0": "^7.0.0-beta.42" } } From b8d6a3305dd94be92849405d809b079f28043d53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Manuel=20Aguirre?= Date: Fri, 27 Jul 2018 14:24:31 -0400 Subject: [PATCH 2/5] Create .babelrc --- examples/with-sw-precache/.babelrc | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 examples/with-sw-precache/.babelrc diff --git a/examples/with-sw-precache/.babelrc b/examples/with-sw-precache/.babelrc new file mode 100644 index 0000000000000..9b0ef9f096506 --- /dev/null +++ b/examples/with-sw-precache/.babelrc @@ -0,0 +1,7 @@ +{ + + "presets": [ + [ "next/babel", { "preset-env": { "modules": "commonjs" }} ] + ] + +} From 8e9aef29971b8603bca18e41bfb00965dd576d3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Manuel=20Aguirre?= Date: Fri, 27 Jul 2018 15:29:27 -0400 Subject: [PATCH 3/5] Update .babelrc --- examples/with-sw-precache/.babelrc | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/examples/with-sw-precache/.babelrc b/examples/with-sw-precache/.babelrc index 9b0ef9f096506..bafe67cf7c6e0 100644 --- a/examples/with-sw-precache/.babelrc +++ b/examples/with-sw-precache/.babelrc @@ -1,7 +1,19 @@ { - - "presets": [ - [ "next/babel", { "preset-env": { "modules": "commonjs" }} ] - ] - + "env": { + "development": { + "presets": [ + [ "next/babel" ] + ] + }, + "production": { + "presets": [ + [ "next/babel" ] + ] + }, + "test": { + "presets": [ + [ "next/babel", { "preset-env": { "modules": "commonjs" }} ] + ] + } + } } From b1bf94f5e4ef462613c2a2c49b8e6d20f40af66b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Manuel=20Aguirre?= Date: Fri, 27 Jul 2018 16:28:58 -0400 Subject: [PATCH 4/5] Update .babelrc --- examples/with-sw-precache/.babelrc | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) diff --git a/examples/with-sw-precache/.babelrc b/examples/with-sw-precache/.babelrc index bafe67cf7c6e0..98012edd15bc1 100644 --- a/examples/with-sw-precache/.babelrc +++ b/examples/with-sw-precache/.babelrc @@ -1,19 +1,5 @@ { - "env": { - "development": { - "presets": [ - [ "next/babel" ] - ] - }, - "production": { - "presets": [ - [ "next/babel" ] - ] - }, - "test": { - "presets": [ - [ "next/babel", { "preset-env": { "modules": "commonjs" }} ] - ] - } - } + "presets": [ + [ "next/babel" ] + ] } From fbbd0248776776e1b8fedbaacc0b2e9920acadb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Manuel=20Aguirre?= Date: Fri, 27 Jul 2018 16:53:05 -0400 Subject: [PATCH 5/5] Update package.json --- examples/with-sw-precache/package.json | 3 --- 1 file changed, 3 deletions(-) diff --git a/examples/with-sw-precache/package.json b/examples/with-sw-precache/package.json index 293198da22caf..0656ec64ea683 100644 --- a/examples/with-sw-precache/package.json +++ b/examples/with-sw-precache/package.json @@ -10,8 +10,5 @@ "react": "^16.0.0", "react-dom": "^16.0.0", "sw-precache-webpack-plugin": "^0.11.3" - }, - "devDependencies": { - "@babel/preset-stage-0": "^7.0.0-beta.42" } }