Skip to content

Commit

Permalink
feat(jsx): provide locator hints while debugging jsx
Browse files Browse the repository at this point in the history
  • Loading branch information
pavelfeldman committed Feb 17, 2022
1 parent 108ace3 commit 6384d17
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"runtimeExecutable": "${execPath}",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}",
"${workspaceFolder}/../playwright/examples/todomvc"
"${workspaceFolder}/../playwright"
],
"outFiles": [
"${workspaceFolder}/out/*.js"
Expand Down
2 changes: 1 addition & 1 deletion src/babelHighlightUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export function locatorForSourcePosition(text: string, vars: { pages: string[],
const cached = astCache.get(fsPath);
let ast = cached?.ast;
if (!cached || cached.text !== text) {
ast = parse(text, { errorRecovery: true, plugins: ['typescript'], sourceType: 'module' });
ast = parse(text, { errorRecovery: true, plugins: ['typescript', 'jsx'], sourceType: 'module' });
astCache.set(fsPath, { text, ast });
}

Expand Down

0 comments on commit 6384d17

Please sign in to comment.