ionic-team / stencil

A toolchain for building scalable, enterprise-ready component systems on top of TypeScript and Web Component standards. Stencil components can be distributed natively to React, Angular, Vue, and traditional web developers from a single, framework-agnostic codebase.
https://stenciljs.com
Other
12.5k stars 784 forks source link

do not bundle 3rd party imports with the components #347

Closed rolandjitsu closed 6 years ago

rolandjitsu commented 6 years ago

Stencil version:

@stencil/core@0.0.8-8

I'm submitting a:

Current behavior:

Currently, any 3rd party imports inside the components will be bundled with the dist for the component. In some cases we may not want to do this. A good example is rxjs, which is relatively large. And in my specific case, where I use the components I already import rxjs.

Expected behavior:

There should be a way to not bundle 3rd party imports with the components. With rollup this can be done by using a combination of globals and external:

module.exports = {
    globals: {
        'rxjs/Observable': 'Rx'
    },
    external: [
        'rxjs/Observable'
    ]
}

Steps to reproduce:

Related code:

// insert any relevant code here

Other information:

adamdbradley commented 6 years ago

Closing this as a dup of https://github.com/ionic-team/stencil/issues/162 Thanks

rolandjitsu commented 6 years ago

@adamdbradley true, I missed that issue.