const webpack = require('webpack')

process.env.VUE_APP_VERSION = require('./package.json').version

module.exports = {
  publicPath: process.env.NODE_ENV === 'development' ? '/' : '/',
  // productionSourceMap: process.env.CLI_MODE === 'prod' ? false : true,
  configureWebpack: {
    // module: {
    //   rules: [
    //   ]
    // },
    plugins: [
      new webpack.ProvidePlugin({
        // utils: ['/src/utils.js', 'default']
        globalMapState: ['vuex', 'mapState'],
        globalMapMutations: ['vuex', 'mapMutations'],
        globalMapGetters: ['vuex', 'mapGetters'],
        // globalConfig: ['/src/config.js', 'default'],
        // globalApi: ['/src/api.js', 'default'],
        globalUtils: ['/src/utils/index.js', 'default'],
      }),
    ],
  },
}