Activities

ShinyaOkazawa

ShinyaOkazawa posted a new question

pwa-module •

How to use workbox.expiration.Plugin in nuxt.config.js?

version

@nuxtjs/pwa: 3.0.0-beta.16

problem

I expect that the number of cache entries is 1 because I set the following,

    runtimeCaching: [
      {
        urlPattern: '/_nuxt/',
        handler: 'cacheFirst',
        strategyOptions: {
          cacheName: 'bundle-files',
          cacheExpiration: {
            maxAgeSeconds: 1,
            maxEntries: 1
          }
        }
      }

But I can see some cache entries exist.

After built sw.js is here,

workbox.routing.registerRoute(new RegExp('/_nuxt/'), new workbox.strategies.CacheFirst ({"cacheName":"bundle-files","cacheExpiration":{"maxAgeSeconds":1,"maxEntries":1}}), 'GET')

But I can see CacheFirst constructer doesn't have cacheExpiration option.

https://developers.google.com/web/tools/workbox/reference-docs/latest/workbox.strategies.CacheFirst.

So, I rewrite built code, sw.js as the following,

workbox.routing.registerRoute(
  new RegExp('/_nuxt/'),
  new workbox.strategies.CacheFirst({
    cacheName: 'bundle-files',
    plugins: [
      new workbox.expiration.Plugin({
        maxEntries: 1,
        maxAgeSeconds: 1
      })
    ]
  }),
  'GET'
)

It works.

Then, if I can write the following code in nuxt.config.js, It will work.

  workbox: {
    runtimeCaching: [
      {
        urlPattern: '/_nuxt/',
        handler: 'cacheFirst',
        strategyOptions: {
          cacheName: 'bundle-files',
          plugins: [
            new workbox.expiration.Plugin({
              maxEntries: 1,
              maxAgeSeconds: 1
            })
          ]
        }
      }
    ]
  }

Does anyone know about it?

dantrevino

dantrevino posted a new feature request

pwa-module •

idea Need to be able to customize splashscreen app name

What problem does this feature solve?

Currently, if I read the code correctly, the name on the splashscreen is pulling from the manifest, which is generated auto generated, and apparently pulls from package.json. The rules for this are lower case names, but that's not appropriate for an application name, necessarily. Even when I put a capitalized name in the manifest entry in nuxt.config.js, the splashscreen only displays a lower case name. Reading nuxt config for a manifest name will allow app name customization.

What does the proposed changes look like?

manifest: {
name: "My App Name"
},

Splash screen displays "My App Name", not 'myappname'

flamner

flamner posted a new question

pwa-module •

not working at all

I want to add a PWA support to my existing project, I install @nuxtjs/pwa and add module to nuxt.config.js I run dev project on localhost, in devtools I can see sw.js in service workers, but then when I go to offline mode I get only "no internet connection" error in the browser. Am I doing something wrong?

manniL

manniL posted a new feature request

pwa-module •

idea Don't base theme color on loading bar color

What problem does this feature solve?

If not theme_color in the manifest is set, the loading bar color is used (if set). As the loading bar color is mostly not fitting the theme color, this might lead to weird results (like a green nav bar on android when the loading bar is green).

I'd suggest to not base the theme color on the color of the loading bar.

samboylett

samboylett posted a new feature request

pwa-module •

idea Enable rangeRequests documentation needs tweaking

What problem does this feature solve?

There is a tiny issue with the documentation at https://pwa.nuxtjs.org/modules/workbox.html#enable-rangerequests

The Regex begins with .* so the route will match request to third party services as well as local files. By default the nuxt PWA does not cache third party / CORS requests, so this example is a bit misleading as it will bring video files into the service worker which were not cached before.

See https://developers.google.com/web/tools/workbox/modules/workbox-routing for more info on workbox routing but essentially matching the url from the beginning lets you match CORS requests, otherwise it will only match local requests.

What does the proposed changes look like?

change the example to:

workbox.routing.registerRoute(
  /\.(mp4|webm)/,
  workbox.strategies.cacheFirst({
    plugins: [
      new workbox.rangeRequests.Plugin(),
    ],
  }),
  'GET'
);

(i.e. remove the .*)

mlem

mlem posted a new bug report

pwa-module •

bug PWA + SPA not workting together in `npm run dev`

Version

v3.0.0-beta.16

Reproduction link

http://i-dont-have-an-url-yet.com

Steps to reproduce

Generate a new nuxtJS app: npx create-nuxt-app
Add PWA support: npm i @nuxtjs/pwa and ['@nuxtjs/pwa'], to the config file as outline in https://pwa.nuxtjs.org/setup.html
The config nuxt.config.js looks like this in the end:

module.exports = {
  mode: 'spa',
  modules: [
    '@nuxtjs/pwa',
  ],
  build: {
    /*
    ** Run ESLint on save
    */
    extend (config, { isDev, isClient }) {
      if (isDev && isClient) {
        config.module.rules.push({
          enforce: 'pre',
          test: /\.(js|vue)$/,
          loader: 'eslint-loader',
          exclude: /(node_modules)/
        })
      }
    }
  },
  icon: {
    // Icon options
  },
  manifest: {
    lang: 'de',
    name: "adsf",
    short_name: "adsf",
  },
  workbox: {
    // Workbox options
  }

Add a /static/icon.png with some logo
Start app: npm run dev
Visit web hosting endpoint and open Chrome developer tools
Navigate to the "Application" tab to see favicons missing

What is expected ?

I would expect to see my logo as favicon. I would also expect running an audit on the "Audits" tab to return a identification of the app as a PWA.

What is actually happening?

Chrome doesn't display the favicons, because they are not loaded with the site.

Additional comments?

When I generate the sources and run it locally, it works correctly.

npm run generate 
cd dist && python -m http.server 8080

It seems, it's just an npm run dev issue.

HugoHeneault

HugoHeneault posted a new bug report

pwa-module •

bug Nuxt build stuck at 95% with @nuxtjs/pwa on

Version

v3.0.0-beta.16

Reproduction link

[http://See additional comments](http://See additional comments)

Steps to reproduce

  • add @nuxtjs/pwa
  • run yarn dev or nuxt
  • build script hangs at 95%

What is expected ?

Build script should finish

What is actually happening?

Build script is stuck at

 │                                             │
   │   Nuxt.js v2.8.1                            │
   │   Running in development mode (universal)   │
   │                                             │
   │   Listening on: http://localhost:3000/      │
   │                                             │
   ╰─────────────────────────────────────────────╯

ℹ Preparing project for development                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    09:19:13
ℹ Initial build may take a while                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       09:19:13
✔ Builder initialized                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  09:19:13
› App root: /Users/hugo/dev/some-app                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         09:19:13
› Generating nuxt files                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                09:19:13
› Generating routes...                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 09:19:13
✔ Nuxt files generated                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 09:19:13
› Creating webpack middleware...                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       09:19:17

● Client █████████████████████████ emitting (95%) nuxt-pwa-icon 


✔ Server
  Compiled successfully in 17.68s

If I try nuxt build, I got a little more verbose error message:

 nuxt build
ℹ Production build                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     09:23:03
  plugin:nuxt-rfg-icon Retrieving favicons from realfavicongenerator api +0ms
  plugin:nuxt-rfg-icon Finished adding favicons as assets +11s
✔ Builder initialized                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  09:23:14
✔ Nuxt files generated                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 09:23:14

● Client █████████████████████████ emitting (95%) nuxt-pwa-icon 


◯ Server



 ERROR  (node:65879) DeprecationWarning: Tapable.plugin is deprecated. Use new API on .hooks instead                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   09:23:18


 FATAL  ENOENT: no such file or directory, open '/Users/hugo/dev/some-app/node_modules/@nuxtjs/icon/.cache/a71aaa/64.png'                                                                                                                                                                                                                                                                                                                                                                                                                                                                    09:23:48




   ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
   │                                                                                                                                        │
   │   ✖ Nuxt Fatal Error                                                                                                                   │
   │                                                                                                                                        │
   │   Error: ENOENT: no such file or directory, open '/Users/hugo/dev/some-app/node_modules/@nuxtjs/icon/.cache/a71aaa/64.png'   │
   │                                                                                                                                        │
   ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯

Additional comments?

I'm really sorry I can't provide a repro link, but this bug is only happening on my macbook (on linux/server env everything runs nice). I updated XCode additional components to latest version then nuxt stopped building. Could it be related?

HugoHeneault

HugoHeneault posted a new bug report

pwa-module •

bug Nuxt build stuck at 95% with @nuxtjs/pwa on

Version

v3.0.0-beta.16

Reproduction link

http://see-additional-comments.dev

Steps to reproduce

  • On macbook: install @nuxtjs/pwa with yarn
  • add @nuxtjs/pwa in nuxt.config.js modules
  • run yarn dev or nuxt
  • build script hangs at 95%

What is expected ?

Build script should finish

What is actually happening?

Build script is stuck at

 │                                             │
   │   Nuxt.js v2.8.1                            │
   │   Running in development mode (universal)   │
   │                                             │
   │   Listening on: http://localhost:3000/      │
   │                                             │
   ╰─────────────────────────────────────────────╯

ℹ Preparing project for development                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    09:19:13
ℹ Initial build may take a while                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       09:19:13
✔ Builder initialized                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  09:19:13
› App root: /Users/hugo/dev/some-app                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         09:19:13
› Generating nuxt files                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                09:19:13
› Generating routes...                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 09:19:13
✔ Nuxt files generated                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 09:19:13
› Creating webpack middleware...                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       09:19:17

● Client █████████████████████████ emitting (95%) nuxt-pwa-icon 


✔ Server
  Compiled successfully in 17.68s

If I try nuxt build, I got a little more verbose error message:

 nuxt build
ℹ Production build                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     09:23:03
  plugin:nuxt-rfg-icon Retrieving favicons from realfavicongenerator api +0ms
  plugin:nuxt-rfg-icon Finished adding favicons as assets +11s
✔ Builder initialized                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  09:23:14
✔ Nuxt files generated                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 09:23:14

● Client █████████████████████████ emitting (95%) nuxt-pwa-icon 


◯ Server



 ERROR  (node:65879) DeprecationWarning: Tapable.plugin is deprecated. Use new API on .hooks instead                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   09:23:18


 FATAL  ENOENT: no such file or directory, open '/Users/hugo/dev/some-app/node_modules/@nuxtjs/icon/.cache/a71aaa/64.png'                                                                                                                                                                                                                                                                                                                                                                                                                                                                    09:23:48




   ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
   │                                                                                                                                        │
   │   ✖ Nuxt Fatal Error                                                                                                                   │
   │                                                                                                                                        │
   │   Error: ENOENT: no such file or directory, open '/Users/hugo/dev/some-app/node_modules/@nuxtjs/icon/.cache/a71aaa/64.png'   │
   │                                                                                                                                        │
   ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯

Additional comments?

I'm really sorry I can't provide a repro link, but this bug is only happening on my macbook (on linux/server env everything runs nice). I updated XCode additional components to latest version then nuxt stopped building. Could it be related?

HugoHeneault

HugoHeneault posted a new bug report

pwa-module •

bug Nuxt build stuck at 95% with @nuxtjs/pwa on

Version

v3.0.0-beta.16

Reproduction link

[http://See additional comments](http://See additional comments)

Steps to reproduce

  • add @nuxtjs/pwa
  • run yarn dev or nuxt
  • build script hangs at 95%

What is expected ?

Build script should finish

What is actually happening?

Build script is stuck at

 │                                             │
   │   Nuxt.js v2.8.1                            │
   │   Running in development mode (universal)   │
   │                                             │
   │   Listening on: http://localhost:3000/      │
   │                                             │
   ╰─────────────────────────────────────────────╯

ℹ Preparing project for development                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    09:19:13
ℹ Initial build may take a while                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       09:19:13
✔ Builder initialized                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  09:19:13
› App root: /Users/hugo/dev/some-app                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         09:19:13
› Generating nuxt files                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                09:19:13
› Generating routes...                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 09:19:13
✔ Nuxt files generated                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 09:19:13
› Creating webpack middleware...                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       09:19:17

● Client █████████████████████████ emitting (95%) nuxt-pwa-icon 


✔ Server
  Compiled successfully in 17.68s

If I try nuxt build, I got a little more verbose error message:

 nuxt build
ℹ Production build                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     09:23:03
  plugin:nuxt-rfg-icon Retrieving favicons from realfavicongenerator api +0ms
  plugin:nuxt-rfg-icon Finished adding favicons as assets +11s
✔ Builder initialized                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  09:23:14
✔ Nuxt files generated                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 09:23:14

● Client █████████████████████████ emitting (95%) nuxt-pwa-icon 


◯ Server



 ERROR  (node:65879) DeprecationWarning: Tapable.plugin is deprecated. Use new API on .hooks instead                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   09:23:18


 FATAL  ENOENT: no such file or directory, open '/Users/hugo/dev/some-app/node_modules/@nuxtjs/icon/.cache/a71aaa/64.png'                                                                                                                                                                                                                                                                                                                                                                                                                                                                    09:23:48




   ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
   │                                                                                                                                        │
   │   ✖ Nuxt Fatal Error                                                                                                                   │
   │                                                                                                                                        │
   │   Error: ENOENT: no such file or directory, open '/Users/hugo/dev/ourco/ourco-webapp/node_modules/@nuxtjs/icon/.cache/a71aaa/64.png'   │
   │                                                                                                                                        │
   ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯

Additional comments?

I'm really sorry I can't provide a repro link, but this bug is only happening on my macbook (on linux/server env everything runs nice). I updated XCode additional components to latest version then nuxt stopped building. Could it be related?

HugoHeneault

HugoHeneault posted a new question

pwa-module •

Nuxt build stuck at 95%

Hi there! Everything was worked smoothly this morning but sudddenly nuxt got stuck at 95% nuxt-pwa-icon (client build).

I tried:

  • removing node_modules folder
  • deleting .nuxt folder
  • rebooting my computer (😂)

Node version : 10.11.0
@nuxtjs/cli : 2.8.1
@nuxtjs/pwa : 3.0.0-beta.16

Still stuck at 95%…

Any ideas?

lhp0

lhp0 posted a new question

pwa-module •

Background Sync

I am trying to build a nuxt PWA with background sync feature, i created background_sync.js under /static folder with this piece of code copied from Google Workbox Doc.

`if (workbox) {
console.log("Yay! 'background_sync.js' is loaded 🎉");

const bgSyncPlugin = new workbox.backgroundSync.Plugin('myQueueName', {
    maxRetentionTime: 24 * 60 // Retry for max of 24 Hours (specified in minutes)
});

workbox.routing.registerRoute(
    /\/api\/.*/,
    new workbox.strategies.NetworkOnly({
        plugins: [bgSyncPlugin]
    }),
    'GET'
);

} else {
console.log("Boo! 'background_sync.js' didn't load 😬");
}`

i imported this script file in nuxt.config.js
{
workbox: { importScripts: ["background_sync.js"] }
}

but i got this error when i deploy this SPA to production.
Screenshot 2019-07-29 at 11.41.28 AM.png

lhp0

lhp0 posted a new question

pwa-module •

Background Sync

I am trying to build a nuxt PWA with background sync feature, i created background_sync.js under /static folder with this piece of code copied from Google Workbox Doc.

if (workbox) {
    console.log(`Yay! 'background_sync.js' is loaded 🎉`);

    const bgSyncPlugin = new workbox.backgroundSync.Plugin('myQueueName', {
        maxRetentionTime: 24 * 60 // Retry for max of 24 Hours (specified in minutes)
    });

    workbox.routing.registerRoute(
        /\/api\/.*/,
        new workbox.strategies.NetworkOnly({
            plugins: [bgSyncPlugin]
        }),
        'GET'
    );

} else {
    console.log(`Boo! 'background_sync.js' didn't load 😬`);
}

i imported this script file in nuxt.config.js
{
workbox: { importScripts: ["background_sync.js"] }
}
but i got this error when i deploy this SPA to production.
Screenshot 2019-07-29 at 11 41 28 AM

manniL

manniL posted a new feature request

pwa-module •

idea Using workbox without workbox-cdn

What problem does this feature solve?

Some applications running in an isolated VM without internet access. Also, people accessing this application do not have access to the internet on their machines.
For them, the workbox feature can't be used as it relies on external dependencies that are unreachable.

It'd be great to have an alternative for using workbox w/o a CDN.

spaceninja

spaceninja posted a new bug report

pwa-module •

bug Docs don't specify what version they're for

Version

v2.4.0

Reproduction link

https://codesandbox.io/embed/nuxtjs-pwa-cachenames-bug-rqz03

Steps to reproduce

(you can review this codesandbox in production mode here: https://csb-rqz03.netlify.com/ )

Create a Nuxt app. Add @nuxtjs/pwa, and deploy the app. Review the sw.js file.

Add a cacheNames section to the workbox config in nuxt.config.js. Redeploy the app, and review the sw.js file, and see there are no differences.

We added this section to nuxt.config.js:

workbox: {
    offlineAnalytics: true,
    cacheNames: {
      prefix: "my-app",
      suffix: "v1",
      precache: "custom-precache-name",
      runtime: "custom-runtime-name"
    }
  },

What is expected ?

I would expect the cache names to changes when I provide a cacheNames object.

What is actually happening?

The cache names do not change.

Additional comments?

NOTE: The version dropdown doesn't contain v2.6.0 which is the version we're actually using

gokhancetiner

gokhancetiner posted a new question

pwa-module •

"Add to Home Screen" dialog box

Hello,

Thanks for the great module !!!

I made the required installation and configuration for nuxt/pwa. After build when i run my project then i run audit tab on chrome developer tools and my application seems to be installable but Add to Home screen dialog box doesn't shown. Do i make extra configuration to see dialog box ?

Best Regards,

leonGiftagram

leonGiftagram posted a new question

pwa-module •

TypeError when launching nuxt dev

Hey Nuxt PWA team!
I'm unable to launch nuxt with pwa installed, as I get a typeError when launching my nuxt site in dev mode on my computer. This is the what it says:
"pwa nuxt TypeError: Cannot read property 'emit' of undefined"
the first reference line is:
"index.js:53 Object.apply
[giftagram-frontend]/[@nuxtjs]/manifest/index.js:53:22"
Am I missing something to launch nuxt with pwa? I followd the steps from the page https://pwa.nuxtjs.org/setup.html. I installed with npm, added to the nuxt.config modules list, and added an icon.png to the static folder.

Regards,
Leon

victorsolaya

victorsolaya posted a new question

pwa-module •

PWA Update available feature

Is there any way to show the user when an update is available of the PWA once they have the application in their home screen?
There is no documentation that says how to refresh the whole web services in a support "Nuxt" mode.

Thank you

agcty

agcty posted a new question

pwa-module •

meta.options.theme_color not overriding manifest theme_color

When having a config like this:

meta: {
name: "Menuver",
ogTitle: "Menuver",
nativeUI: true,
viewport:
"width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0, standalone",
theme_color: "#803CC3"
},

it does not automatically set the manifest theme_color option to the same as defined in the meta object. Instead it uses the loading bar color.

marvinhuebner

marvinhuebner posted a new feature request

pwa-module •

idea Disable icons or manifest auto generation or overwrite them

What problem does this feature solve?

I'm currently working on a project where I have very strict CI requirements. Unfortunately it's not enough for me to have just one icon as source.

Is there a way to completely disable the generation of the manifest.json and the icons so that i can write them manually?

What does the proposed changes look like?

Add new options for manifest and icons, maybe set them simply to false.

TheYorkshireDev

TheYorkshireDev posted a new bug report

pwa-module •

bug Service Worker not registered when hosting in S3 but is Locally

Version

v3.0.0-beta.16

Reproduction link

http://I-can-pass-a-link-privately-to-my-testing-bucket-for-debugging.com

Steps to reproduce

  1. Generate a new nuxtJS app: npx create-nuxt-app
  2. Add PWA support: npm i @nuxtjs/pwa and ['@nuxtjs/pwa', { icon: false }], to the config file as outline in https://pwa.nuxtjs.org/setup.html
  3. Generate static files: npm run generate
  4. Upload to S3 and enable static web hosting
  5. Visit web hosting endpoint and open Chrome developer tools
  6. Navigate to the "Application" tab to see service worker not registered

What is expected ?

I would expect the service worker to be registered when navigating to the "Application" tab in Chrome dev tools. I would also expect running an audit on the "Audits" tab to return a identification of the app as a PWA.

What is actually happening?

Chrome displays the following message on the Application tab in developer tools: "Site cannot be installed: no matching service worker detected. You may need to reload the page, or check that the service worker for the current page also controls the start URL from the manifest"

If I locally go into the dist/ folder and run python -m SimpleHTTPServer 8080 to create a local webserver and navigate to localhost:8080 the service worker IS registered and everything is working.

Additional comments?

When I run a NuxtJS PWA app locally the service worker is registered and Chrome lighthouse verifies the app is a PWA, however when I upload the same files to S3 and visit the endpoint, the service worker is not registered and therefore there is no PWA support. For some reason the generated js files are not registering the service worker on S3.

I suspect it is related to the pwa-module because the one of the generated JavaScript files from running npm run generate has the line which should register the service worker but it does not. Snippet of the function which is from a minified file so may not be very useful:

function L() {
            return (L = Object(o.a)(regeneratorRuntime.mark(function t() {
                var e, r, o;
                return regeneratorRuntime.wrap(function(t) {
                    for (; ; )
                        switch (t.prev = t.next) {
                        case 0:
                            if (!(!1 in navigator)) {
                                t.next = 2;
                                break
                            }
                            throw new Error("serviceWorker is not supported in current browser!");
                        case 2:
                            return t.next = 4,
                            n.e(4).then(n.bind(null, 149));
                        case 4:
                            return e = t.sent,
                            r = e.Workbox,
                            o = new r("/sw.js",{
                                scope: "/"
                            }),
                            t.next = 9,
                            o.register();
                        case 9:
                            return t.abrupt("return", o);
                        case 10:
                        case "end":
                            return t.stop()
                        }
                }, t)
            }))).apply(this, arguments)
        }