/rpt2-165-issue-repro

Reproduction of https://github.com/ezolenko/rollup-plugin-typescript2/issues/165 issue

Primary LanguageTypeScript

rollup-plugin-typescript2 external modules issue repro

Reproduction of the issue related to loading external modules with the rollup-plugin-typescript2 rollup plugin

Project infos

  • 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

Explanation

In this specific case we're bundling a web component, which imports a module, lit-element that:

Expected behavior

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.

Actual behavior

In the bundle.js file, only the codebase contained in index.ts is transpiled correctly.
The codebase bundled from lit-element still contains classes.