Rollup-plugin-typescript2: "Error: Entry module cannot be external" in version 0.20.0

Created on 12 Mar 2019  ·  9Comments  ·  Source: ezolenko/rollup-plugin-typescript2

What happens and why it is wrong

The build won't go through, throws the following error:
Error: Entry module cannot be external

This seems to be caused by a change here: https://github.com/ezolenko/rollup-plugin-typescript2/commit/29b13a089b6a1a86574255779277d1e06414f557#diff-f41e9d04a45c83f3b6f6e630f10117feR118

Environment

Checked in a setup like this:

index.ts:

export * from './index2';

index2.ts:

// doesn't matter

Versions

  • typescript: 3.3.3333
  • rollup: 1.6.0
  • rollup-plugin-typescript2: 0.20.0

rollup.config.js

import typescript from 'rollup-plugin-typescript2';

export default {
  input: './index.ts',
  output: {
    format: 'cjs',
    file: './dist/build.js',
  },
  plugins: [
    typescript()
  ]
}

Most helpful comment

Ugh, I should have actually read the docs... Try now with 0.20.1

All 9 comments

I have the same problem. 0.20.0 breaks my build because of this!
I'm stuck on 0.19.0 😜

Same problem with esm format

Exact the same problem with all my projects with rollup-plugin-typescript2.

Same problem breaks building

Same problem here with Version 0.20.0

I Googled this like crazy two days ago and gave up. Apparently I'm not crazy! Yay! :tada:

Ugh, I should have actually read the docs... Try now with 0.20.1

0.20.1 works: @jansiegel @ezolenko is it possible to close the issue?

some problem with [email protected]

Was this page helpful?
0 / 5 - 0 ratings