Skip to content
This repository was archived by the owner on Dec 1, 2019. It is now read-only.

Fixes issues under windows with typescript 1.6, and moduleResolution flags #65

Merged
merged 2 commits into from
Oct 31, 2015

Conversation

davidmiani
Copy link
Contributor

There were a couple of problems here, fixed over two commits. Firstly, if a moduleResolution option was given in the tsconfig.json file, awesome-typescript would fail to compile any files. This was a problem if you needed "classic" resolution.

The other problem occurred with relative paths. Under windows, some paths weren't being normalized by awesome-typescript-loader, resulting in C:\site\file.ts instead of C:/site/file.ts. When compared, these were found to be not equal. This was fixed by normalizing all paths before they were saved in the State class.

In some places, the windows typescript paths
weren't being normalized, resulting in `C:\site\file.ts` rather than
`C:/site/file.ts`. As the file names were used as keys to find
modules, this resulted in relative modules not being found on
windows.

This was fixed my wrapping the files array in State with methods
that would normalize the incoming path values.

`files` was made private to ensure it wasn't used accidently.
The value "node" or "classic" needed to be converted into the
appropriate enum value, or the error:

    Module build failed: TypeError: Cannot read property 'resolvedModule' of undefined

would occur.
@s-panferov
Copy link
Owner

@davidmiani thanks for your work, it's great! Everything looks quite correct, so I merge it. Please sorry for the delay with the answer.

s-panferov added a commit that referenced this pull request Oct 31, 2015
Fixes issues under windows with typescript 1.6, and moduleResolution flags
@s-panferov s-panferov merged commit d344196 into s-panferov:master Oct 31, 2015
@s-panferov
Copy link
Owner

@davidmiani landed as v0.14.1

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants