├── .gitignore ├── package.json └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | staging 4 | build-polyfill.js -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@pika/cdn", 3 | "private": true, 4 | "workspaces": [], 5 | "description": "Different packages for the CDN.", 6 | "author": { 7 | "name": "Fred K. Schott", 8 | "email": "fkschott@gmail.com" 9 | }, 10 | "keywords": [], 11 | "license": "MIT", 12 | "dependencies": {}, 13 | "devDependencies": { 14 | "@types/react": "^16.9.19", 15 | "@types/react-dom": "^16.9.5", 16 | "core-js-builder": "^3.1.3", 17 | "core-js-compat": "^3.6.4", 18 | "react": "^16.12.0", 19 | "react-dom": "^16.12.0", 20 | "execa": "^1.0.0", 21 | "mkdirp": "^0.5.1", 22 | "react-ecmascript": "^1.4.4", 23 | "regenerator-runtime": "^0.13.2", 24 | "rimraf": "^2.6.3", 25 | "terser": "^4.0.0" 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # @pika/react & @pika/react-dom 2 | 3 | ESM builds of React v16 & React DOM v16, published to NPM. 4 | **This repo is no longer maintained.** 5 | 6 | ## Why? 7 | 8 | React & React-DOM are both written as Common.js, and rely on some funky dynamic logic that's difficult for ESM bundlers like Rollup to statically analyze. 9 | 10 | This package used to be the only way to use React in an ESM-only environment. However, Snowpack v2.0+ introduced the ability to use the "react" & "react-dom" packages directly. **These packages are no longer necessary for Snowpack.** We'll even warn if you use them! This repo only exists now for projects that need native ESM or that don't support more advanced CJS upconversions (ex: [Vite](https://github.com/vitejs/vite-plugin-react)). 11 | 12 | [The React team is working on ESM support](https://github.com/facebook/react/issues/11503). Until then, you can install these drop-in replacements in your projects to get smaller, optimized production installs with Snowpack, Rollup, Webpack, and Parcel. 13 | 14 | ```bash 15 | # Install with npm 16 | npm install react@npm:@pika/react react-dom@npm:@pika/react-dom 17 | # Install with Yarn 18 | yarn add react@npm:@pika/react react-dom@npm:@pika/react-dom 19 | ``` 20 | 21 | 22 | ## How to Build Locally 23 | 24 | ``` 25 | git clone ${REPO} 26 | npm install 27 | node ./build-react.js 28 | ``` 29 | --------------------------------------------------------------------------------