hydrogen
hydrogen copied to clipboard
npm run dev does not generate worker sourcemaps
What is the location of your example repository?
https://github.com/Shopify/hydrogen/tree/main/templates/demo-store
Which package or tool is having this issue?
CLI
What version of that package or tool are you using?
5.4.0
What version of Remix are you using?
1.19.1
Steps to Reproduce
-
Create a new hydrogen app:
npm create @shopify/hydrogen@latest -
Create a vscode launch configuration for npm run dev (
.vscode/launch.json):
{
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Launch npm run dev",
"runtimeExecutable": "npm",
"runtimeArgs": ["run-script", "dev"],
"restart": true,
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
"skipFiles": ["<node_internals>/**"],
"timeout": 30000
},
]
}
-
Set a breakpoint in some loader (example: root.tsx).
-
Start debugging.
-
A warning will show in the breakpoints section complaining about breakpoints could not be set:
❓ We couldn't find a corresponding source location, and didn't find any source with the name root.tsx
Launching with npm run dev -- --sourcemap has the same result
Expected Behavior
Sourcemaps for workers should be generated in dev. This was working until cli 5.1.2.
Actual Behavior
Sourcemaps are not generated (or some other issue prevents setting breakpoints).