-
Notifications
You must be signed in to change notification settings - Fork 361
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
chore: splitting off lib-franklin.js #125
Conversation
|
|
|
|
|
|
|
|
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.
I would use some versioning on the lib-helix.js
otherwise we get a huge mess.
at some point, it would be better to distribute this as npm...otherwise the machinery to build automated PRs against the customers project is huge. I'd rather delegate this to renovate :-)
What would then be the recommended approach to include the npm library in a hlx project ? Import via eg https://www.jsdelivr.com/ ? Or via tooling + locally installed node_modules ? Or would hlx provide its own solution for importing the library from npm ? |
I'm wondering what that mess would look like. And which solution would lead to a greater mess (read: upgrade effort)... For example, how would we handle the |
Importing client-side from a diferent host is a no-go for performance reasons (the mobile lighthouse score only allows for a single TLS handshake). So the only viable option would to add it to the |
and
It also could be hosted on a central CDN, even multipe versions and made available to the project via an internal redirect. Calls will be to customers domain, but it is provied from a central place. |
It would be magically awsome if hlx would auto-detect npm imports in the project and make them available on the CDN eg
|
I will preface my comments by saying that this is draft PR and that I may not be fully in the loop on what David planned for the PR. So please disregard if my comments are a little early ;)
I would second this for the following reasons
I think option 2 you outlined is the right approach as 3rd party cloud bundlers will have performance issues from what I have seen. So like you said something around
If we keep the name of the
I think we can cover this with the franklin cli and not have to introduce a build step or bundler.
This could be interesting if it was something delivered by helix and we can figure out how to deliver it via same origin. One problem with this approach though is the developer experience. You lose all code hinting/completion and you can't right click on a function if you wanted to view the source. In general I still feel like what is in |
|
|
|
|
Co-authored-by: Raphael Wegmueller <[email protected]>
|
Co-authored-by: Tobias Bocanegra <[email protected]>
|
Co-authored-by: Tobias Bocanegra <[email protected]>
|
thanks to @tripodsan @rofe @dylandepass for their detailed review and thoughtful comments. i really appreciate the rigor and attention to detail. i guess that leaves us with the naming quandary... |
Co-authored-by: Tobias Bocanegra <[email protected]>
|
Co-authored-by: Tobias Bocanegra <[email protected]>
|
Co-authored-by: Tobias Bocanegra <[email protected]>
|
Co-authored-by: Tobias Bocanegra <[email protected]>
|
|
|
thanks @kptdobe for splitting the tests... exciting. |
I initially wanted to write more tests as part of this PR but I changed my mind. We should first do the split and if it gets merged, add more test (if we decide to not do the split and tests are in the PR, it is the mess). |
Regarding our delivery options: we have been delivering NPM libraries from and so the machinery to deliver is already there and would require only minimal tweaking of the allow-list: The one remaining thing would be to include the |
|
Feature/component creation
https://main--helix-project-boilerplate--adobe.hlx.live/
vs.
https://lib-helix--helix-project-boilerplate--adobe.hlx.live/