-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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
Dynamic Imports: Dynamic Origin Option (CORS) #11105
Conversation
ead3599
to
f302c96
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, I just suggested a small adjustment and also we need a PR against the docs documenting these options, ok? Link the Docs PR here as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since Meteor supports browsers that don't support const & let and this package's code doesn't get transpiled. You should stick to var.
f302c96
to
3cc48f6
Compare
6b46c82
to
00ac165
Compare
@leonardoventurini is this ready to be merged? If so please remove WIP label 😉 |
Sorry I completely forgot about this, I believe it is ready but I will double-check if I have anything pending. |
This works like a charm. After 2 years, I can finally remove my |
When setting "useLocationOrigin: true" and also using a root url like ROOT_URL=http://host:port/mypath , dynamic-import will ignore "mypath" when fetching for files to be imported, resulting in a 404 for these files. To bypass this problem, i changed the code to prepend the "mypath" to the module's URL, before trying to fetch it. Related to meteor#11105.
Add the option for
dynamic-imports
to fetch from the current origin instead of the absolute URL.