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

extension! esm setting should support defining a specifier #2

Closed
bartlomieju opened this issue Jul 1, 2023 · 1 comment
Closed

Comments

@bartlomieju
Copy link
Member

Currently esm property in extension! macro support syntax like:

  esm = [
    dir "polyfills",
    "00_globals.js",
    "02_init.js",
    "_brotli.js",
  ]

This creates a specifier like ext:<extension_name>/<dir>/<module_name>. In some cases we want to be able to explicitly set the extension for a module, @mmastrac suggests syntax like:

  esm = [
    dir "polyfills",
    "00_globals.js",
    "02_init.js",
    "_brotli.js",
    "foo.js" as "node:foo" 
  ]
@bartlomieju
Copy link
Member Author

Actually I'm not sure this is worth it, the current solution with two separate fields (esm and esm_with_specifiers) works fine and seems less confusing. Closing for now.

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

No branches or pull requests

1 participant