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

feat: ES Module prototype #15

Merged
merged 7 commits into from
Apr 5, 2021
Merged

feat: ES Module prototype #15

merged 7 commits into from
Apr 5, 2021

Conversation

iamnewton
Copy link
Contributor

@iamnewton iamnewton commented Mar 31, 2021

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 and decision_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


Fixes: #13

@iamnewton iamnewton added the prototype A working model to test out theories label Mar 31, 2021
@iamnewton iamnewton added this to the Prototypes milestone Mar 31, 2021
@iamnewton iamnewton requested a review from brodrigu March 31, 2021 19:11
@iamnewton iamnewton self-assigned this Mar 31, 2021
<!doctype html>
<html>
<head>
<link rel="modulepreload" href="./scripts/tag.js" />
Copy link
Contributor Author

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.

Copy link
Member

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?

@iamnewton iamnewton mentioned this pull request Mar 31, 2021
4 tasks
Copy link
Member

@brodrigu brodrigu left a 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.

@iamnewton iamnewton requested a review from brodrigu March 31, 2021 23:04
@iamnewton
Copy link
Contributor Author

@brodrigu added in a new example to showcase a basic unrealistic example of the auction; can you look again?

@brodrigu
Copy link
Member

brodrigu commented Apr 5, 2021

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).

@iamnewton
Copy link
Contributor Author

I still think we need to explore dynamically including a module […]

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.

possible multiple modules exposing the same function names just for clarity (though I suspect it will work).

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?

Copy link
Member

@brodrigu brodrigu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@brodrigu brodrigu merged commit 7130bc6 into prototypes Apr 5, 2021
@brodrigu brodrigu deleted the es-modules branch April 5, 2021 20:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
prototype A working model to test out theories
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create prototype for bidding_logic_url & decision_logic_url ES Modules exposure
2 participants