| | |
| | | const path = require('path'); |
| | | const path = require("path"); |
| | | const json = require('./package.json'); |
| | | const { version } = json; |
| | | |
| | | function resolve(dir) { |
| | | return path.join(__dirname, dir); |
| | | } |
| | | |
| | | module.exports = { |
| | | publicPath: './', |
| | | publicPath: "./", |
| | | devServer: { |
| | | // can be overwritten by process.env.HOST |
| | | host: '0.0.0.0', |
| | | port: 8081 |
| | | host: "0.0.0.0", |
| | | port: 8081, |
| | | }, |
| | | pluginOptions:{ |
| | | electronBuilder:{ |
| | | preload:'src/preload.js', |
| | | pluginOptions: { |
| | | electronBuilder: { |
| | | preload: "src/preload.js", |
| | | builderOptions: { |
| | | extraResources: [ |
| | | { |
| | | from: "./public/runtime", |
| | | to: "./runtime" |
| | | to: "./runtime", |
| | | }, |
| | | { |
| | | from: "./public/app_x64.exe", |
| | | to: "./app_x64.exe" |
| | | } |
| | | to: "./app_x64.exe", |
| | | }, |
| | | ], |
| | | files: [ |
| | | '**/*', |
| | | '!**/runtime', |
| | | '!**/app_x64.exe' |
| | | ], |
| | | } |
| | | } |
| | | files: ["**/*", "!**/runtime", "!**/app_x64.exe"], |
| | | }, |
| | | }, |
| | | }, |
| | | chainWebpack: config => { |
| | | chainWebpack: (config) => { |
| | | config.resolve.alias |
| | | .set('@', resolve('src')) |
| | | .set('src', resolve('src')) |
| | | .set('common', resolve('src/common')) |
| | | .set('components', resolve('src/components')); |
| | | .set("@", resolve("src")) |
| | | .set("src", resolve("src")) |
| | | .set("common", resolve("src/common")) |
| | | .set("components", resolve("src/components")); |
| | | |
| | | config.plugin('html').tap((args) => { |
| | | args[0].title = 'fbx文件解析'; |
| | | config.plugin("html").tap((args) => { |
| | | args[0].title = `fbx文件解析 V${version}`; |
| | | return args; |
| | | }) |
| | | } |
| | | }; |
| | | }); |
| | | }, |
| | | }; |