-
Notifications
You must be signed in to change notification settings - Fork 12
Closed
Description
When building a library designed to be used in a bundler with asset importing, it's sometimes convenient to create entrypoints for particular library assets, like import 'my-lib/main.css';
. I'm not sure if this is recommended, but it is perfectly doable with package.exports
by simply pointing to the asset file location.
Since zshy
takes over the exports
field it would be nice for it to detect non-.[mc][tj]s
export values and write them as-is.
Example
Given the config:
"zshy": {
".": "./src/index.ts",
"./main.css": "./assets/main.css"
}
zshy writes the following:
"exports": {
".": {
"types": "./dist/index.d.cts",
"import": "./dist/index.js",
"require": "./dist/index.cjs"
},
"./main.css": "./assets/main.css"
}
iamyuu
Metadata
Metadata
Assignees
Labels
No labels