-
Notifications
You must be signed in to change notification settings - Fork 24
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
Inconsistent __moduleRoot__ prefix in importMap #64
Comments
As far as I know, __moduleRoot__ only comes into play when a module specifier appears in the configured import map. The original use case for import map support in jasmine-browser-runner was to load library code that lives outside the normal source directory, for example in node_modules. My best guess from what you've told me is that you have modules in the src directory that are also listed in the import map. If that's the case, try removing them from the import map. |
You are right. I am importing with a id prefix ( |
Thanks for the clarification.
I think that makes sense. |
The importMap property is provided by the user. So my solution is to detect if a resulting path will be available in one of the path. |
While working with module I found that often the module path get a prefix
__moduleRoot__
but not always (yeah some/all are resulting from my #60 ).This issue is, that the files are executed twice when loaded via both
srcDir
andimport
because of the different paths.@sgravrock
May I ask why
__moduleRoot__
was added?I would have expected that module files from
srcDir
will get__src__
and modules fromspecFiles
/helpers
will get__spec__
.I could create a PR with such a change, but wanted to have your OK or your opinion on this.
As this is an internal implementation detail (the prefix is added into sourcemap, too) I do not see a compatibility issue.
The text was updated successfully, but these errors were encountered: