Open chin2km opened 9 months ago
I also encountered the alias problem when building a library when I bumped the minor version of Parcel from 2.7 to 2.12. I tested with several minor versions of Parcel, and this problem started appearing in v2.9.
In case this helps anybody, I worked around this problem by putting the alias resolver when the build target is library. But it will be great to see aliases working for all the targets.
🐛 bug report
After updating to parcel@2.11.0 (from v2.8.3), the alias config in package.json stopped working on the node target.
🎛 Configuration
Created a very lean reproduction with just the alias config in
package.json
Repo: https://github.com/chin2km/parcel-bug-reproduction
🤔 Expected Behavior
The path alias should work on all targets (node and browser)
😯 Current Behavior
Path alias only works on browser target. Node target throws runtime error.
💁 Possible Solution -> 🤷🏻
🔦 Context
Our company (a popular Fashion MarketPlace in the EU) is trying to migrate away from Webpack. We have been beta testing Parcel as a bundler in dev mode and it has been a success. But now we are trying to get out of this beta phase and go all in on Parcel.
💻 Code Sample
Repo: https://github.com/chin2km/parcel-bug-reproduction
🌍 Your Environment