hanford / next-offline

make your Next.js application work offline using service workers via Google's workbox
https://github.com/hanford/next-offline
1.59k stars 111 forks source link

Use `next export` with custom `swDest` path #228

Open rohmanhm opened 4 years ago

rohmanhm commented 4 years ago

Issue and steps to reproduce.

I have a custom swDest on my app like below.

workboxOpts: {
    swDest: 'public/service-worker.js',
    ...otherSettings,
}

When doing next export it's generate service-worker.js file in out/public/service-worker.js which should be out/service-worker.js right?

Expectations

It should generate service-worker.js file in out/service-worker.js instead of out/public/service-worker.js

Versions.

next-offline@^5.0.0