vue.config.js 950 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. // 配置手册: https://cli.vuejs.org/zh/config/#vue-config-js
  2. // electron-bulder配置:https://www.electron.build/configuration/contents#extrafiles
  3. const { defineConfig } = require("@vue/cli-service");
  4. module.exports = defineConfig({
  5. transpileDependencies: true,
  6. // publicPath: './',
  7. devServer: {
  8. port: 8059,
  9. client: {
  10. overlay: false,
  11. },
  12. },
  13. pluginOptions: {
  14. electronBuilder: {
  15. externals: [
  16. "crypto-js",
  17. "log4js",
  18. "gm",
  19. "cropperjs",
  20. "p-queue",
  21. "js-md5",
  22. ],
  23. builderOptions: {
  24. extraFiles: [
  25. "extra/scan/**",
  26. "extra/database/org.rdb",
  27. "config.sample.json",
  28. "extra/imagemagick/**",
  29. "extra/zxing/**",
  30. "extra/zxingA/**",
  31. ],
  32. win: {
  33. target: "portable",
  34. signAndEditExecutable: false,
  35. },
  36. },
  37. customFileProtocol: "./",
  38. },
  39. },
  40. });