cnrstvns
cnrstvns
TTCTheo's Typesafe Cult
Created by Nemila on 5/4/2023 in #questions
[Solved] T3 Stack PWA ??
If you give the next-pwa docs or source a read, you'll notice that next-pwa's default export is a function that returns a function — the first function is to be called with the config for next-pwa, the second function is to be called with your next config https://github.com/shadowwalker/next-pwa/blob/1e6af5fa9f6a807930f451adb5ab5078d5cda451/index.js#L15 So you'd want to do something like:
import nextPWA from 'next-pwa';

const withPWA = nextPWA({
/* your next-pwa config here */
});

const config = withPWA({
// your next config here
});

export default config;
import nextPWA from 'next-pwa';

const withPWA = nextPWA({
/* your next-pwa config here */
});

const config = withPWA({
// your next config here
});

export default config;
Hope this helps 😄
11 replies