-
Notifications
You must be signed in to change notification settings - Fork 70
Open
Labels
help wantedkind: bugSomething isn't working properlySomething isn't working properlysolution: workaround availableThere is a workaround available for this issueThere is a workaround available for this issue
Description
What happens and why it is wrong
Possibly this is a misconfiguration on my end, but it looks like a bug. When you use an object
as the input
property for the rollup configuration, the typings file for the input files are generated in the root folder of the repo (same folder as the rollup config file) and not the target output directory (here, ./dist
) along with the bundled JS file.
Versions
- typescript: 3.2.4
- rollup: 1.1.2
- rollup-plugin-typescript2: 0.19.2
rollup.config.js
{
...
input: {
Lib1: './src/Lib1.tsx',
Lib2: './src/Lib2.tsx'
},
output: {
dir: './dist',
format: 'cjs',
sourcemap: true,
entryFileNames: '[name].js'
}
}
tsconfig.json
{
...
"compilerOptions": {
"outDir": "./dist"
},
}
Result:
// These files are created
./Lib1.d.ts
./Lib2.d.ts
// instead of (expected):
./dist/Lib1.d.ts
./dist/Lib2.d.ts
Curiously, if you enter entryFileNames: 'dist/[name].js'
it creates a superfluous subfolder called dist
within the dist
folder and creates them there.
gluons, marius815, realmunk, jakearchibald, AntonPilyak and 6 morearchfz, JordanSinko and dylanklohr
Metadata
Metadata
Assignees
Labels
help wantedkind: bugSomething isn't working properlySomething isn't working properlysolution: workaround availableThere is a workaround available for this issueThere is a workaround available for this issue