const webpack = require('webpack') const fs = require('fs') const packageJson = fs.readFileSync('./package.json') const version = JSON.parse(packageJson).version || 0 module.exports = { publicPath: '/geocontrib/', devServer: { proxy: { '^/api': { target: 'https://geocontrib.dev.neogeo.fr/api', ws: true, changeOrigin: true } } }, pwa: { workboxPluginMode: 'InjectManifest', workboxOptions: { swSrc: 'src/service-worker.js', exclude: [ /\.map$/, /config\/config.*\.json$/, /manifest\.json$/ ], }, iconPaths: { faviconSVG: null, favicon32: null, favicon16: null, appleTouchIcon: null, maskIcon: null, msTileImage: null, }, themeColor: '#1da025' }, configureWebpack: { plugins: [ new webpack.DefinePlugin({ 'process.env': { PACKAGE_VERSION: '"' + version + '"' } }) ] }, // the rest of your original module.exports code goes here }