// const path = require('path'); // // function resolve(dir) { // return path.join(__dirname, dir)//path.join(__dirname)设置绝对路径 // } module.exports = { // transpileDependencies: true, publicPath: './', outputDir: 'dist', assetsDir: 'static', lintOnSave: false, // eslint-loader 是否在保存的时候检查 productionSourceMap: true, // devServer: { // host: '0.0.0.0', // open: false, // proxy: { // '/': { // // target:'http://192.168.0.2:7777/',//开发 // // target:'http://192.168.0.222:7777/',//开发 // // target:'http://192.168.1.253:7777/',//测试 // target:'http://data.cqna.gov.cn/',//线上 // changeOrigin: true, // pathRewrite: { // '^ /': '' // } // }, // }, // disableHostCheck: true, // } pluginOptions: { electronBuilder: { customFileProtocol: "./", nodeIntegration: true, externals: ['serialport'], builderOptions: { "productName": "cxj-client", "appId": "com.apitool", "win": { }, //window自动义安装 "nsis": { "oneClick": false, //是否静默安装(一键式安装) "perMachine": true, //安装模式 true=所有用户 false=自己 "allowElevation": true, //允许请求提升。 如果为false,则用户必须使用提升的权限重新启动安装程序 "allowToChangeInstallationDirectory": true, //是否安装时是否能更换安装目录 "createDesktopShortcut": true, //是否创建桌面快捷建 "menuCategory": true, //是否在开始菜单里创建子菜单 // "installerIcon": "build/icons/icon.ico", //安装应用的图片,一定要 ico格式的图片 // "installerSidebar": "public/logo.bmp", //安装程序左边的图片,一定是要位图 bmp 格式 一定要 164*314 // "uninstallerSidebar": "build/icons/uninstall.bmp", //安装程序左边的图片,一定是要位图 bmp 格式 一定要 164*314 // "include": "scripts/installer.nsi" } } } } // chainWebpack(config) { // // set svg-sprite-loader // config.module // .rule('svg') // .exclude.add(resolve('src/icons')) // .end() // config.module // .rule('icons') // .test(/\.svg$/) // .include.add(resolve('src/icons')) // .end() // .use('svg-sprite-loader') // .loader('svg-sprite-loader') // .options({symbolId: 'icon-[name]'}) // .end() // // 配置别名 // config.resolve.alias // .set('@', resolve('./src')) // .set('public', resolve('./public')) // } }