-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This sets us up to modernize all of our builds by implementing microbundle on the preact package. This produces a commonjs build that is left as main because that's what people currently expect, an es build that gets used by webpack, etc under the module key, and a true es modern build that will get used conditionally by node v14 native esm when `import` is used. When `require` is used in v14, the commonjs build gets used.
- Loading branch information
1 parent
d76085f
commit 8b4723f
Showing
3 changed files
with
316 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,11 +15,16 @@ | |
"Tim Neutkens <[email protected]>", | ||
"Matija Marohnić <[email protected]>", | ||
"Titus Wormer <[email protected]> (https://wooorm.com)", | ||
"JounQin <[email protected]> (https://www.1stg.me)" | ||
"JounQin <[email protected]> (https://www.1stg.me)", | ||
"Chris Biscardi <[email protected]> (https://www.christopherbiscardi.com)" | ||
], | ||
"license": "MIT", | ||
"main": "dist/cjs.js", | ||
"module": "dist/esm.js", | ||
"main": "dist/mdx-preact.js", | ||
"module": "dist/mdx-preact.es.js", | ||
"exports": { | ||
"import": "./dist/mdx-preact.mjs", | ||
"require": "./dist/mdx-preact.js" | ||
}, | ||
"files": [ | ||
"dist" | ||
], | ||
|
@@ -31,12 +36,17 @@ | |
"remark", | ||
"mdxast" | ||
], | ||
"scripts": { | ||
"build": "microbundle -f modern,es,cjs src/index.js" | ||
}, | ||
"peerDependencies": { | ||
"preact": "^10.4.6" | ||
}, | ||
"devDependencies": { | ||
"preact": "10.4.1", | ||
"preact-render-to-string": "5.1.10" | ||
}, | ||
"gitHead": "bf7deab69996449cb99c2217dff75e65855eb2c1" | ||
"esmodule": "dist/foo.mjs", | ||
"gitHead": "bf7deab69996449cb99c2217dff75e65855eb2c1", | ||
"source": "" | ||
} |
Oops, something went wrong.