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

Configure the extension #16

Open
FluorescentHallucinogen opened this issue Nov 20, 2023 · 4 comments
Open

Configure the extension #16

FluorescentHallucinogen opened this issue Nov 20, 2023 · 4 comments

Comments

@FluorescentHallucinogen
Copy link
Contributor

First of all, thank you very much for such useful extension!

Is it possible to configure it? If so, how? Could you please document this?

How to configure the extension to:

  • use node_modules instead of jspm.io CDN?
  • use esm.sh, unpkg.com instead of jspm.io?
  • not add es-module-shims?
  • not add <!-- Generated by @jspm/generator VSCode Extension - https://github.com/jspm/jspm-vscode --> comment?
@FluorescentHallucinogen
Copy link
Contributor Author

@FluorescentHallucinogen
Copy link
Contributor Author

As far as I understand, there is no any config file for JSPM CLI like .jspmrc. Right?

@guybedford
Copy link
Member

These are excellent points, thanks for putting some thought to this.

In general, JSPM detects configurations from the existing import map file, including handling of whitespace and the provider and environment.

We don't currently define a .jspmrc, but this is something we could introduce for the CLI and extension by supporting it in the generator project.

I tend to agree that might well be the best approach here. Would you be interested in working on this as a feature at https://github.com/jspm/generator?

@FluorescentHallucinogen
Copy link
Contributor Author

I wouldn't mind working on adding support for .jspmrc. But that would require agreeing on the format of that file.

In general, JSPM detects configurations from the existing import map file, including handling of whitespace and the provider and environment.

I think in 50% of the use cases of this extension, the import map isn't there yet. I mean users who are using the VSCode extension to create import map for the first time. :)

I've started working on a pull request for VSCode extension that adds additional prompts to existing ones (which provider to use, whether to use es-module-shims, etc.).

But I'm blocked by #17. @guybedford Could you please take a look?

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

2 participants