Open
Description
Describe the problem
There are times when we need to exclude files from compilation. Here's some examples:
- An app might not have some routes in the PWA build, like
/admin
, but it might have them in the SSR build - Some files can be problematic during compilations, like
+page.server.ts
At the moment, these files have to be manually removed before the build then put back afterwards. It's cumbersome.
Describe the proposed solution
In svelte.config.js
, define a function that acts as a filter to source code files so we can ignore some files.
Alternatives considered
Right now, if you want to ignore some files, you have to straight up delete them.
find src/routes -name '+*.server.*' -delete
pnpm build
http-server ./build
git checkout -- 'src/routes/+*.server.*'
Importance
would make my life easier