Support Node conditional exports
@developit 已經在處理了。
開始於 2020年12月18日。
評估
這個 Issue 還沒有評估資料。
描述
In node 13, there is a new option available: exports.
As this will be the new standard for defining packages available for node/browsers/etc, it could be nice to use it instead/addition of the module, unpkg etc. fields in the current package.json. Webpack also plans to support it in the v5: https://github.com/webpack/webpack/issues/9509
Current API:
{
"source": "src/foo.js", // Your source file (same as 1st arg to microbundle)
"main": "dist/foo.js", // output path for CommonJS/Node
"module": "dist/foo.module.js", // output path for JS Modules
"unpkg": "dist/foo.umd.js", // optional, for unpkg.com
"scripts": {
"build": "microbundle", // uses "source" and "main" as input and output paths by default
"dev": "microbundle watch"
}
}
New API:
{
"source": "src/foo.js", // Your source file (same as 1st arg to microbundle)
"main": "dist/foo.js", // output path for CommonJS/Node
"exports": {
"import": "dist/foo.module.js", // output path for JS Modules
"browser": "dist/foo.umd.js", // optional, for unpkg.com
},
"scripts": {
"build": "microbundle", // uses "source" and "main" as input and output paths by default
"dev": "microbundle watch"
}
}
- 主要語言
- JavaScript
- 星號
- 8.1k
- 分支
- 358
- PR 合併指標
- 30 天內沒有已合併 PR
貢獻指南
這個儲存庫沒有索引到貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
developit/microbundle 的其他 Issue
-
CSS
難度 2/5 1-3 小時 新手友好度 68/100
developit/microbundle#1002 ·
-
難度 2/5 1-3 小時 新手友好度 75/100
developit/microbundle#789 · 1 則留言 ·
-
難度 3/5 1-2 天 新手友好度 55/100
developit/microbundle#1100 · 4 則留言 ·
-
難度 4/5 3-5 天 新手友好度 35/100
developit/microbundle#1094 · 1 則留言 ·
-
難度 3/5 1-2 天 新手友好度 45/100
developit/microbundle#1093 · 3 則留言 · 1 個 reaction ·
查看 developit/microbundle 的全部 Issue
相似的 Issue
-
bug confirmed issue
難度 2/5 1-3 小時 新手友好度 75/100
open-webui/open-webui#30750 · 1 則留言 ·
-
難度 2/5 1-3 小時 新手友好度 75/100
-
難度 2/5 1-3 小時 新手友好度 70/100
-
難度 2/5 1-3 小時 新手友好度 75/100
-
Mend: dependency security vulnerability untriaged
難度 2/5 1-3 小時 新手友好度 70/100