-
-
Notifications
You must be signed in to change notification settings - Fork 78
Closed as not planned
Labels
Description
Reproduction link or steps
https://stackblitz.com/edit/tsdown-afdkzpkz?file=package.json
What is expected?
If i have the following entries inside my config
entry: [
'./src/helpers/**/*.ts',
'./src/index.ts',
'./src/constants/index.ts',
],
then my pkg#export should have the following exports instead
"exports": {
".": "./dist/index.js",
"./constants/index": "./dist/constants/index.js",
"./environment": "./dist/environment.js",
"./singleton": "./dist/singleton.js",
"./slug": "./dist/slug.js",
"./type": "./dist/type.js",
"./package.json": "./package.json"
}
What is actually happening?
In my config file, i have set an array of three entries to entry object like this:
entry: [
'./src/helpers/**/*.ts',
'./src/index.ts',
'./src/constants/index.ts',
],
I get the following:
"exports": {
".": "./dist/index.js",
"./constants/index": "./dist/constants/index.js",
"./helpers/environment": "./dist/helpers/environment.js",
"./helpers/singleton": "./dist/helpers/singleton.js",
"./helpers/slug": "./dist/helpers/slug.js",
"./helpers/type": "./dist/helpers/type.js",
"./package.json": "./package.json"
}
But when the helpers glob entry is the only one present entry: ['./src/helpers/**/*.ts']
, then all files under files under helpers
are present as root inside pkg#export
"exports": {
"./environment": "./dist/environment.js",
"./singleton": "./dist/singleton.js",
"./slug": "./dist/slug.js",
"./type": "./dist/type.js",
"./package.json": "./package.json"
}
Any additional comments?
Is the current behaviour what to expect?