question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Web Components: Provide CDN version of pre-built bundle with dotcom-shell

See original GitHub issue

The problem

Many of our v18 users want to use our library not requiring heavy toolstack but just with loading .js/.css.

Web Components library tried to meet such requirement with ECMAScript module, but it’s blocked by:

  1. No browser has implemented import maps spec, that is required for browser to understand import { LitElement } from 'lit-element' code (to figure out where lit-element module .js file is)
  2. Some CDNs (e.g. JSPM/UNPKG) tries to make above work by replacing NPM module name with actual CDN path on-the-fly, but it has performance problem by having to load many modules, and tends to hit many glitches

The solution

Create pre-built bundle.

Additional information

  • We can make use of the EI server and upload to there (https://1.s81c.com/common/ibm-dotcom-library/@{version}/**)

Acceptance criteria

  • Create generated bundle that includes the dotcom-shell
  • Publish up to EI server (beta, next and latest)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:13 (13 by maintainers)

github_iconTop GitHub Comments

1reaction
jeffchewcommented, Sep 23, 2020

@asudoh as discussed, if you can open a PR with the build mechanism (rollup), I will hook up the CI part of it.

0reactions
jeffchewcommented, Oct 5, 2020

To catch up on this, a couple of issues were raised to the webmaster team:

  • Create the folder /common/ibm-dotcom-library for us on the production server
  • Open cross origin calls to the akamai server (it is currently only open for www.ibm.com

With this, the pipeline has been built out, but to a temporary folder that our team has access to on the production environment. This story can only be completed up to the release of automated beta releases, as we do not currently have a release candidate or full release with the build script available in the codebase. An additional story will be created to capture the closure of that.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Web Components: Provide CDN version of pre-built bundle ...
Web Components : Provide CDN version of pre-built bundle with dotcom-shell #3980 ... Create generated bundle that includes the dotcom-shell
Read more >
@carbon/ibmdotcom-web-components - npm
Start using @carbon/ibmdotcom-web-components in your project by ... there are pre-built CDN bundles available for each individual component.
Read more >
Web Components - MDN Web Docs - Mozilla
Web Components is a suite of different technologies allowing you to create reusable custom elements — with their functionality encapsulated ...
Read more >
Shadow DOM v1 - Self-Contained Web Components
It introduces scoped styles to the web platform. Without tools or naming conventions, you can bundle CSS with markup, hide implementation ...
Read more >
Awesome Standalone (Web Components) - CSS-Tricks
One thing that I think will push their adoption along is the incredibly easy DX of pre-built components thanks to, in part, ES...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found