Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

package.json 中 browser,module,main 字段优先级 #23

Open
nmsn opened this issue Jul 27, 2022 · 0 comments
Open

package.json 中 browser,module,main 字段优先级 #23

nmsn opened this issue Jul 27, 2022 · 0 comments

Comments

@nmsn
Copy link
Owner

nmsn commented Jul 27, 2022

来源:SunshowerC/blog#8

  • main : 定义了 npm 包的入口文件,browser 环境和 node 环境均可使用
  • module : 定义 npm 包的 ESM 规范的入口文件,browser 环境和 node 环境均可使用
  • browser : 定义 npm 包在 browser 环境下的入口文件
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant