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

Turbo build builds every file on each save #542

Open
dekode-kevin opened this issue Nov 22, 2024 · 4 comments
Open

Turbo build builds every file on each save #542

dekode-kevin opened this issue Nov 22, 2024 · 4 comments
Labels
enhancement New feature or request

Comments

@dekode-kevin
Copy link

When saving while running npm run start, instead of just building wherever you are, turbo is building everything.
This is okay in itself but on bigger projects with more assets, the build starts getting very slow.

Example project: Wiersholm

@dekode-kevin dekode-kevin added the enhancement New feature or request label Nov 22, 2024
@stian-overasen
Copy link
Member

stian-overasen commented Nov 22, 2024

Is this related to the image problem you had before @dekode-kevin? Turbo only refreshes the package that is changed, also on npm start. I just tested and verified this. Maybe your config is setup differently?;

{
	"$schema": "https://turbo.build/schema.json",
	"tasks": {
		"build": {
			"dependsOn": ["^build"]
		},
		"start": {
			"cache": false,
			"persistent": true
		},
		"clean": {
			"cache": false
		}
	}
}

@stian-overasen
Copy link
Member

By "everything", do you mean all packages, or is this related to a single package? Is the watch process faster if you navigate into the package and run npm start locally?

@dekode-kevin
Copy link
Author

Sorry, will try to be more specific.

Point is, it doesn't rebuild all packages, but it rebuilds all the files in the package. It is related to the heavy svg on wiersholm.
Build folder looks like this:
image

Changing for example something in view.css or in a block css, will trigger a rebuild of the entire build folder, which makes the build slow.

This is because of one heavy svg, but I do think there must be a way of optimizing this somehow, so when we get other projects that might be bigger in size it shouldn't slow down the development process.

@stian-overasen
Copy link
Member

In that case your beef is with postcss-url, not Turbo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants