bunchee 4.4.7 → 5.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -55
- package/dist/bin/cli.js +320 -317
- package/dist/index.js +442 -496
- package/package.json +14 -16
package/README.md
CHANGED
|
@@ -339,61 +339,6 @@ This will match the export name `"react-server"` and `"edge-light"` then use the
|
|
|
339
339
|
|
|
340
340
|
Then you can use `bunchee` to build the development bundle and production bundle automatically.
|
|
341
341
|
|
|
342
|
-
### Wildcard Exports
|
|
343
|
-
|
|
344
|
-
Bunchee implements the Node.js feature of using the asterisk `*` as a wildcard to match the exportable entry files.
|
|
345
|
-
|
|
346
|
-
For example:
|
|
347
|
-
|
|
348
|
-
```json
|
|
349
|
-
{
|
|
350
|
-
"exports": {
|
|
351
|
-
".": {
|
|
352
|
-
"types": "./dist/index.d.ts",
|
|
353
|
-
"import": "./dist/index.js"
|
|
354
|
-
},
|
|
355
|
-
"./*": {
|
|
356
|
-
"import": "./dist/*.mjs",
|
|
357
|
-
"require": "./dist/*.cjs"
|
|
358
|
-
}
|
|
359
|
-
}
|
|
360
|
-
}
|
|
361
|
-
```
|
|
362
|
-
|
|
363
|
-
The asterisk `*` will be replaced with your entry files, such as:
|
|
364
|
-
|
|
365
|
-
```
|
|
366
|
-
- my-lib/
|
|
367
|
-
|- src/
|
|
368
|
-
|- foo/
|
|
369
|
-
|- index.ts
|
|
370
|
-
|- bar.ts
|
|
371
|
-
|- index.ts
|
|
372
|
-
|- package.json
|
|
373
|
-
```
|
|
374
|
-
|
|
375
|
-
This will match the export names `"foo"` and `"bar"` and will be treated as the new entries as they matched the `./*` wildcard in `my-lib` folder.
|
|
376
|
-
|
|
377
|
-
```json
|
|
378
|
-
{
|
|
379
|
-
"exports": {
|
|
380
|
-
".": {
|
|
381
|
-
"import": "./dist/index.js"
|
|
382
|
-
},
|
|
383
|
-
"./foo": {
|
|
384
|
-
"import": "./dist/foo/index.mjs",
|
|
385
|
-
"require": "./dist/foo/index.cjs"
|
|
386
|
-
},
|
|
387
|
-
"./bar": {
|
|
388
|
-
"import": "./dist/bar.mjs",
|
|
389
|
-
"require": "./dist/bar.cjs"
|
|
390
|
-
}
|
|
391
|
-
}
|
|
392
|
-
}
|
|
393
|
-
```
|
|
394
|
-
|
|
395
|
-
> Note: Wildcard Exports currently only supports the exports key `"./*"`, which will match all the available entries.
|
|
396
|
-
|
|
397
342
|
### CSS
|
|
398
343
|
|
|
399
344
|
`bunchee` has basic CSS support for pure CSS file imports. It will be bundled into js bundle and insert the style tag into the document head when the bundle is loaded by browser.
|