Skip to content

Dynamic import compiled to dynamic import + static import which hurts code splition #6663

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

Closed
3 of 5 tasks
hackwaly opened this issue Mar 3, 2024 · 5 comments · Fixed by #6664
Closed
3 of 5 tasks
Assignees

Comments

@hackwaly
Copy link

hackwaly commented Mar 3, 2024

Thank you for filing! Check list:

  • Is it a bug? Usage questions should often be asked in the forum instead.
  • Concise, focused, friendly issue title & description.
  • A minimal, reproducible example.
  • OS and browser versions, if relevant.
  • Is it already fixed in master? Instructions
image image image
@zth
Copy link
Collaborator

zth commented Mar 3, 2024

Please set up a minimal reproduction.

@hackwaly
Copy link
Author

hackwaly commented Mar 3, 2024

Wait. I'm constructing it.

@hackwaly
Copy link
Author

hackwaly commented Mar 3, 2024

updated with a minimal reproduction.

@zth
Copy link
Collaborator

zth commented Mar 3, 2024

Cc @mununki

@mununki mununki self-assigned this Mar 4, 2024
@mununki
Copy link
Member

mununki commented Mar 4, 2024

Here is the self-contained example:

@module("lib")
external make: string = "default"

let _ = Js.import(make)
import Lib from "lib"; // shouldn't be here.

import("lib").then(function (m) {
      return m.default;
    });

I'll look into it.

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 a pull request may close this issue.

3 participants