Skip to content
This repository has been archived by the owner on Oct 13, 2022. It is now read-only.

pass option sourceMap to sveltePreprocess #299

Merged
merged 2 commits into from
Jan 27, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions scripts/setupTypeScript.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ import typescript from '@rollup/plugin-typescript';
`input: config.serviceworker.input().replace(/\\.js$/, '.ts')`
],
// Add preprocess
[/compilerOptions/g, 'preprocess: sveltePreprocess(),\n\t\t\t\tcompilerOptions'],
[/compilerOptions/g, 'preprocess: sveltePreprocess({ sourceMap: dev }),\n\t\t\t\tcompilerOptions'],
// Add TypeScript
[/commonjs\(\)(?!,\n\s*typescript)/g, 'commonjs(),\n\t\t\ttypescript({ sourceMap: dev })']
]);
Expand Down Expand Up @@ -198,7 +198,7 @@ function updateWebpackConfig() {
// Instead we look for 'hydratable: true,'
[
/hydratable: true(?!,\n\s*preprocess)/g,
'hydratable: true,\n\t\t\t\t\t\t\tpreprocess: sveltePreprocess()'
'hydratable: true,\n\t\t\t\t\t\t\tpreprocess: sveltePreprocess(({ sourceMap: dev })'
],
// Add TypeScript rules for client and server
[
Expand Down