Instead it would be great if it served some page that suggested to find the proper UMD build inside. I agree! I don't know why unpkg attempts to serve a CommonJS entry point (which main stands for). It's much worse for the default URL to literally error because browsers do not support common JS than to serve a development build What do you mean by "standard"? Do all libraries do that? For libraries that do, are their DEV builds several times larger and smaller, like React DEV build is? It is standard for Unpkg URLs to point to development builds, and we are breaking user expectations. Features 4.8+: macOS 12.3 support untested on earlier versions 4.7+: Native Apple Silicon support Universal Binary (arm64 and x8664) 4.6+: macOS 10.15 Catalina compatible x8664 only <4.5: Supports 10.4.11 to 10. Only if you read the redirect result URL. Please visit the UNPKG website to learn more about how to use it. Unpkg redirects the user to the full UMD file path, making the path that is used by default clear. UNPKG is a fast, global content delivery network for everything on npm.React is an open-source, front end, JavaScript library for building user interfaces or UI components. I think that if you can drop a script tag on the page without thinking about whether it should be a dev or a prod build, we're going to keep seeing sites ship development versions to production, and hurting the user experience. check out the best 30+ React Example for beginners. We have to educate developers about the differences between builds, and the only way to do so is to force them to choose one or the other. If React does, then it'll be "anti-performance". If React doesn't make this choice then it's "anti-beginner".
0 Comments
Leave a Reply. |