Open
Description
Minimal repo to reproduce this issue
Project Structure
/
└── project
├── custom
│ └── index.ts
├── main.ts
├── package.json // `rollup --config` as `build` script
├── tsconfig.json
└── rollup.config.js
Code Snippets
// ./custom/index.ts
export default function() { return 'hello world' }
// ./main.ts
export { default as func } from 'custom'
// ./rollup.config.js
export default {
input: './main.ts',
output: { dir: './dist' },
plugins: [
typescriptPaths({
// absolute: false, // [2]
preserveExtensions: true,
}),
esbuild(),
],
}
Error Messages
❎ [1] [2]
[!] Error: Could not load
/project/project/custom/index.ts
(imported by main.ts):
- ENOENT: no such file or directory, open
'project/project/custom/index.ts'
Explanation: Duplicated project root
❎ [1] [2] absolute: false
in plugin configuration
[!] Error: Could not load
project/custom/index.ts
(imported by main.ts):
- ENOENT: no such file or directory, open
'project/custom/index.ts'
Explanation: Missing leading slash
✅ [1] [2] "baseUrl": "./"
in typescirpt configuration
No erros, output file:
// ./dist/main.js
function index() { return "hello world"; }
export { index as func };
Metadata
Metadata
Assignees
Labels
No labels