TypeStrong / dts-bundle

Export TypeScript .d.ts files as an external module definition
MIT License
308 stars 57 forks source link

Bundler fails for all declarations if project name contains slash #75

Open liss-mouse opened 5 years ago

liss-mouse commented 5 years ago

My library has a name with slash (@preply/navigation), and it fails to process when I want to bundle all .d.ts files (works well for single declaration file):

Error: ENOENT: no such file or directory, open '/Users/lissm/Work/Dev/Git/apollo/client/@preply/navigation/build/dts-bundle.tmp.@preply/navigation.d.ts'
    at Object.openSync (fs.js:434:3)
    at Object.writeFileSync (fs.js:1154:35)
    at Object.bundle (/Users/lissm/Work/Dev/Git/apollo/client/@preply/navigation/node_modules/dts-bundle/lib/index.js:113:12)

My config:

{
  name: '@preply/navigation',
  main: 'build/**/*.d.ts',
  out: path.join(__dirname, 'dist/index.d.ts'),
}
markcellus commented 4 years ago

I'm having this problem too. Is there a workaround?