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

Exclude pages from build #7193

Open
ivarlovlie opened this issue Oct 9, 2022 · 3 comments
Open

Exclude pages from build #7193

ivarlovlie opened this issue Oct 9, 2022 · 3 comments
Labels
feature / enhancement New feature or request
Milestone

Comments

@ivarlovlie
Copy link

ivarlovlie commented Oct 9, 2022

Describe the problem

I have some devonly pages that I use to showcase project components and do general testing with.
I use

export const ssr = import.meta.env.DEV;
export const csr = import.meta.env.DEV;

to hide them from public view, but from my build output it seems that they still get built.
I haven't found a way for the pages to be excluded from the build.

Describe the proposed solution

Being able to exclude pages/layout groups from the build output with something like

export const exclude = true;

would be very nice.

Alternatives considered

No response

Importance

nice to have

Additional Information

Thank you for your consideration.

@dummdidumm
Copy link
Member

Somewhat related to #7183, which would profit from the same but for endpoints.

@dummdidumm dummdidumm added the feature / enhancement New feature or request label Oct 10, 2022
@dummdidumm dummdidumm added this to the whenever milestone Oct 10, 2022
@ivarlovlie
Copy link
Author

ivarlovlie commented Oct 11, 2022

Although this hasn't been discussed yet, i would like to propose

export const ssr = false;
export const csr = false;
export const prerender = false;

as an alternative to adding a new "exclude" prop.
As a novice sveltekit user, these exports would tell me that the page would not need to be included/rendered at all.

@bartvdbraak
Copy link

Has there been any progress on this to exclude pages on production?

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

No branches or pull requests

3 participants