You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Today we need to add a package.json for a subpath folder if you want to build based on that working directory, for instance:
// pkg/a/package.json
{
"name": "pkg-a",
"exports": {}
}
In this way, you can build the assets based on the subpath pkg/a and generate output according to "exports" path in that package.json. Then we refer those outputs in the toplevel package.json for the corresponding subpath imports.
But this might confuse some tooling to understand the structure of the library better. Since node.js introduced the exports sugar, any subpath needs to provide a package.json just for getting assets output paths. bunchee should be able to auto detect it
Proposal
Introducing a new exports paths auto-detection feature for top level package.json.
Example
Assume we have a toplevel package foo with package.json which contains a subpath import foo/die
Then you have your source folder of foo/die/ with entry file foo/die/index.js. In this case bunchee should read the output paths infomation from exports field if the current build working directory matches the any exports path
The text was updated successfully, but these errors were encountered:
Today we need to add a package.json for a subpath folder if you want to build based on that working directory, for instance:
// pkg/a/package.json
In this way, you can build the assets based on the subpath
pkg/a
and generate output according to"exports"
path in that package.json. Then we refer those outputs in the toplevel package.json for the corresponding subpath imports.But this might confuse some tooling to understand the structure of the library better. Since node.js introduced the exports sugar, any subpath needs to provide a package.json just for getting assets output paths. bunchee should be able to auto detect it
Proposal
Introducing a new exports paths auto-detection feature for top level package.json.
Example
Assume we have a toplevel package
foo
withpackage.json
which contains a subpath importfoo/die
Then you have your source folder of
foo/die/
with entry filefoo/die/index.js
. In this case bunchee should read the output paths infomation from exports field if the current build working directory matches the any exports pathThe text was updated successfully, but these errors were encountered: