You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
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 inpackage.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 apaths
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
main
ortypes
is set in package.json #108)This discussion was created from the release v3.0.0.
Beta Was this translation helpful? Give feedback.
All reactions