{"size": 3398, "ext": "js", "max_stars_repo_path": "vue.config.js", "max_stars_repo_name": "shangkouyou/v-player", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "vue.config.js", "max_issues_repo_name": "shangkouyou/v-player", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "vue.config.js", "max_forks_repo_name": "shangkouyou/v-player", "max_forks_repo_forks_event_min_datetime": "2022-03-13T17:34:26.000Z", "max_forks_repo_forks_event_max_datetime": "2022-03-13T17:34:26.000Z"}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": 1, "avg_line_length": 29.547826087, "max_line_length": 103, "alphanum_fraction": 0.4894055327}
const path = require('path');
module.exports = {
  transpileDependencies: ['vuetify'],
  configureWebpack: {
    devtool: process.env.NODE_ENV === 'production' ? false : 'source-map',
    devServer: {
      port: process.env.VUE_APP_PORT || 8080,
      proxy: {
        '/api': {
          target: `http://localhost:${
            process.env.VUE_APP_API_DEV_PORT || 3000
          }`,
          pathRewrite: { '^/api': '/' },
          changeOrigin: true,
        },
      },
    },
    resolve: {
      alias: {
        '@components': path.resolve(__dirname, 'src/components'),
        '@util': path.resolve(__dirname, 'src/util'),
        '@assets': path.resolve(__dirname, 'src/assets'),
        '@api': path.resolve(__dirname, 'src/api'),
      },
    },
    optimization: {
      removeAvailableModules: process.env.NODE_ENV === 'production',
      removeEmptyChunks: process.env.NODE_ENV === 'production',
      splitChunks: {
        chunks: 'all',
        maxAsyncRequests: 20,
        maxInitialRequests: 5,
        minSize: 30000,
        cacheGroups: {
          libs: {
            name: 'chunk-vender-libs',
            test: /[\\/]node_modules[\\/]/,
            priority: 10,
            chunks: 'initial', // only package third parties that are initially dependent
          },
          vuetify: {
            name: 'chunk-vuetify-lib',
            test: /[\\/]vuetify[\\/]lib[\\/]/,
            priority: 20,
          },
        },
      },
    },
  },
  pluginOptions: {
    electronBuilder: {
      nodeIntegration: true, // https://github.com/electron/electron/issues/9920#issuecomment-653978691
      builderOptions: {
        productName: 'v-player',
        copyright: 'Copyright © VPlayer 2022', //版权信息
        asar: true,
        win: {
          publisherName: 'VPlayer',
          icon: 'build/icons/icon.ico',
          target: [
            {
              target: 'nsis',
              arch: ['x64'],
            },
            {
              target: 'portable',
              arch: ['x64'],
            },
          ],
        },
        mac: {
          target: [
            {
              target: 'dmg',
              arch: ['x64', 'arm64', 'universal'],
            },
          ],
          artifactName: '${productName}-v${version}-${arch}.${ext}',
          darkModeSupport: true,
          category: 'public.app-category.music',
        },
        linux: {
          target: [
            'AppImage',
            'snap',
            'deb',
            'rpm',
            'freebsd',
            'pacman',
            'tar.xz',
          ],
          category: 'Audio',
        },
        nsis: {
          oneClick: false, // 是否一键安装
          allowElevation: true, // 允许请求提升。 如果为false，则用户必须使用提升的权限重新启动安装程序。
          allowToChangeInstallationDirectory: true, // 允许修改安装目录
          installerIcon: 'build/icons/icon.ico', // 安装图标
          uninstallerIcon: 'build/icons/icon.ico', //卸载图标
          installerHeaderIcon: 'build/icons/icon.ico', // 安装时头部图标
          createDesktopShortcut: true, // 创建桌面图标
          createStartMenuShortcut: true, // 创建开始菜单图标
          shortcutName: 'VPlayer', // 图标名称
          deleteAppDataOnUninstall: true,
        },
        dmg: {
          icon: 'build/icons/icon.icns',
        },
      },
      // Use this to change the entrypoint of your app's main process
      mainProcessFile: 'src/background.js',
    },
  },
};
