Skip to content

Commit

Permalink
fix(ts-transform-paths): watch, #12
Browse files Browse the repository at this point in the history
  • Loading branch information
Marty Mcfly committed Apr 9, 2019
1 parent ea465cf commit 9f3cc5c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/ts-transform-paths/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ function importPathVisitor(
nodeToFix = arg
} else if (ts.isImportDeclaration(node) || ts.isExportDeclaration(node)) {
if (!node.moduleSpecifier) return
importValue = node.moduleSpecifier.getFullText()
// do not use getFullText() here, bug in watch mode, https://github.com/zerkalica/zerollup/issues/12
importValue = `"${(node.moduleSpecifier as unknown as {text: string}).text}"`
nodeToFix = node.moduleSpecifier
} else if (ts.isImportTypeNode(node)) {
importValue = `"${(node.argument as any).literal.text}"`
Expand Down

0 comments on commit 9f3cc5c

Please sign in to comment.