// eslint-disable-next-line @typescript-eslint/no-var-requires const path = require('path'); // In development, the Rails app will run on a port 100 higher than this one (default way foreman assigns ports) const devRailsPort = (parseInt(process.env.PORT || '3000') + 100).toString(); module.exports = { pwa: { workboxPluginMode: 'InjectManifest', workboxOptions: { swSrc: path.join(__dirname, 'src/service-worker.js'), compileSrc: true } }, devServer: { proxy: `http://localhost:${devRailsPort}` } };