Skip to content

Resolve plugin ts-node relative to tstl instead of relative to tsconfig#1175

Merged
Perryvw merged 1 commit intomasterfrom
plugin-ts-node
Nov 28, 2021
Merged

Resolve plugin ts-node relative to tstl instead of relative to tsconfig#1175
Perryvw merged 1 commit intomasterfrom
plugin-ts-node

Conversation

@Perryvw
Copy link
Copy Markdown
Member

@Perryvw Perryvw commented Nov 28, 2021

Consider the following directory structure:

A/
  node_modules/
    ts-node/
    typescript-to-lua/
  plugin.ts
B/
  tsconfig.json

B/tsconfig.json contains a reference ../A/plugin.ts.

Before this change, running npx tstl -p ../B/tsconfig.json would correctly resolve node_modules/typescript-to-lua, then correctly resolve plugin.ts, but then claim ts-node is not installed, even though it is right there in node_modules/ts-node.

This change makes tstl try to resolve ts-node relative to tstl's location, rather than relative to the location of whatever is being translated.

@Perryvw Perryvw merged commit 9d9baa7 into master Nov 28, 2021
@Perryvw Perryvw deleted the plugin-ts-node branch November 28, 2021 20:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants