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

Fix JavaScript dependencies in bundles. #4215

Merged
merged 1 commit into from
Mar 2, 2020

Conversation

kitsonk
Copy link
Contributor

@kitsonk kitsonk commented Mar 2, 2020

Ref #4206

We turned off allowJs by default, to keep the compiler from grabbing a bunch of files that it wouldn't actually do anything useful with. On the other hand, this caused problems with bundles, where the compiler needs to gather all the dependencies, including JavaScript ones. This PR fixes this so that when we are bundling, we analyse JavaScript imports in the compiler.

Fixes denoland#4602

We turned off `allowJs` by default, to keep the compiler from grabbing
a bunch of files that it wouldn't actually do anything useful with.  On
the other hand, this caused problems with bundles, where the compiler
needs to gather all the dependencies, including JavaScript ones.  This
fixes this so that when we are bundling, we analyse JavaScript imports
in the compiler.
@ry
Copy link
Member

ry commented Mar 2, 2020

In #4206 they mention the http server example, which contains a for-await loop. Would this patch also make for-await bundles work? If not please change "Fixes #4206" to "Ref #4206".

@ry
Copy link
Member

ry commented Mar 2, 2020

Looks good otherwise - I confirmed that the new bundle_js test fails without this patch.

@kitsonk
Copy link
Contributor Author

kitsonk commented Mar 2, 2020

Ok, #4206 is overloaded. The reproducible mentioned in this comment #4206 (comment) is fixed, and the rest of it is a duplicate of #4207 which was opened as a seperate issue. So this does close #4206 while #4207 remains open.

Copy link
Member

@ry ry left a comment

Choose a reason for hiding this comment

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

LGTM

@bartlomieju bartlomieju merged commit 83d902a into denoland:master Mar 2, 2020
bartlomieju pushed a commit to bartlomieju/deno that referenced this pull request Mar 3, 2020
Fixes denoland#4602

We turned off `allowJs` by default, to keep the compiler from grabbing
a bunch of files that it wouldn't actually do anything useful with.  On
the other hand, this caused problems with bundles, where the compiler
needs to gather all the dependencies, including JavaScript ones.  This
fixes this so that when we are bundling, we analyse JavaScript imports
in the compiler.
mhvsa pushed a commit to mhvsa/deno that referenced this pull request Mar 6, 2020
Fixes denoland#4602

We turned off `allowJs` by default, to keep the compiler from grabbing
a bunch of files that it wouldn't actually do anything useful with.  On
the other hand, this caused problems with bundles, where the compiler
needs to gather all the dependencies, including JavaScript ones.  This
fixes this so that when we are bundling, we analyse JavaScript imports
in the compiler.
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.

None yet

3 participants