-
Notifications
You must be signed in to change notification settings - Fork 921
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
[wip] support aliases #237
[wip] support aliases #237
Conversation
This looks great, thanks Chris! Will do a deeper review of the code asap. Looks like |
de27b90
to
0bb4063
Compare
current problems: It seems like rollup needs some way to track For reference, after installing
|
Take a look at https://github.com/rollup/plugins/tree/master/packages/alias. At best, you can leverage this Rollup plugin directly, but at worse there might still be something useful in the codebase to borrow from. |
alias plugin seems to be working locally. Just have to do some tests+fixes now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This lgtm, once you figure out broken tests.
The interface may need to change a bit after this, if you don't mind carrying that conversation forward into #236. But overall very +1 on supporting this in some way into the future.
src/index.ts
Outdated
@@ -223,6 +224,7 @@ export async function install( | |||
{hasBrowserlistConfig, isExplicit, lockfile}: InstallOptions, | |||
config: SnowpackConfig, | |||
) { | |||
// throw new Error('typescript sucks'); // @ts-ignore |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lol assuming we can get rid of this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lol whooooops, thanks for the catch
For the broken tests, have you tried rebasing onto master yet? |
Rebasing fixed the original |
left a comment on #236 about maybe moving to an object and a separate |
Feel free to close, if #249 is the new way forward |
err, closing because I think I know the answer. but feel free to comment to reopen |
This adds support for
webDependencies
alias support. For example, we can aliasreact
topreact/compat
.I still need to get some local tests passing and go back over the code to make sure it's doing what I think it is.
TODO: