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

Add the note about port option for neu run when enabling HMR #357

Open
alexamy opened this issue Sep 19, 2024 · 0 comments
Open

Add the note about port option for neu run when enabling HMR #357

alexamy opened this issue Sep 19, 2024 · 0 comments

Comments

@alexamy
Copy link

alexamy commented Sep 19, 2024

Documentation page

https://neutralino.js.org/docs/getting-started/using-frontend-libraries#enabling-hot-reload-and-configuration

Problem

When using the patchFile option to provide an HTML file for patching in neu configuration, each time you run the neu run command, the port number in the script tag changes to a different one. If the HTML page is version-controlled in Git, there's a risk of accidentally committing this change. The problematic line is:

<script src="http://localhost:44913/__neutralino_globals.js"></script>

Solution

Add the note about using of the --port command line option when running neu run. Setting a constant port number prevents changes to the port in index.html file. For example:

neu run -- --port=44913
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant