Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Relative imports are treated as external on Windows #87

Closed
gevalo1 opened this issue May 6, 2019 · 2 comments · Fixed by #89
Closed

Relative imports are treated as external on Windows #87

gevalo1 opened this issue May 6, 2019 · 2 comments · Fixed by #89
Labels
kind: bug Something isn't working topic: TS Paths Aliases Related to using aliases with TypeScript paths

Comments

@gevalo1
Copy link

gevalo1 commented May 6, 2019

Current Behavior

My code isn't getting bundled because tsdx treats everything as external modules, the resulting bundle only contains the compiled index.ts file.

Expected behavior

My files shouldn't be treated as external modules.

Suggested solution(s)

Could it be something related to the external function? https://github.com/palmerhq/tsdx/blob/v0.5.7/src/utils.ts#L19

Additional context

I'm getting the following warning for all my .ts files (except the root index.ts file):

No name was provided for external module 'C:/xyz/xyz/xyz/xyz.ts' in output.globals – guessing 'xyz_ts'

Your environment

Software Version(s)
TSDX 0.5.7
TypeScript 3.4.5
Browser Chrome Version 74.0.3729.131
npm/Yarn Node v10.11.0, npm 6.4.1
Operating System Windows 10
@a-type
Copy link
Contributor

a-type commented May 8, 2019

Looks like a Windows problem, I'm experiencing it too.

My recommendation would be to use path.isAbsolute to avoid platform inconsistencies.

@a-type
Copy link
Contributor

a-type commented May 9, 2019

@jaredpalmer version v0.5.8 published on NPM doesn't appear to include this change in the distributed code.

@agilgur5 agilgur5 changed the title No name was provided for external module Relative imports are treated as external on Windows Mar 20, 2020
@agilgur5 agilgur5 added kind: bug Something isn't working topic: TS Paths Aliases Related to using aliases with TypeScript paths labels Mar 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: bug Something isn't working topic: TS Paths Aliases Related to using aliases with TypeScript paths
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants