This deprecates the default export in favor of the new named export sveltePreprocess. It's done to ensure a better interop between CJS and ESM without resorting to hacks in the future. It also enables people using "module": "NodeNext" in their tsconfig.json to import without type errors. The sub exports were also adjusted so that the transpiled TS output doesn't include __importDefault wrappers, which makes Node's static analysis miss those named exports.
Before submitting the PR, please make sure you do the following
[ ] It's really useful if your PR relates to an outstanding issue, so please reference it in your PR, or create an explanatory one for discussion. In many cases features are absent for a reason.
[x] This message body should clearly illustrate what problems it solves. If there are related issues, remember to reference them.
[ ] Ideally, include a test that fails without this PR but passes with it. PRs will only be merged once they pass CI. (Remember to run pnpm lint!)
This deprecates the default export in favor of the new named export
sveltePreprocess
. It's done to ensure a better interop between CJS and ESM without resorting to hacks in the future. It also enables people using"module": "NodeNext"
in theirtsconfig.json
to import without type errors. The sub exports were also adjusted so that the transpiled TS output doesn't include__importDefault
wrappers, which makes Node's static analysis miss those named exports.Related: https://github.com/sveltejs/svelte-preprocess/issues/591#issuecomment-2166807552
Before submitting the PR, please make sure you do the following
pnpm lint
!)Tests
npm test
orpnpm test