My next.config.js is set up with next-pwa and an experimental app feature included.
const withPWA = require('next-pwa');
module.exports = withPWA({
pwa: {
dest: 'public',
disable: process.env.NODE_ENV === 'development'
},
experimental: {
appDir: true
},
});
I encountered the following error:
Error: > The
app
directory is marked as experimental. To enable, add
appDir: true to your
next.config.js under the
experimental section. For more information, visit https://nextjs.org/docs/messages/experimental-app-dir-config
I tried this configuration in a newly created project and verified that it should work properly.