Skip to content
This repository was archived by the owner on Jul 26, 2020. It is now read-only.

coarchive/rollup-typescript-issue-2020.07.25

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rollup-typescript-issue

This issue makes no sense.

Repro:

  • Clone this
  • npm i
  • npm run build or npx rollup -c

You should read rollup.config.js to make sure there's nothing bad in there first, though.

It looks like it works without the tsconfig.json but that's silly. What could be in there that causes typescript to fail?

> rollup -c


src/main.ts → dist/main.ts...
(node:612) ExperimentalWarning: Conditional exports is an experimental feature. This feature could change at any time
[!] Error: Unexpected token (Note that you need plugins to import files that are not JavaScript)
src\main.ts (1:11)
1: const hello: string = "hello world";
              ^
2: console.log(hello);

Fix:

Alright looks like I found the culprit.

It was "outDir": "dist" under compilerOptions in tsconfig.json.

This issue still makes no sense but I've solved it.

About

Let's see if anyone else can reproduce this

Resources

Stars

Watchers

Forks