Skip to content

Commit

Permalink
fix: 🐛 DMG Maker, forge debug, webpack optimization & minify
Browse files Browse the repository at this point in the history
  • Loading branch information
garrylachman committed May 25, 2023
1 parent 8fc6163 commit 8c3ce7f
Show file tree
Hide file tree
Showing 6 changed files with 277 additions and 8 deletions.
1 change: 1 addition & 0 deletions .github/workflows/prepare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,4 +100,5 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_OPTIONS: --max-old-space-size=8192
DEBUG: electron-forge:*
run: corepack yarn electron-forge publish
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,4 @@ dist
packages/*/lib
packages/*/node_modules
packages/*/.swc
.DS_Store
4 changes: 3 additions & 1 deletion config/webpack.main.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,11 @@ export const mainConfig: Configuration = {
plugins: [new TsconfigPathsPlugins()],
},
optimization: {
minimize: true,
moduleIds: 'named',
minimizer: [
new TerserPlugin({
parallel: true,
minify: TerserPlugin.swcMinify,
}),
],
},
Expand Down
11 changes: 8 additions & 3 deletions forge.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,30 @@ import {
sourceRendererPath,
assetsPath,
} from './config/webpack.paths';
import { version } from './package.json';

const config: ForgeConfig = {
packagerConfig: {
asar: false,
executableName: 'electrocrud',
name: 'Electro CRUD',
name: 'ElectroCRUD',
appBundleId: 'com.garrylachman.electrocrud',
icon: path.resolve(assetsPath, 'icon'),
appCategoryType: 'public.app-category.developer-tools',
win32metadata: {
CompanyName: 'Electro CRUD',
OriginalFilename: 'Electro CRUD',
CompanyName: 'ElectroCRUD',
OriginalFilename: 'ElectroCRUD',
},
},
rebuildConfig: {},
makers: [
new MakerSquirrel(
{
authors: 'Garry Lachman',
name: 'electrocrud',
exe: 'electrocrud.exe',
noMsi: true,
setupExe: `electrocrud-${version}-win32-setup.exe`,
},
['win32']
),
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@
"@commitlint/config-conventional": "^17.4.4",
"@electron-forge/cli": "^6.1.1",
"@electron-forge/maker-deb": "^6.1.1",
"@electron-forge/maker-dmg": "^6.1.1",
"@electron-forge/maker-flatpak": "^6.1.1",
"@electron-forge/maker-rpm": "^6.1.1",
"@electron-forge/maker-snap": "^6.1.1",
Expand Down
Loading

0 comments on commit 8c3ce7f

Please sign in to comment.