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

Electron Apps With Vite #12288

Closed
3 of 4 tasks
ghost opened this issue Mar 4, 2023 · 11 comments · Fixed by #12390
Closed
3 of 4 tasks

Electron Apps With Vite #12288

ghost opened this issue Mar 4, 2023 · 11 comments · Fixed by #12390
Labels

Comments

@ghost
Copy link

ghost commented Mar 4, 2023

Description

Please include functinallity in vite , so that when creating new project after entering name of project are prompted to ask frame work, electron appears there and after choosing electron which framework we need touse appears like... react, vue, angular vanila etc. after that option comes where we want to use typescript or javascript etc.

Suggested solution

npm create vite@latest

Project Name >> New Electron App

Select Framework >> Electron

Select Web Framework >> React, Vue etc.

Select a variant >> Javacript, Typescript etc.

Select styling >> CSS, SASS, SCSS etc.

Done. Now run:

cd "electron app"
npm install
npm run dev

Alternative

there's template at github which does this

Vite+Electron+React+SASS (Github)

Additional context

No response

Validations

@fi3ework
Copy link
Member

fi3ework commented Mar 6, 2023

As the document says

create-vite is a tool to quickly start a project from a basic template for popular frameworks. Check out Awesome Vite for community maintained templates that include other tools or target different frameworks. You can use a tool like degit to scaffold your project with one of the templates.

IMO it's not likely to add an Electron template without an official plugin support.

@bluwy
Copy link
Member

bluwy commented Mar 6, 2023

Yes, for now Electron support in Vite is community-based only, but we're happy to support it in create-vite with it's "Others" option here, which can point to https://github.com/electron-vite/create-electron-vite. Feel free to add that in a PR if you'd like.

@github-actions
Copy link

github-actions bot commented Mar 6, 2023

Hello @akt-01. We like your proposal/feedback and would appreciate a contribution via a Pull Request by you or another community member. We thank you in advance for your contribution and are looking forward to reviewing it!

@ghost
Copy link
Author

ghost commented Mar 6, 2023

Ummm.. I am still learning stuff so its kind of not possible for me to contirbute cause i have used vite only watching yt tutorials maybe me or somebody in future could help.

@caoxiemeihao
Copy link
Contributor

@bluwy Hey! 👋

I have good news for you, Electron is officially working with electron-vite, Electron's official scaffolding Forge will support Vite in the next version v6.1.0.
electron/forge#3071

electron-vite will continue to work on the integration of Electron with Vite :)

@caoxiemeihao
Copy link
Contributor

caoxiemeihao commented Mar 7, 2023

Yes, for now Electron support in Vite is community-based only, but we're happy to support it in create-vite with it's "Others" option here, which can point to https://github.com/electron-vite/create-electron-vite. Feel free to add that in a PR if you'd like.

This seems like a really good idea, maybe I'll submit a PR for it. cc @fi3ework

@bluwy
Copy link
Member

bluwy commented Mar 7, 2023

Nice! Didn't know that it would be supported in Forge soon. Happy to have create-vite re-route to the CLI. I think ideally having it point to a Vite template by default would be great.

@DerTimonius
Copy link

Is this still available? I'd love to take a shot at this 🙂

@caoxiemeihao
Copy link
Contributor

Is this still available? I'd love to take a shot at this 🙂

Coming soon.

@DerTimonius
Copy link

Coming soon.

Sorry if I caused some misunderstanding, I meant that I would like to contribute

@caoxiemeihao
Copy link
Contributor

Sorry if I caused some misunderstanding, I meant that I would like to contribute

Thanks, but for now we still need to make some changes in create-electron-vite to adapt to create-vite.

@github-actions github-actions bot locked and limited conversation to collaborators Mar 31, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants