Skip to content

Allow inlined third-party dependencies to be externalized #1938

@petermikitsh

Description

@petermikitsh

Stencil version:

 @stencil/core@^1.3.3

I'm submitting a:

[ ] bug report
[X] feature request
[ ] support request => Please do not submit support requests here, use one of these channels: https://stencil-worldwide.herokuapp.com/ or https://forum.ionicframework.com/

Current behavior:

When using a third-party javascript library in a component, it is automatically inlined into the output folder (dist/esm-es5/*).

Expected behavior:

I should be able to externalize dependencies to reduce bundle sizes.

Suppose I'm using my stencil components in a higher-level project that also uses redux. I will end up loading two copies of redux in my application, when I only need one.

Steps to reproduce:

  • Create a component with a dependency
  • Produce a production build of your stencil component library

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions