Skip to content
Snippets Groups Projects
vue.config.js 1.02 KiB
Newer Older
const webpack = require('webpack');
const fs = require('fs');
const packageJson = fs.readFileSync('./package.json');
const version = JSON.parse(packageJson).version || 0;
  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$/ 
      ],
DESPRES Damien's avatar
DESPRES Damien committed
    },
    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