vue.config.js 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. // const path = require('path');
  2. //
  3. // function resolve(dir) {
  4. // return path.join(__dirname, dir)//path.join(__dirname)设置绝对路径
  5. // }
  6. module.exports = {
  7. // transpileDependencies: true,
  8. publicPath: './',
  9. outputDir: 'dist',
  10. assetsDir: 'static',
  11. lintOnSave: false, // eslint-loader 是否在保存的时候检查
  12. productionSourceMap: true,
  13. // devServer: {
  14. // host: '0.0.0.0',
  15. // open: false,
  16. // proxy: {
  17. // '/': {
  18. // // target:'http://192.168.0.2:7777/',//开发
  19. // // target:'http://192.168.0.222:7777/',//开发
  20. // // target:'http://192.168.1.253:7777/',//测试
  21. // target:'http://data.cqna.gov.cn/',//线上
  22. // changeOrigin: true,
  23. // pathRewrite: {
  24. // '^ /': ''
  25. // }
  26. // },
  27. // },
  28. // disableHostCheck: true,
  29. // }
  30. pluginOptions: {
  31. electronBuilder: {
  32. nodeIntegration: true,
  33. externals: ['serialport'],
  34. builderOptions: {
  35. "productName": "cxj-client",
  36. "appId": "com.apitool",
  37. "win": {
  38. },
  39. //window自动义安装
  40. "nsis": {
  41. "oneClick": false, //是否静默安装(一键式安装)
  42. "perMachine": true, //安装模式 true=所有用户 false=自己
  43. "allowElevation": true, //允许请求提升。 如果为false,则用户必须使用提升的权限重新启动安装程序
  44. "allowToChangeInstallationDirectory": true, //是否安装时是否能更换安装目录
  45. "createDesktopShortcut": true, //是否创建桌面快捷建
  46. "menuCategory": true, //是否在开始菜单里创建子菜单
  47. // "installerIcon": "build/icons/icon.ico", //安装应用的图片,一定要 ico格式的图片
  48. // "installerSidebar": "public/logo.bmp", //安装程序左边的图片,一定是要位图 bmp 格式 一定要 164*314
  49. // "uninstallerSidebar": "build/icons/uninstall.bmp", //安装程序左边的图片,一定是要位图 bmp 格式 一定要 164*314
  50. // "include": "scripts/installer.nsi"
  51. }
  52. }
  53. }
  54. }
  55. // chainWebpack(config) {
  56. // // set svg-sprite-loader
  57. // config.module
  58. // .rule('svg')
  59. // .exclude.add(resolve('src/icons'))
  60. // .end()
  61. // config.module
  62. // .rule('icons')
  63. // .test(/\.svg$/)
  64. // .include.add(resolve('src/icons'))
  65. // .end()
  66. // .use('svg-sprite-loader')
  67. // .loader('svg-sprite-loader')
  68. // .options({symbolId: 'icon-[name]'})
  69. // .end()
  70. // // 配置别名
  71. // config.resolve.alias
  72. // .set('@', resolve('./src'))
  73. // .set('public', resolve('./public'))
  74. // }
  75. }