├── .gitignore ├── jsx-runtime.mjs ├── server.js ├── client.js ├── index.js ├── jsx-dev-runtime.mjs ├── jsx-runtime.js ├── jsx-dev-runtime.js ├── lib ├── ReactCSSTransitionGroup.js └── ReactComponentWithPureRenderMixin.js ├── index.mjs ├── client.mjs ├── server.mjs ├── README.md ├── LICENSE └── package.json /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | package-lock.json -------------------------------------------------------------------------------- /jsx-runtime.mjs: -------------------------------------------------------------------------------- 1 | export * from 'preact/jsx-runtime'; 2 | -------------------------------------------------------------------------------- /server.js: -------------------------------------------------------------------------------- 1 | module.exports = require("preact/compat/server"); -------------------------------------------------------------------------------- /client.js: -------------------------------------------------------------------------------- 1 | module.exports = require('preact/compat/client'); 2 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | module.exports = require('preact/compat'); 2 | 3 | -------------------------------------------------------------------------------- /jsx-dev-runtime.mjs: -------------------------------------------------------------------------------- 1 | export * from 'preact/jsx-runtime'; 2 | -------------------------------------------------------------------------------- /jsx-runtime.js: -------------------------------------------------------------------------------- 1 | module.exports = require('preact/jsx-runtime'); 2 | -------------------------------------------------------------------------------- /jsx-dev-runtime.js: -------------------------------------------------------------------------------- 1 | module.exports = require('preact/jsx-runtime'); 2 | -------------------------------------------------------------------------------- /lib/ReactCSSTransitionGroup.js: -------------------------------------------------------------------------------- 1 | module.exports = require('react-transition-group'); -------------------------------------------------------------------------------- /index.mjs: -------------------------------------------------------------------------------- 1 | export * from 'preact/compat'; 2 | export { default } from 'preact/compat'; 3 | -------------------------------------------------------------------------------- /client.mjs: -------------------------------------------------------------------------------- 1 | export * from 'preact/compat/client'; 2 | export { default } from 'preact/compat/client'; 3 | -------------------------------------------------------------------------------- /server.mjs: -------------------------------------------------------------------------------- 1 | export * from 'preact/compat/server'; 2 | export { default } from 'preact/compat/server'; 3 | -------------------------------------------------------------------------------- /lib/ReactComponentWithPureRenderMixin.js: -------------------------------------------------------------------------------- 1 | module.exports = require('standalone-react-addons-pure-render-mixin'); -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # @preact/compat - alias package 2 | 3 | This package is intended to be used to resolve `react` to `preact/compat` via built-in features in npm, which requires a separate package to be used. Therefore this package just re-exports `preact/compat` as is. 4 | 5 | To learn more about Preact itself, check out the main repo: https://github.com/preactjs/preact 6 | 7 | ## Usage 8 | 9 | Run: 10 | 11 | ```bash 12 | npm install react@npm:@preact/compat react-dom@npm:@preact/compat 13 | ``` 14 | 15 | See the [npm docs](https://docs.npmjs.com/cli/v7/commands/npm-install) for more information about aliased installs. 16 | 17 | ## License 18 | 19 | MIT, see the [LICENSE](./LICENSE) file. 20 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2019-present Preact Team 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "public": true, 3 | "name": "@preact/compat", 4 | "version": "18.3.1", 5 | "description": "Alias of preact/compat", 6 | "main": "./index.js", 7 | "module": "./index.mjs", 8 | "exports": { 9 | ".": { 10 | "module": "./index.mjs", 11 | "import": "./index.mjs", 12 | "require": "./index.js" 13 | }, 14 | "./server": { 15 | "module": "./server.mjs", 16 | "import": "./server.mjs", 17 | "require": "./server.js" 18 | }, 19 | "./server.browser": { 20 | "module": "./server.mjs", 21 | "import": "./server.mjs", 22 | "require": "./server.js" 23 | }, 24 | "./client": { 25 | "import": "./client.mjs", 26 | "require": "./client.js" 27 | }, 28 | "./jsx-dev-runtime": { 29 | "module": "./jsx-dev-runtime.mjs", 30 | "import": "./jsx-dev-runtime.mjs", 31 | "require": "./jsx-dev-runtime.js" 32 | }, 33 | "./jsx-runtime": { 34 | "module": "./jsx-runtime.mjs", 35 | "import": "./jsx-runtime.mjs", 36 | "require": "./jsx-runtime.js" 37 | }, 38 | "./package.json": "./package.json" 39 | }, 40 | "repository": "preactjs/compat-alias-package", 41 | "author": "Preact Team ", 42 | "license": "MIT", 43 | "homepage": "https://preactjs.com", 44 | "peerDependencies": { 45 | "preact": "*" 46 | }, 47 | "devDependencies": { 48 | "preact": "^10.5.15" 49 | } 50 | } 51 | --------------------------------------------------------------------------------