feat: add support for svelte config ts/mts files#3009
Conversation
🦋 Changeset detectedLatest commit: 3b8013f The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
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 |
|
|
|
Sorry, never mind, I misunderstood what you meant. I think we also don't need to add the flag when the |
|
@jasonlyu123 I believe I addressed your comments in the latest commit. When you have a sec, could you take another look? |
jasonlyu123
left a comment
There was a problem hiding this comment.
Found that Node.js has an API for checking if --experimental-strip-types is enabled. Can add a check to the configLoader to load ts files if it's enabled.
const loadSvelteConfigTs = 'typescript' in process.features && !!process.features.typescript|
@jasonlyu123 Not quite sure I'm following where you're wanting |
Fixes #2834
This is a follow-up to #2804 that was closed for some reason. It'd be great to get this in because I think it's the last blocker to being able to fully adopt
svelte.config.tsfiles in a project. The only adjustment I made was adding @jrmajor's recommendation to remove the flag for Node 22.18 because it was enabled by default on that release