Skip to content

Commit

Permalink
fix dependency sourcemap issue
Browse files Browse the repository at this point in the history
  • Loading branch information
FredKSchott committed Sep 28, 2020
1 parent d2a046a commit bcc1fbc
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions snowpack/src/commands/dev.ts
Original file line number Diff line number Diff line change
Expand Up @@ -452,11 +452,12 @@ export async function startServer(commandOptions: CommandOptions) {

async function getFileFromUrl(reqPath: string): Promise<string | null> {
if (reqPath.startsWith(config.buildOptions.webModulesUrl)) {
const fileLoc = await attemptLoadFile(
reqPath.replace(config.buildOptions.webModulesUrl, DEV_DEPENDENCIES_DIR),
);
if (fileLoc) {
return fileLoc;
const dependencyFileLoc =
reqPath.replace(config.buildOptions.webModulesUrl, DEV_DEPENDENCIES_DIR) +
(isSourceMap ? '.map' : '');
const foundFile = await attemptLoadFile(dependencyFileLoc);
if (foundFile) {
return foundFile;
}
}
for (const [dirDisk, dirUrl] of mountedDirectories) {
Expand Down

1 comment on commit bcc1fbc

@vercel
Copy link

@vercel vercel bot commented on bcc1fbc Sep 28, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.