Reputation: 2381
I want to add withPWA and withTypescript together, but i don't know how to config them...
this is my next.config.json code :
const withPWA = require("next-pwa");
module.exports = withPWA({
pwa: {
dest: "public",
},
});
and
const withTypescript = require('@zeit/next-typescript');
module.exports = withTypescript();
these configs only work alone...how can i make them work together?
Upvotes: 1
Views: 119
Reputation: 810
const withPWA = require("next-pwa");
const withTypescript = require('@zeit/next-typescript');
const config = {
pwa: {
dest: "public",
},
}
module.exports = withTypescript(withPWA(config));
Use like this
Upvotes: 2