Code Monkey home page Code Monkey logo

electron-vite-tailwind-starter's Introduction

Electron 12 + Vite 2 + Tailwind 2 - Starter

NOTE: !Unmaintained - For an up to date electron + vite solution you can use electron-vite-vue

Electron + Vite + Tailwind Starter

This Starter utilizes Electron, Vite and Tailwind in combination. It tries to adhere the best practices mentioned in the Talk by Kilian Valkhof

Also does it use Tailwinds JIT Mode.

Installation

yarn

Development

yarn dev

Be careful, do not run yarn dev:electron or yarn dev:vite solo as they need each other! (see #83)

Build

yarn build

electron-vite-tailwind-starter's People

Contributors

appinteractive avatar dependabot[bot] avatar igorjacauna avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

electron-vite-tailwind-starter's Issues

How to update electron version ?

I have to say this is by far the most helpful template to run vite, electron and tailwind altogether and it in fact is better than many popular templates because it's easy to understand, use and config. Thanks a lot to the author!

I have a question about how to update electron version, though. Currently the template is based on electron 12 and the newest stable version is 14. As electron is a fast changing framework I think it's good for us to pick up the pace. But every time I run yarn install after changing electron version to 14.0.0 the terminal will stuck at the waiting process while installing new electron version. It doesn't help if I delete electron and reinstall the newer version.

Here is the stuck status while installing electron-14.0.0:
image

And here is what happened after the pending period is finally over:
image

My System:
linux mint cinammon 20.2
nodejs 16.8.0

Thanks!

Blank window

I am a bit confused. I cloned the repo, and then ran npm i -D, followed by npm run dev, and I am getting a blank window with no content. Inspecting the elements in dev tools confirms this also.

Am I missing something?

image

Implementation of "Preload"

Hi,

I am implementing the security tip from Electron.
https://www.electronjs.org/docs/tutorial/security#2-do-not-enable-nodejs-integration-for-remote-content

But this has no effect, I don't know if it's because vite and electron run independently of each other.

create-window.js

- nodeIntegration: true,
+ preload: path.join(app.getAppPath(), 'preload.js'),

preload.js

const { ipcRenderer } = require('electron')
window.ipcRenderer = ipcRenderer

index.html

  <script>
    alert(window.ipcRenderer) // Return: "undefined"
  </script>

Could you support me with this problem?

auto reload

How to setup auto reload when background.js or other js files changes?

Window Name

What was the purpose of the windowName variable passed to your create-window helper? It doesn't appear to be used. You're passing the window name to the function when calling it from the main process.

VITE NOT READY

Hi,
I have this
"VITE NOT READY, WILL TRY AGAIN IN 200ms
READY
VITE NOT READY, WILL TRY AGAIN IN 200ms
VITE NOT READY, WILL TRY AGAIN IN 200ms
VITE NOT READY, WILL TRY AGAIN IN 200ms
VITE NOT READY, WILL TRY AGAIN IN 200ms"

in my console and the desktop app reload continuos, why ?

postcss.plugin was deprecated.

I get the following warning when I start the dev server:

postcss.plugin was deprecated. Migration guide:
https://evilmartians.com/chronicles/postcss-8-plugin-migration

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.