Skip to content

Fix missing files #7

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

Merged
merged 4 commits into from
Oct 22, 2021
Merged

Fix missing files #7

merged 4 commits into from
Oct 22, 2021

Conversation

code-asher
Copy link
Member

@code-asher code-asher commented Oct 21, 2021

Before:
error

After:
fixed

As near as I can gather it goes something like this:

  1. Optimizer traverses imports and adds the code to the bundle
  2. Optimizer excludes files in the resources array
  3. When the optimizer excludes a file it also excludes all of that file's imports (and so on)
  4. As a result if a bundle imports file A which is not in the resources array but is imported by another file B which is in the resources array it will 404 because file A is not bundled due to being excluded and not copied since it was not in the resources array.

We cannot put all files into the resources array to fix this either because as we previously discovered that results in the multiple top-level define error (when nothing is bundled the bundler appears to generate an invalid bundle; the output is completely different). And we want bundles anyway since they will provide a faster experience.

@GirlBossRush GirlBossRush merged commit 3fc8859 into coder:code-server Oct 22, 2021
@code-asher code-asher deleted the fix-build branch October 25, 2021 16:19
@code-asher code-asher restored the fix-build branch November 3, 2021 19:43
@code-asher code-asher deleted the fix-build branch November 3, 2021 19:55
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