Skip to content
This repository has been archived by the owner on May 7, 2020. It is now read-only.

Commit

Permalink
provide filename to preprocessors (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
Axelen123 authored and jamesbirtles committed Jul 11, 2019
1 parent c07f8c5 commit 3b0eaa5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/plugins/SveltePlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export class SveltePlugin implements DiagnosticsProvider, FormattingProvider {
const svelte = importSvelte(document.getFilePath()!) as any;

const preprocessor = makePreprocessor(document as SvelteDocument, config.preprocess);
source = (await svelte.preprocess(source, preprocessor)).toString();
source = (await svelte.preprocess(source, preprocessor, {filename: document.getFilePath()})).toString();
preprocessor.transpiledDocument.setText(source);

let diagnostics: Diagnostic[];
Expand Down

0 comments on commit 3b0eaa5

Please sign in to comment.