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

npm run build does not export the actual app #1

Open
amsyarzero opened this issue Jan 21, 2025 · 1 comment
Open

npm run build does not export the actual app #1

amsyarzero opened this issue Jan 21, 2025 · 1 comment

Comments

@amsyarzero
Copy link

amsyarzero commented Jan 21, 2025

Description

This was previously discussed inside the Neutralinojs Discord, but to sum it up: running npm run build does not export the actual app. Instead, it exports a Neutralinojs template app.

Steps to recreate

  1. Run neu create app_name --template OrigamingWasTaken/neutralino-svelte
  2. cd into the project and run npm install
  3. Run npm run dev to verify custom app
  4. Run npm run build

Screenshots

What is expected (from npm run dev)

Image

What is generated from npm run build

Image

@amsyarzero
Copy link
Author

After delving more into the issue, I noticed this:

  1. Running the original build command from Neutralinojs a.k.a. neu build generates correct executables + a resources.neu file (as stated in the docs), however there is a problem with CSS for light and dark. This is how it looks like in light mode.

image

This is also after removing light-dark related colors in src/app.css.

  1. In scripts/build/ts/index.ts, from what I understand, it's removing dist/ and .tmpbuild/ folder, then builds, then removes it again, then finally exports executables to dist/. The problem is when it tries to build, it doesn't generate any resources.neu at all, which makes the app default to the base app.

For example, in scripts/build/ts/win-bundle.ts, which is called in index.ts:

const neuResources = path.resolve('dist', neuConfig.cli.binaryName, 'resources.neu');
		if (!fs.existsSync(neuResources)) {
			l.fatal("No 'resources.neu' file was not found in the ./dist directory");
			return;
		}

this error never triggers despite the fact that no resources.neu is generated.

then again, I may be completely wrong; I'm still trying to understand this template as a whole.

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