package.json 导入模块入口文件优先级详解 main, browser, module, exports
模块入口文件在 package.json 中进行描述,通常使用 main, browser, module, exports 等字段。本文将对各字段的意义与诞生原因、优先级进行说明。并以 Node、Webpack、Vite 为例,对比模块入口处理上的差异。
模块入口文件在 package.json 中进行描述,通常使用 main, browser, module, exports 等字段。本文将对各字段的意义与诞生原因、优先级进行说明。并以 Node、Webpack、Vite 为例,对比模块入口处理上的差异。