`svelte-package` doesn't include source maps
Open
Nobody has claimed this yet.
pkg:svelte-package
- Dominant language
- JavaScript
- Stars
- 20.8k
- Forks
- 2.3k
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 156
Description
Describe the bug
when running svelte-package, it does not include source maps even when they are enabled in svelte.config.js
Reproduction
// svelte.config.js
import preprocess from 'svelte-preprocess';
const config = {
compilerOptions: {
enableSourcemap: true,
},
preprocess: preprocess({
sourceMap: true,
}),
};
export default config;
Logs
No response
System Info
System:
OS: Windows 10 10.0.19044
CPU: (12) x64 11th Gen Intel(R) Core(TM) i5-11500T @ 1.50GHz
Memory: 672.74 MB / 15.73 GB
Binaries:
Node: 18.10.0 - C:\Program Files\nodejs\node.EXE
npm: 8.19.2 - C:\Program Files\nodejs\npm.CMD
Browsers:
Edge: Spartan (44.19041.1266.0), Chromium (105.0.1343.33)
Internet Explorer: 11.0.19041.1566
Severity
annoyance
Additional Information
the src and the package created by svelte-package:

Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the svelte-package command and trace how the svelte.config.js settings compilerOptions.enableSourcemap and preprocess sourceMap are handled. Reproduce the package build with the supplied configuration, then verify that the generated package contains the expected source maps.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- build-system, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100