vue.config.js 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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/zxingA/**",
  30. ],
  31. win: {
  32. target: [
  33. {
  34. target: "dir", // "dir" 表示 win-unpacked
  35. arch: ["x64"], // 可以指定 "x64", "ia32" 或 "arm64",根据需要选择
  36. },
  37. ],
  38. signAndEditExecutable: false,
  39. },
  40. },
  41. customFileProtocol: "./",
  42. },
  43. },
  44. });