Skip to content

Commit

Permalink
release
Browse files Browse the repository at this point in the history
fix: source map generation (#40)
  • Loading branch information
sahinvardar authored Dec 16, 2024
2 parents 89e9cfc + a73bdbd commit 5179918
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/i18n-preprocessor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,14 @@ export const i18nProcessor = (options?: I18nProcessorOptions): PreprocessorGroup
const code = await formatSvelte(printAst(root, options?.indent));
return { code };
});
},
/**
* We need this passthrough so that the svelte compiler generates
* the right source maps for debugging purposes.
* @see https://github.com/sveltejs/svelte/blob/bbf38291fcd860319c7eb225f3f942188c1d97bd/packages/svelte/src/compiler/preprocess/index.js#L357
*/
async script({ content }) {
return { code: content };
}
};
};

0 comments on commit 5179918

Please sign in to comment.