question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Additional arguments when executing vite are lost

See original GitHub issue

When executing yarn vite with custom parameters, these are lost. Looking at the source code, electron is only launched with --no-sandbox.

https://github.com/electron-vite/vite-plugin-electron/blob/949fd99df8b528de817f38c5a131b081be879c85/packages/electron/src/serve.ts#L125

Is there a way to pass custom arguments to the electron application?

I want to be able to launch vite with: yarn vite -f ~/path/to/file

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5

github_iconTop GitHub Comments

0reactions
caoxiemeihaocommented, Sep 10, 2022

That works in dev mode, but it runs the app when building it, and the arguments are still lost in the packaged version.

About arguments, you can see 👉 https://www.electronjs.org/docs/latest/api/command-line#commandlineappendargumentvalue

image
Read more comments on GitHub >

github_iconTop Results From Across the Web

[proxy] Missing query parameters when Accept header is ...
Describe the bug I'm using a pretty simple proxy configuration with vite: const devBackend = 'http://localhost:8090' ... server: { port: ...
Read more >
Building for Production - Vite
When it is time to deploy your app for production, simply run the vite build command. By default, it uses <root>/index.html as the...
Read more >
Npm not running in terminal vite - Stack Overflow
Goto you project directory by cd your-project-name . run npm run dev command and try ... How to resolve npm run dev missing...
Read more >
SyntaxError: missing ) after argument list - JavaScript | MDN
There is an error with how a function is called. This might be a typo, a missing operator, or an unescaped string, for...
Read more >
How To Handle Command-line Arguments in Node.js Scripts
Command-line arguments are a way to provide additional input for ... At the very least, a script that's run without any arguments will...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found