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

Build Web Components with a shared bundle #54

Open
odoe opened this issue Apr 15, 2019 · 1 comment
Open

Build Web Components with a shared bundle #54

odoe opened this issue Apr 15, 2019 · 1 comment

Comments

@odoe
Copy link

odoe commented Apr 15, 2019

It would be incredibly useful if I the widget build could support building multiple web components in a project and output a shared bundle to limit the total size of the components.

Right now if I have multiple elements in my .dojorc like this.

{
  "build-widget": {
    "elements": [
      "src/widgets/DatePicker",
      "src/widgets/Authentication",
      "src/widgets/Profile"
    ]
  }
}

Each output web component contains it's own widget source, but also all the dojo code needed as well in its bundle.

It would be really useful if we could build the whole project of web components to use a shared common.js file of the dojo code used. I assume it could work the way webpack dynamically loads files at runtime to load the common file as needed per web component. This helps cut down on the total size of js transferred.

The real benefit here is that at this point dojo could be used a source for building scalable web component libraries that could be used across multiple projects, regardless of the technology or framework being used by developers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants