electron-userland / electron-compile

DEPRECATED: Electron supporting package to compile JS and CSS in Electron applications
1.01k stars 97 forks source link

Typescript resolution breaks when resolving files in child folders #217

Closed tiagoroldao closed 7 years ago

tiagoroldao commented 7 years ago

I have the following file structure:

app
| main.ts
| app_page
 | app_page.ts
 | ...
boot.js
package.json

boot.js is my entry point, and it loads main.ts, which then imports both npm modules and local scripts

If app_page.ts is at /app then import {stuff} from './app_page' works just fine. But if app_page.ts is under /app/app_page, an error is thrown:

Error: ENOENT: no such file or directory, lstat '{PATH TO PROJECT}/app/app_page/app_page'

tiagoroldao commented 7 years ago

Turns out it was regular old path problems introduced when refactoring file paths.