mirror of
https://github.com/developit/microbundle.git
synced 2026-01-25 14:06:50 +00:00
README: syntax highlighting (#839)
This commit is contained in:
parent
0c91795957
commit
a415645ef4
@ -167,7 +167,7 @@ The filenames and paths for generated bundles in each format are defined by the
|
||||
"exports": {
|
||||
"require": "./dist/foo.js", // CommonJS output bundle
|
||||
"default": "./dist/foo.modern.js", // Modern ES Modules output bundle
|
||||
}
|
||||
},
|
||||
"types": "dist/foo.d.ts" // TypeScript typings directory
|
||||
}
|
||||
```
|
||||
@ -184,7 +184,7 @@ Node.js 12.16+ adds a new "ES Module package", which can be enabled by adding `{
|
||||
This property [changes the default source type](https://nodejs.org/api/packages.html#packages_determining_module_system) of `.js` files to be ES Modules instead of CommonJS.
|
||||
When using `{"type":"module"}`, the file extension for CommonJS bundles generated by Microbundle must be changed to `.cjs`:
|
||||
|
||||
```
|
||||
```jsonc
|
||||
{
|
||||
"type": "module",
|
||||
"module": "dist/foo.js", // ES Module bundle
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user