ignore .css files when building route manifest - #4185
ignore .css files when building route manifest - #4185Rich-Harris wants to merge 1 commit intomasterfrom
Conversation
🦋 Changeset detectedLatest commit: ecfd337 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
I'm not sure where the line is between stuff that should happen in the default https://kit.svelte.dev/docs/configuration#routes function vs stuff that should be stripped out in a separate step. |
|
What happens to file types besides |
|
If we include rather than exclude, then we need a way to make it extensible to handle edge cases like
no, they will always belong in |
|
Should I ask if we also need to exclude image files? I have a feeling we'll need a config option either way whether it's to add stuff like |
|
Just my two cents as another possible avenue, we could tidy up the error to say "hey, that .css file doesn't belong under routes/, consider static/ or somewhere outside routes/ if you want to import it" The route manifest and this directory are doing a lot of heavy lifting, and it wasn't obvious from the outset that I was interfering with it - in retrospect, it makes sense why this broke, and I think noping this use case doesn't detract from the developer experience I'd like to think that could also reduce collateral continuing to implement advanced features (looking at you, shadow endpoints) with this directory |
|
Opened #4197 as a possible alternative |
|
Closing this in favour of #4197 |
fixes #3997. I think we can punt on the question of whether we want to treat all
.js/.tsfiles similarly — I think the.csscase is fairly unambiguous. If we decide to make it more expansive in future,.cssfiles would be included in that, so this is forward-compatiblethen again this could be a can of worms if people start asking about
.scssand what-have-you...Please don't delete this checklist! Before submitting the PR, please make sure you do the following:
Tests
pnpm testand lint the project withpnpm lintandpnpm checkChangesets
pnpx changesetand following the prompts. All changesets should bepatchuntil SvelteKit 1.0