steelbrain / pundle

👾 peaceful bundles - js bundler, built from the ground up for speed and extensibility
358 stars 23 forks source link

pundle-typescript doesn't report type errors #81

Open appsforartists opened 8 years ago

appsforartists commented 8 years ago

According to https://github.com/Microsoft/TypeScript/issues/4864, the simple transpileModule function in the TypeScript compiler only reports syntax errors (which is what babylon gives you anyway). For real errors, we'd need something more sophisticated, likely using language services to watch the filesystem. pundle is already using chokidar for watching.

TBD:

steelbrain commented 8 years ago

That's actually a very good idea for the v2 struct. Thank You

steelbrain commented 8 years ago

Note to self This has now been fixed in the v2 struct by allowing all components to specify a activate() and dispose(). In theory a pundle-loader-typescript should be able to setup it's watchers on activate(), report any errors it sees on this.report(error) and when all compilation/watching is done, it can just dispose the watcher on disposes()