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

Should rendering runtime module in snapshot testing? #390

Closed
underfin opened this issue Nov 25, 2023 · 1 comment
Closed

Should rendering runtime module in snapshot testing? #390

underfin opened this issue Nov 25, 2023 · 1 comment

Comments

@underfin
Copy link
Contributor

Because the runtime code is larger, snapshotted it is difficult to review, we need to deal it.

The original discuss at #375

@hyf0
Copy link
Member

hyf0 commented Feb 20, 2024

I look up how esbuild did and it just omit the runtime code. We can't follow it due to we need to execute the build output after bundling.

In the test environment, 5e7491e will always pretend that the runtime module belong to a facade entry, which makes him always generate the standalone chunk for the runtime module.

This also test the tree shaking step. import ... from '$runtime#' will easily tell us if we import runtime functions on demand.

Beyond that, the commit also ensures the runtime chunk is created on demand.

I consider that the current solution is in a balanced position, so the issue was closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants