An Electron application that loads a local web page from the 'dist' directory.
- Loads a local web page.
- Development and build scripts for multiple platforms.
- Clone the repository:
git clone git@github.com:quecot/electron-app-from-dist.git-
Populate the
dist/dist directory with your web application files. -
Install the dependencies:
npm install- Run the application in development mode:
npm run devTo build the application for production, use the provided npm scripts:
- For macOS (ARM64):
npm run build:macos-arm64- For Windows (64-bit):
npm run build:windows- For Windows (32-bit):
npm run build:windows-32Note: Remember to replace **YOUR_APP_NAME** in the build scripts with your desired application name in the package.json.
If you're building your web application with Vite, ensure you set "base": "./", in your vite.config.js or vite.config.ts to ensure correct asset paths in the built Electron app.
Astro does not allow for non-url paths as base, which can be seen discussed in this issue. For a quick fix, you can check out astro-relative-links.
This project is licensed under the MIT License.
Contributions are always welcome. Feel free to open issues, suggest improvements, or submit pull requests.