-
-
Notifications
You must be signed in to change notification settings - Fork 613
Closed
Labels
Description
- Rollup Plugin Name: @rollup/plugin-typescript
- Rollup Plugin Version: 11.1.6
- Rollup Version: 4.14.2
- Operating System (or Browser): Windows 11
- Node Version: v20.11.0
- Link to reproduction (
⚠️ read below): https://stackblitz.com/edit/rollup-typescript-plugin-absolute-path?file=package.json,src%2Fmain.ts,rollup.config.js
Expected Behavior
Build Successed.
Actual Behavior
d:/rollup-typescript-plugin-absolute-path/src/main.ts → dist...
[!] RollupError: ../../d:/rollup-typescript-plugin-absolute-path/src/main.ts (1:21): Expected ',', got ':' (Note that you need plugins to import files that are not JavaScript)
../../d:/rollup-typescript-plugin-absolute-path/src/main.ts (1:21)
1: export function foo(a: number) {
^
2: console.log(a);
3: }
RollupError: Expected ',', got ':'
at Object.getRollupError (D:\rollup-typescript-plugin-absolute-path\node_modules\rollup\dist\shared\parseAst.js:282:41)
at ParseError.initialise (D:\rollup-typescript-plugin-absolute-path\node_modules\rollup\dist\shared\rollup.js:12611:40)
at convertNode (D:\rollup-typescript-plugin-absolute-path\node_modules\rollup\dist\shared\rollup.js:14356:10)
at convertProgram (D:\rollup-typescript-plugin-absolute-path\node_modules\rollup\dist\shared\rollup.js:13673:12)
at Module.setSource (D:\rollup-typescript-plugin-absolute-path\node_modules\rollup\dist\shared\rollup.js:15510:24)
at async ModuleLoader.addModuleSource (D:\rollup-typescript-plugin-absolute-path\node_modules\rollup\dist\shared\rollup.js:19819:13)
[cause] RollupError: Expected ',', got ':'
at Object.getRollupError (D:\rollup-typescript-plugin-absolute-path\node_modules\rollup\dist\shared\parseAst.js:282:41)
at ParseError.initialise (D:\rollup-typescript-plugin-absolute-path\node_modules\rollup\dist\shared\rollup.js:12611:40)
at convertNode (D:\rollup-typescript-plugin-absolute-path\node_modules\rollup\dist\shared\rollup.js:14356:10)
at convertProgram (D:\rollup-typescript-plugin-absolute-path\node_modules\rollup\dist\shared\rollup.js:13673:12)
at Module.setSource (D:\rollup-typescript-plugin-absolute-path\node_modules\rollup\dist\shared\rollup.js:15510:24)
at async ModuleLoader.addModuleSource (D:\rollup-typescript-plugin-absolute-path\node_modules\rollup\dist\shared\rollup.js:19819:13)
Additional Information
This problem occurs on the windows. I download the project to disk D:/ and decompress it. If the input is absolute path and starts with D:/. It will build successfully, but if the absolute path of input starts with 'd:/', error above happens. In my opinion, for drive letter both upper and lower case should be supported.