https://github.com/ericmorand/rollup-plugin-typescript-issue-2
https://github.com/ericmorand/rollup-plugin-typescript-issue-2
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/ericmorand/rollup-plugin-typescript-issue-2
- Owner: ericmorand
- Created: 2023-12-16T15:22:14.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-12-26T11:46:47.000Z (over 2 years ago)
- Last Synced: 2025-01-26T17:11:17.570Z (over 1 year ago)
- Language: TypeScript
- Size: 1000 Bytes
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
To trigger the issue, just execute rollup:
```shell
$ npx rollup -i src/index.ts -p @rollup/plugin-typescript
npm WARN cli npm v10.2.4 does not support Node.js v16.20.2. This version of npm supports the following node versions: `^18.17.0 || >=20.5.0`. You can find the latest version at https://nodejs.org/.
src/index.ts → stdout...
var foo = 5;
console.log(foo);
(!) Plugin typescript: @rollup/plugin-typescript TS2304: Cannot find name 'foo'.
src/invalid.ts: (1:1)
1 foo
~~~
```
Note how doing the same thing with `tsc` works perfectly:
```shell
$ tsc src/index.ts
```