Coder Social home page Coder Social logo

Comments (6)

caoxiemeihao avatar caoxiemeihao commented on August 16, 2024

Put the npm-package into dependencies

from vite-electron-plugin.

Aasim-A avatar Aasim-A commented on August 16, 2024

it's already there.
One thing to add though, I'm using electron-builder and when I disable asar it works and when I view the unpacked folder that electron-builder generated, the package is there under node_modules folder.

from vite-electron-plugin.

caoxiemeihao avatar caoxiemeihao commented on August 16, 2024

Can you provide a minimal reproduction repo?

from vite-electron-plugin.

Aasim-A avatar Aasim-A commented on August 16, 2024

https://github.com/Aasim-A/electron-vite-test

Once you run the executable that was generated, you'll see the error.

from vite-electron-plugin.

Canees avatar Canees commented on August 16, 2024

https://github.com/Aasim-A/electron-vite-test

Once you run the executable that was generated, you'll see the error.

A quick look at your example, first of all vite is not configured correctly, second if you want to bundle dependencies, you can use esbuild alone, and finally, the Vite-electron-plugin doesn't seem to support dynamically loaded packaging, it is only suitable for development mode use.
Refer to the following command:
image
image

from vite-electron-plugin.

caoxiemeihao avatar caoxiemeihao commented on August 16, 2024

vite-electron-plugin does not provide bundle capabilities, it is only applicable to build dependencies in dependencies into app.asar. Maybe vite-plugin-electron is more suitable for you.

from vite-electron-plugin.

Related Issues (20)

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.