Skip to content

v3.0.0

Compare
Choose a tag to compare
@nonara nonara released this 16 Jun 20:51
· 88 commits to master since this release

Notes

We did a total overhaul on the module resolution code. There should be no breaking changes, but since we're dealing with the compiler API and have integrated a few new pieces of that, we're bumping the major version to be safe.

The reason behind the rewrite is because there were several issues which could arise from implicit indexes. One rather complicated scenario arose when trying to point to a sub-package (outside of node-modules) which had a main entry in package.json. This entry could point to a sub-folder of the main, which made relative mapping and removing indexes difficult. Several other related bugs had been cropping up.

On top of this, the plugin originally resolved and rewrote every call to import, require, etc. We've managed to replicate the compiler's paths matching logic in order to only process and rewrite calls or statements which either match a paths entry or have an explicit tag. This should speed up the process, and it is better logic, overall.

If you experience any issues, let us know!

Changes

  • Several improvements were made for speed and efficiency.
  • Now accommodating for new TS empty baseURL provision (closes #109)
  • Pre-checking necessity before overwriting paths (closes #110)
  • Rewrote core resolution methodology to:
    • Properly handle implicit indexes (closes #106)
    • Properly handle implicit sub-package indexes set via package.json 'main' #108)
    • Not follow symlinks (#107)
    • Resolve from output path as opposed to SourceFile path (#103)