Reproduction of the issue related to loading external modules with the rollup-plugin-typescript2 rollup plugin
- use
yarn install
&yarn build
to install and generate the bundle. Node 10 is required - The output of the transpilation and bundling process is located in a single dist/bundle.js file
- The bundling codebase is located in src/rollup. It uses the rollup node api
- The bundling codebase uses a tsconfig.rollup.json file in order to run, but the rollup-plugin-typescript2 plugin uses the standard tscconfig.json
In this specific case we're bundling a web component, which imports a module, lit-element that:
- is exported as es2015 modules
- contains es2015 classes
Since the target described in tsconfig.json file is es5, and lit-element is included in tsconfig.json settings, I expect to have no classes in the generated bundle.js file.
In the bundle.js file, only the codebase contained in index.ts is transpiled correctly.
The codebase bundled from lit-element still contains classes.