Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Fix vite build configurations #525

Open
wants to merge 27 commits into
base: feat-v4
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
bdbf3a2
build: Remove the zip maker
RobertGemmaJr Jul 31, 2024
eac2e46
chore: comment
RobertGemmaJr Jul 31, 2024
9ccb89d
chore: comments and remove logging
RobertGemmaJr Jul 31, 2024
e73ce4f
feat: Add base vite config for browser usage
RobertGemmaJr Jul 31, 2024
d6aec7a
chore: comments
RobertGemmaJr Jul 31, 2024
5bbcc7f
fix: Delete fuse that was causing an error
RobertGemmaJr Jul 31, 2024
385d028
ref: Revert to CJS repository
RobertGemmaJr Jul 31, 2024
5c4bf03
g commit -a -m "chore: more fixups"
RobertGemmaJr Jul 31, 2024
d00b857
chore: add a forge env.d.ts file
RobertGemmaJr Jul 31, 2024
c547470
chore: comments
RobertGemmaJr Jul 31, 2024
983a07d
chore: comments
RobertGemmaJr Jul 31, 2024
7715cc4
chore: TODOs
RobertGemmaJr Aug 1, 2024
6f68551
chore: Fix version file as module
RobertGemmaJr Aug 2, 2024
d9e6d0a
chore: remove uneeded ts file
RobertGemmaJr Aug 2, 2024
e4a96dd
ref: Handle a default vite config shared between electron-forge and t…
RobertGemmaJr Aug 2, 2024
74c911b
chore: import order
RobertGemmaJr Aug 2, 2024
207b0b3
ref: Cleanup configs
RobertGemmaJr Aug 2, 2024
507abca
ref: Have a custom name for the vite config files
RobertGemmaJr Aug 2, 2024
29d6e46
Update src/App/App.jsx
RobertGemmaJr Aug 2, 2024
28cdd8b
Merge branch 'feat-v4' into fix-make-cjs
RobertGemmaJr Aug 5, 2024
7b316c7
fix: Remove osX code signing
RobertGemmaJr Aug 5, 2024
3471912
chore: comments
RobertGemmaJr Aug 5, 2024
b1a453d
ci: Test ci with pure intel
RobertGemmaJr Aug 5, 2024
c75d3b9
ci: Test x64
RobertGemmaJr Aug 7, 2024
aae48ff
chore: comment out osx
RobertGemmaJr Aug 7, 2024
1a95de0
ci: Test intel build on mac runner
RobertGemmaJr Aug 7, 2024
92e840b
ci: Test universal build on arm
RobertGemmaJr Aug 7, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
2 changes: 2 additions & 0 deletions .github/workflows/workflow-package.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
name: 📦 Package Workflow

# Workflow dispatch for packaging an electron executable
# TODO: Update actions running on Node 16 (all workflows)
# TODO: Rename as workflow-make
on:
workflow_dispatch:
inputs:
Expand Down
2 changes: 1 addition & 1 deletion .prettierrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* This file defines specific rules for Prettier. It adjusts their default settings.
* We recommend these settings if your lab does not have specific style standards.
*/
export default {
module.exports = {
printWidth: 100, // Sets the maximum line size to 100 (default is 80)
quoteProps: "as-needed", // Add quotes around props as needed
trailingComma: "es5", // Add a trailing comma to all es5 modules
Expand Down
21 changes: 7 additions & 14 deletions forge.config.js → forge.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ export default {
packagerConfig: {
asar: true,
icon: "assets/icons/icon",
// NOTE: THis is needed for universal but crashes when not using the universal
osxSign: {},
},
rebuildConfig: {},
makers: [
{
// Windows Distribution
Expand All @@ -32,10 +35,6 @@ export default {
},
},
},
{
// zip files
name: "@electron-forge/maker-zip",
},
],
plugins: [
{ name: "@electron-forge/plugin-auto-unpack-natives", config: {} },
Expand All @@ -44,16 +43,11 @@ export default {
config: {
build: [
// Build files that use the main config
{ entry: "src/Electron/main.js", config: "vite.main.config.js" },
{ entry: "src/Electron/main.js", config: "vite.main.config.mjs" },
// Build files that use the preload config
{ entry: "src/Electron/preload.js", config: "vite.preload.config.js" },
{ entry: "src/Electron/preload.js", config: "vite.preload.config.mjs" },
],
renderer: [{ name: "main_window", config: "vite.renderer.config.js" }],
define: {
// Add the package name and version to import.meta.env
"import.meta.env.PACKAGE_NAME": JSON.stringify(process.env.npm_package_name),
"import.meta.env.PACKAGE_VERSION": JSON.stringify(process.env.npm_package_version),
},
renderer: [{ name: "main_window", config: "vite.renderer.config.mjs" }],
},
},
{
Expand All @@ -62,12 +56,11 @@ export default {
version: FuseVersion.V1,
[FuseV1Options.RunAsNode]: false, // Disables ELECTRON_RUN_AS_NODE
[FuseV1Options.GrantFileProtocolExtraPrivileges]: true, // Grants the file protocol extra privileges (for the built application)
[FuseV1Options.EnableCookieEncryption]: false, // Disables cookie encryption
[FuseV1Options.EnableCookieEncryption]: true, // Enables cookie encryption
[FuseV1Options.EnableNodeOptionsEnvironmentVariable]: false, // Disables the NODE_OPTIONS environment variable
[FuseV1Options.EnableNodeCliInspectArguments]: false, // Disables the --inspect and --inspect-brk family of CLI options
[FuseV1Options.EnableEmbeddedAsarIntegrityValidation]: true, // Enforces validation of the app.asar archive on macOS
[FuseV1Options.OnlyLoadAppFromAsar]: true, // Enforces that Electron will only load your app from "app.asar" instead of its normal search paths
[FuseV1Options.LoadBrowserProcessSpecificV8Snapshot]: true, // Loads V8 Snapshot from `browser_v8_context_snapshot.bin` for the browser process
},
},
],
Expand Down
Loading
Loading