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

Commit

Permalink
pass option sourceMap to sveltePreprocess (#299)
Browse files Browse the repository at this point in the history
  • Loading branch information
milahu authored Jan 27, 2021
1 parent de9bd8a commit 837875d
Showing 1 changed file with 2 additions and 2 deletions.
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

0 comments on commit 837875d

Please sign in to comment.