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

breaking: svelte-preprocess 6 #640

Merged
merged 12 commits into from
Jun 12, 2024
Prev Previous commit
Next Next commit
fix: allow TS filename to be undefined
fixes #488
dummdidumm committed Jun 12, 2024

Unverified

This user has not yet uploaded their public signing key.
commit f1424a24db5dff4fe726734d1095cdea311f239a
4 changes: 1 addition & 3 deletions src/transformers/typescript.ts
Original file line number Diff line number Diff line change
@@ -203,13 +203,11 @@ let warned_mixed = false;

const transformer: Transformer<Options.Typescript> = async ({
content,
filename,
filename = 'input.svelte',
options = {},
}) => {
const basePath = process.cwd();

if (filename == null) return { code: content };

filename = isAbsolute(filename) ? filename : resolve(basePath, filename);

const compilerOptions = getCompilerOptions({ filename, options, basePath });