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

Write import map directly to index.html #64

Closed
AngelMunoz opened this issue Jan 13, 2022 · 1 comment
Closed

Write import map directly to index.html #64

AngelMunoz opened this issue Jan 13, 2022 · 1 comment
Labels
enhancement New feature or request feedback help wanted Extra attention is needed

Comments

@AngelMunoz
Copy link
Owner

Is your feature request related to a problem? Please describe.

I understand that, I'm just wondering if the import map needs to be a file on disk.
Could it not be a part of the perla.jsonc and perla extracts the info and generates an endpoint for it to serve it.
After building you would obviously want to have a separate file.

Describe the solution you'd like
Rather than keeping the import map a separate file we could write it directly into a script node inside the index.html file we actually do that at runtime when serving the index file so we could just skip that part and do it straight in the index file

Describe alternatives you've considered
Keep it as a separate file

Additional context
Since browsers don't support external import maps (even with polyfills) it makes no sense to keep it as a separate file for now but in the eventuality external import maps are enabled we could look to either add support for both situations or revert back.

from AngelMunoz/perla-templates#2

@AngelMunoz AngelMunoz added enhancement New feature or request help wanted Extra attention is needed feedback labels Jan 13, 2022
@AngelMunoz
Copy link
Owner Author

I gave this another shot, I think when we add support for the test command (#75) we will also need a separate import map, I don't think we will be able to support both things without a separate import map

I will close this issue for the moment, and try to come back after that issue is done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request feedback help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant