shadowwalker / next-pwa

Zero config PWA plugin for Next.js, with workbox 🧰
MIT License
3.71k stars 312 forks source link

pages/_offline.tsx addition causes build failure #468

Open andrewBsk opened 1 year ago

andrewBsk commented 1 year ago

Summary

Following the guide lines from here, when i added a pages/_offline.tsx file i get a build failure.

Versions

Expected Behaviors

Should build

Screenshots

image
Jozwiaczek commented 1 year ago

@andrewBsk I found a temporary solution, you can just manually install babel-loader.

In my case, this error appeared due to adding a custom worker but adding babel-loader as a dependency solved this issue. As I mentioned, this doesn't seem like an ideal solution. I'm using next-pwa within my monorepo with nx and I have some feeling that this error might connect with this 😄

andrewBsk commented 1 year ago

@andrewBsk I found a temporary solution, you can just manually install babel-loader.

In my case, this error appeared due to adding a custom worker but adding babel-loader as a dependency solved this issue. As I mentioned, this doesn't seem like an ideal solution. I'm using next-pwa within my monorepo with nx and I have some feeling that this error might connect with this 😄

That worked @Jozwiaczek 😀