Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: prioritize local alias resolution above polyfill #414

Merged
merged 3 commits into from
Jan 25, 2023

Conversation

louisgv
Copy link
Contributor

@louisgv louisgv commented Jan 23, 2023

Details

This PR parse the alias list upfront in our custom resolver and short-circuit the parcel resolver default polyfill. This allows us to easily patch packages via alias, with TS!

It also bypass the ESM resolver on Parcel'end with the node resolver, allow known ESM module to just work.

Code of Conduct

@louisgv louisgv self-assigned this Jan 23, 2023
@@ -0,0 +1,26 @@
import { resolve } from "path"

import { isFileOk } from "@plasmo/utils/fs"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

update

@louisgv louisgv merged commit f6e042e into main Jan 25, 2023
@louisgv louisgv deleted the feat-prioritize-alias branch January 25, 2023 01:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants