-
Notifications
You must be signed in to change notification settings - Fork 1
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
feat: ES Module prototype #15
Conversation
prototypes/es-modules/index.html
Outdated
<!doctype html> | ||
<html> | ||
<head> | ||
<link rel="modulepreload" href="./scripts/tag.js" /> |
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.
we can optimize performance by preloading the module. This is a new directive that has relatively good support.
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.
should we test injecting this tag using JS to make sure dynamic loading will work?
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.
Looks like this should work. good stuff.
@brodrigu added in a new example to showcase a basic unrealistic example of the auction; can you look again? |
simple auction function looks good, I still think we need to explore dynamically including a module and possible multiple modules exposing the same function names just for clarity (though I suspect it will work). |
Create an issue and we can create a new demo for this. I think the point of this prototype was to create a simple example to prove out that it works. We can certainly create more variations to prove out more.
This sounds like another issue we can create. If you think we should add more to this prototype, then let's create the issues still and assign/link them to this PR. But if not, can you approve and merge this PR and we should still create the issue and open a new PR that adds that functionality? |
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.
☕
The concept here is to showcase that browser support for ES modules is widespread and will work as a mechanism for exposing the functions that come from
bidding_logic_url
anddecision_logic_url
.This shows ES modules working locally and presumably in production, but from the same domain. Here's a cross-domain example.
Resources
ES Modules
modulepreload
modulepreload
modulepreload
modulepreload
Fixes: #13