89 lines
2.9 KiB
JavaScript
89 lines
2.9 KiB
JavaScript
// Forge Configuration
|
|
const path = require('path');
|
|
const rootDir = process.cwd();
|
|
|
|
module.exports = {
|
|
// Packager Config
|
|
packagerConfig: {
|
|
// Create asar archive for main, renderer process files
|
|
asar: true,
|
|
// Set executable name
|
|
executableName: 'ERWT',
|
|
// Set application copyright
|
|
appCopyright: '© 2021-2024 Codesbiome, Guasam',
|
|
// Set application icon
|
|
icon: path.resolve('assets/images/appIcon.ico'),
|
|
},
|
|
// Forge Makers
|
|
makers: [
|
|
{
|
|
// Squirrel.Windows is a no-prompt, no-hassle, no-admin method of installing
|
|
// Windows applications and is therefore the most user friendly you can get.
|
|
name: '@electron-forge/maker-squirrel',
|
|
config: {
|
|
name: 'electron-react-typescript-webpack-2022',
|
|
},
|
|
},
|
|
{
|
|
// The Zip target builds basic .zip files containing your packaged application.
|
|
// There are no platform specific dependencies for using this maker and it will run on any platform.
|
|
name: '@electron-forge/maker-zip',
|
|
platforms: ['darwin'],
|
|
},
|
|
{
|
|
// The deb target builds .deb packages, which are the standard package format for Debian-based
|
|
// Linux distributions such as Ubuntu.
|
|
name: '@electron-forge/maker-deb',
|
|
config: {},
|
|
},
|
|
{
|
|
// The RPM target builds .rpm files, which is the standard package format for
|
|
// RedHat-based Linux distributions such as Fedora.
|
|
name: '@electron-forge/maker-rpm',
|
|
config: {},
|
|
},
|
|
],
|
|
// Forge Plugins
|
|
plugins: [
|
|
{
|
|
name: '@electron-forge/plugin-webpack',
|
|
config: {
|
|
// Fix content-security-policy error when image or video src isn't same origin
|
|
// Remove 'unsafe-eval' to get rid of console warning in development mode.
|
|
devContentSecurityPolicy: `default-src 'self' 'unsafe-inline' data:; script-src 'self' 'unsafe-inline' data:`,
|
|
// Webpack Dev Server port
|
|
port: 3000,
|
|
// Logger port
|
|
loggerPort: 9000,
|
|
// Main process webpack configuration
|
|
mainConfig: path.join(rootDir, 'tools/webpack/webpack.main.js'),
|
|
// Renderer process webpack configuration
|
|
renderer: {
|
|
// Configuration file path
|
|
config: path.join(rootDir, 'tools/webpack/webpack.renderer.js'),
|
|
// Entrypoints of the application
|
|
entryPoints: [
|
|
{
|
|
// Window process name
|
|
name: 'app_window',
|
|
// React Hot Module Replacement (HMR)
|
|
rhmr: 'react-hot-loader/patch',
|
|
// HTML index file template
|
|
html: path.join(rootDir, 'src/renderer/app.html'),
|
|
// App Renderer
|
|
js: path.join(rootDir, 'src/renderer/appRenderer.tsx'),
|
|
// App Preload
|
|
preload: {
|
|
js: path.join(rootDir, 'src/renderer/appPreload.tsx'),
|
|
},
|
|
},
|
|
],
|
|
},
|
|
devServer: {
|
|
liveReload: false,
|
|
},
|
|
},
|
|
},
|
|
],
|
|
};
|