{ "_id": "@pmmmwh/react-refresh-webpack-plugin", "_rev": "40-821970bd5b29a2de905ecd81f7b7057f", "name": "@pmmmwh/react-refresh-webpack-plugin", "dist-tags": { "latest": "0.4.3", "next": "0.4.3" }, "versions": { "0.1.0": { "name": "@pmmmwh/react-refresh-webpack-plugin", "version": "0.1.0", "description": "An **EXPERIMENTAL** Webpack plugin to enable \"Fast Refresh\" (also previously known as _Hot Reloading_) for React components.", "keywords": [ "react", "javascript", "webpack", "refresh", "hmr", "hotreload", "livereload", "live", "edit", "hot", "reload" ], "homepage": "https://github.com/pmmmwh/react-refresh-webpack-plugin#readme", "bugs": { "url": "https://github.com/pmmmwh/react-refresh-webpack-plugin/issues" }, "repository": { "type": "git", "url": "git+https://github.com/pmmmwh/react-refresh-webpack-plugin.git" }, "license": "MIT", "author": { "name": "Michael Mok" }, "main": "src/index.js", "scripts": { "lint": "prettier --check \"**/*.{js,jsx,json,md}\"", "lint:fix": "prettier --write \"**/*.{js,jsx,json,md}\"" }, "dependencies": { "ansi-html": "^0.0.7", "error-stack-parser": "^2.0.4", "html-entities": "^1.2.1", "lodash.debounce": "^4.0.8", "react-dev-utils": "^9.1.0", "sockjs-client": "^1.4.0" }, "devDependencies": { "prettier": "^1.18.2", "react-refresh": "^0.7.0", "webpack": "^4.41.2" }, "peerDependencies": { "react-refresh": ">= 0.7" }, "engines": { "node": ">= 8.x" }, "gitHead": "7270cda1a25b58a913de6d7890b2643b98c990e6", "_id": "@pmmmwh/react-refresh-webpack-plugin@0.1.0", "_nodeVersion": "12.13.0", "_npmVersion": "6.13.1", "dist": { "integrity": "sha512-ZK5mOrtdza8LVQ8FoFiHP1hJLE8gRIbNCzWtuK3TmZOUGdfReZz+pyr3v7+HcoldFXB9vdYyGu7cP6QrxRP68A==", "shasum": "7498f65fa2d601e5cb03ba0e91f8cdfd16526d28", "tarball": "https://registry.npmjs.org/@pmmmwh/react-refresh-webpack-plugin/-/react-refresh-webpack-plugin-0.1.0.tgz", "fileCount": 28, "unpackedSize": 53181, "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd6o03CRA9TVsSAnZWagAAplEP/RnzHVABhRm5l5S01KTr\nhulDDYuNm5QZ5kcAidTLM74IuCZnnnQJNs+t5NzDhX4ZAIl6ic/5OHPKkSOk\nvLj2qgeMlebt8+vrv9pVOVeV7qU2DApi33Tpe9m/wQWS24vuXd5B0yJM5aM1\nBtNTvjwBXIk+0y/otWEqoQvhFCJHf+0u6VX4ruDXqVMyZYtIsmLG9H2lyxXo\nZRCfcqDohRyTEDo1LvWFW32tTOUcKnLAgzWvY0esxKTJtLjwqhLbIle9jMlR\nnC8K/gnZ446XPNmO9JO8PWekCTOmlLZQ3fnJHNjyIKrOcFd4WdrVAKa4bJaH\nQMkO+KlxIfe/zOrX0zdPAgdoPa5biSitQ9EXR+oHXMqNm+XBh/uaQZwvrbxG\nDO+of4SV4ONGYQXY+5dDMu0opua6FfcRFcXcihnF3VFcLnSQ7HEKjDuWj50c\nn77UcI3OqNzgmuaM0mSN1t34sxPNOaVEaTEm0KEXb2Nt7sHJRIM46pZWrQEu\niE8m5VbhZc722k/5ckGEvqXGuoGmgAlXY9Ej6ZAAycJy79CV9POAna1BP8i/\nclH7z5N754nHyu6pLcdvvGIXbup0i9W/uAd+bm3XCPEcJafVDBU2Lf7I+ZDp\nE+/sZmaOyZxpG3rzlwJF6X6q5TucV+OcVH2eHXWS/XRKjzAr7TKwDrlplosk\nNS/8\r\n=iJc2\r\n-----END PGP SIGNATURE-----\r\n" }, "maintainers": [ { "name": "pmmmwh", "email": "pmmmwh@gmail.com" } ], "_npmUser": { "name": "pmmmwh", "email": "pmmmwh@gmail.com" }, "directories": {}, "_npmOperationalInternal": { "host": "s3://npm-registry-packages", "tmp": "tmp/react-refresh-webpack-plugin_0.1.0_1575652662838_0.5844877160294135" }, "_hasShrinkwrap": false }, "0.1.1": { "name": "@pmmmwh/react-refresh-webpack-plugin", "version": "0.1.1", "description": "An **EXPERIMENTAL** Webpack plugin to enable \"Fast Refresh\" (also previously known as _Hot Reloading_) for React components.", "keywords": [ "react", "javascript", "webpack", "refresh", "hmr", "hotreload", "livereload", "live", "edit", "hot", "reload" ], "homepage": "https://github.com/pmmmwh/react-refresh-webpack-plugin#readme", "bugs": { "url": "https://github.com/pmmmwh/react-refresh-webpack-plugin/issues" }, "repository": { "type": "git", "url": "git+https://github.com/pmmmwh/react-refresh-webpack-plugin.git" }, "license": "MIT", "author": { "name": "Michael Mok" }, "main": "src/index.js", "scripts": { "lint": "yarn run lint:eslint && yarn run lint:prettier", "lint:fix": "yarn run lint:eslint:fix && yarn run lint:prettier:fix", "lint:eslint": "eslint --report-unused-disable-directives \"**/*.js\"", "lint:eslint:fix": "yarn run lint:eslint --fix", "lint:prettier": "prettier --check \"**/*.{js,jsx,json,md}\"", "lint:prettier:fix": "prettier --write \"**/*.{js,jsx,json,md}\"" }, "dependencies": { "ansi-html": "^0.0.7", "error-stack-parser": "^2.0.4", "html-entities": "^1.2.1", "lodash.debounce": "^4.0.8", "react-dev-utils": "^9.1.0", "sockjs-client": "^1.4.0" }, "devDependencies": { "eslint": "^6.7.2", "eslint-config-prettier": "^6.7.0", "prettier": "^1.18.2", "react-refresh": "^0.7.0", "webpack": "^4.41.2" }, "peerDependencies": { "react-refresh": ">= 0.7" }, "engines": { "node": ">= 8.x" }, "gitHead": "f35c73126f554990309119abb5c3c7194b36529d", "_id": "@pmmmwh/react-refresh-webpack-plugin@0.1.1", "_nodeVersion": "12.13.0", "_npmVersion": "6.13.1", "dist": { "integrity": "sha512-gxKWKcicwo4pTCaNnspqWXKvEAEZ/SOM+xfnQA0boWwwL3BZzTsJcH4DwlgBFr6tv4R++3YGMIO9j+nDPvNRLA==", "shasum": "9d6cc57edcf401fd8029aefc64474fde07f320ef", "tarball": "https://registry.npmjs.org/@pmmmwh/react-refresh-webpack-plugin/-/react-refresh-webpack-plugin-0.1.1.tgz", "fileCount": 30, "unpackedSize": 55782, "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd83AgCRA9TVsSAnZWagAASsgQAIvh3o+zB990BJ9tCXqO\n+dg2F1tkS9Kw2Cuq95Zna8MSe3of+IDPac3EZzS2XJK63JXCWuK8k0E/1FpQ\nX1Vv2kb+H3Wzn7XghDlE9Qb8Hi61+gww5PxQ5Gq3agQSgFJQxAPbp2f7aMI1\nHMr72y8I2OEnSp4+ubfKqQ2dgBX4C4ZCyPrjLn07Qe/lo/8WdfdGZlL3kKdj\njO5wRypzMW5MNIiayxQjzmWBSt0Nav2eeAEciSxyaZ/Nv/m80rIud7QYXulP\nyO7lP03AKE/dumr3cCWqK/5YFBIbInbAgn91tVNqoymd1Kt0NfD5CKyiwaL3\nP7M/sYG1j6zzz9hGfLdqktZgtUOFwxWrP2K0gWMMlNxN/Eh5tXEk6AUZPfPS\nh10yutkniy5Iz0WBojO43xMIdGiTdOfk2HO8OHZmGSwQ9VrU30eVlfKtyDa7\noomNRK9GFvPCjEC8o45XCyjyOZViAGBvPxW5mOfsoCiQo7WMIfGt7Whs+R6H\nk6HqslP1Pkki4MEtooFb63ONUoSwqDdMhuPY4NwlLxX0YABIaZ0TcWg21L0q\n3F5/EHesihRVEUKeyZGyKjZKEM5nABw2MCstZKtZU+NXEQIEgkPtTCQDirle\nJW85cADM407rrJsDHxFFvp+yMjANTpxCvbcvCmqJ+v2+C0WRH8YnlaoqJOG0\nFL3/\r\n=VFhN\r\n-----END PGP SIGNATURE-----\r\n" }, "maintainers": [ { "name": "pmmmwh", "email": "pmmmwh@gmail.com" } ], "_npmUser": { "name": "pmmmwh", "email": "pmmmwh@gmail.com" }, "directories": {}, "_npmOperationalInternal": { "host": "s3://npm-registry-packages", "tmp": "tmp/react-refresh-webpack-plugin_0.1.1_1576235039822_0.041155221364435945" }, "_hasShrinkwrap": false }, "0.1.2": { "name": "@pmmmwh/react-refresh-webpack-plugin", "version": "0.1.2", "description": "An **EXPERIMENTAL** Webpack plugin to enable \"Fast Refresh\" (also previously known as _Hot Reloading_) for React components.", "keywords": [ "react", "javascript", "webpack", "refresh", "hmr", "hotreload", "livereload", "live", "edit", "hot", "reload" ], "homepage": "https://github.com/pmmmwh/react-refresh-webpack-plugin#readme", "bugs": { "url": "https://github.com/pmmmwh/react-refresh-webpack-plugin/issues" }, "repository": { "type": "git", "url": "git+https://github.com/pmmmwh/react-refresh-webpack-plugin.git" }, "license": "MIT", "author": { "name": "Michael Mok" }, "main": "src/index.js", "scripts": { "lint": "yarn run lint:eslint && yarn run lint:prettier", "lint:fix": "yarn run lint:eslint:fix && yarn run lint:prettier:fix", "lint:eslint": "eslint --report-unused-disable-directives \"**/*.js\"", "lint:eslint:fix": "yarn run lint:eslint --fix", "lint:prettier": "prettier --check \"**/*.{js,jsx,json,md}\"", "lint:prettier:fix": "prettier --write \"**/*.{js,jsx,json,md}\"" }, "dependencies": { "ansi-html": "^0.0.7", "error-stack-parser": "^2.0.4", "html-entities": "^1.2.1", "lodash.debounce": "^4.0.8", "react-dev-utils": "^9.1.0", "sockjs-client": "^1.4.0" }, "devDependencies": { "eslint": "^6.7.2", "eslint-config-prettier": "^6.7.0", "prettier": "^1.18.2", "react-refresh": "^0.7.0", "webpack": "^4.41.2" }, "peerDependencies": { "react-refresh": ">= 0.7" }, "engines": { "node": ">= 8.x" }, "gitHead": "0f3517b5dfd4073fdb948484e629c21608807331", "_id": "@pmmmwh/react-refresh-webpack-plugin@0.1.2", "_nodeVersion": "12.13.0", "_npmVersion": "6.13.1", "dist": { "integrity": "sha512-BzPkQNL1AOWQMqqYQLeIpdTNL6qSvbT3XAo4Ej1+rbxq5ae5YL7oAzD134siADoj+1yJSwV1HDAYrt7MnOdYgA==", "shasum": "d2e02f52041ac90b92dbc691fe4480c463cdd0ac", "tarball": "https://registry.npmjs.org/@pmmmwh/react-refresh-webpack-plugin/-/react-refresh-webpack-plugin-0.1.2.tgz", "fileCount": 30, "unpackedSize": 56740, "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd+SKECRA9TVsSAnZWagAAmNMQAJS2BIuek6Pwm6+Hvyib\nCgkU6dnjdma/qV4H8iB7IUjby6mbmeqGGPU7fo1oiPMiUXbhE870fisfH9hN\n3XDgJ9n7BjR/gquq8Da7MigJXP9+e1Ove1GWUEfIm7SiDzEm9mrEcITaxDsY\n0w2D/QYyRZFKdxvMiP2M+cF9TPsVeOY5lme+6q5Pk6zAdCsL38tCdhlMVVoa\nOXxtPxBG+SEASOiSOVav60uc321i2jYyhWVZqoVkJ/avm6VdfV5jovNhmZyf\nYFei58wdx36qwBDR/VA9AZNwEKVQUMSqRco0QEU/W0BjAOtub+8XBo1m577e\nDc9AIW/fuxDZwKvBq0xYxL5q1GnS8kOOy1Ak604pQEvvj2xdYiMSenJu+5ZT\n+WqLuQvTJpwx2IACEJRMp3kkISdfagk+Fgb/gWqmbiKPlmFtRRwU1dycdD4X\n6qdUUTMepGdgL+wNOQZUjsYFpxU/E63zV5zrG+ErNlg5SUhYHOkEv6uGPefd\nGd465q9f9L3FhQQetBQ0d5H4+f87dAqdYZIIjYhtU5YzGOOrTWrqDBaRDecN\nzmcomqeYlR9A75P+YIF/AuRUA1SnaKvPTh7weJdi4fBLZ69MgdEm2BH0CtpB\nrHWyVG9zMntwAtROtfNuhYPzLJ29z3zUuBSpKzrg9HOme+5xn1R+72eaiuNJ\nXRGg\r\n=7fVh\r\n-----END PGP SIGNATURE-----\r\n" }, "maintainers": [ { "name": "pmmmwh", "email": "pmmmwh@gmail.com" } ], "_npmUser": { "name": "pmmmwh", "email": "pmmmwh@gmail.com" }, "directories": {}, "_npmOperationalInternal": { "host": "s3://npm-registry-packages", "tmp": "tmp/react-refresh-webpack-plugin_0.1.2_1576608388274_0.7037957213681705" }, "_hasShrinkwrap": false }, "0.1.3": { "name": "@pmmmwh/react-refresh-webpack-plugin", "version": "0.1.3", "description": "An **EXPERIMENTAL** Webpack plugin to enable \"Fast Refresh\" (also previously known as _Hot Reloading_) for React components.", "keywords": [ "react", "javascript", "webpack", "refresh", "hmr", "hotreload", "livereload", "live", "edit", "hot", "reload" ], "homepage": "https://github.com/pmmmwh/react-refresh-webpack-plugin#readme", "bugs": { "url": "https://github.com/pmmmwh/react-refresh-webpack-plugin/issues" }, "repository": { "type": "git", "url": "git+https://github.com/pmmmwh/react-refresh-webpack-plugin.git" }, "license": "MIT", "author": { "name": "Michael Mok" }, "main": "src/index.js", "scripts": { "lint": "yarn run lint:eslint && yarn run lint:prettier", "lint:fix": "yarn run lint:eslint:fix && yarn run lint:prettier:fix", "lint:eslint": "eslint --report-unused-disable-directives \"**/*.js\"", "lint:eslint:fix": "yarn run lint:eslint --fix", "lint:prettier": "prettier --check \"**/*.{js,jsx,json,md}\"", "lint:prettier:fix": "prettier --write \"**/*.{js,jsx,json,md}\"" }, "dependencies": { "ansi-html": "^0.0.7", "error-stack-parser": "^2.0.4", "html-entities": "^1.2.1", "lodash.debounce": "^4.0.8", "react-dev-utils": "^9.1.0", "sockjs-client": "^1.4.0" }, "devDependencies": { "eslint": "^6.7.2", "eslint-config-prettier": "^6.7.0", "prettier": "^1.18.2", "react-refresh": "^0.7.0", "webpack": "^4.41.2" }, "peerDependencies": { "react-refresh": ">= 0.7" }, "engines": { "node": ">= 8.x" }, "gitHead": "a220083e479fbbe801e904c6322215e49b38c535", "_id": "@pmmmwh/react-refresh-webpack-plugin@0.1.3", "_nodeVersion": "12.13.0", "_npmVersion": "6.13.1", "dist": { "integrity": "sha512-FJ8WzpGrao8Gz8KNAeU9dcTYr1RjbAGnXJMKKXTp4oAw494SqQK4HyGT8HMmIQt0ayukuP+A71w1oV8/5xSAWQ==", "shasum": "bb6815315028087e6af4f96d063376880caf9c82", "tarball": "https://registry.npmjs.org/@pmmmwh/react-refresh-webpack-plugin/-/react-refresh-webpack-plugin-0.1.3.tgz", "fileCount": 30, "unpackedSize": 58116, "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd+v7GCRA9TVsSAnZWagAAcyMP/1V8bSApXxbmPgqWrk2s\np17V7h0I4KEWezgt8KYw6tdKFYvKi6guHnx35dx/gIijh8XxBOfNjitolYC9\nywE5uETXNAYdmg8/rG0X0g6XWbPosX1//4fXqho4DiOhGshC5Y6clBFeUbFs\n1dG7y4eucpRu5SdgVbazOL+e4e6X1ZSYs1J0iRypZLVIyqdfho2pDbW5acT0\nH0HBjCChuppyjTANUJKuCkgD3c1BekyK2hsYhxs5hJlWQvgLUzhCu9phVqvJ\n5CU95YeSze8I1x4Q07s4c+vZWwmLyK5EC8dqyoM0amReqQlkALjGuOSdtzD0\nG7nRuMYEbFzao/RlahbTP6KNMWZy8qY4fN65Rnsa+lzBOW9F9hHZYLn3v7q3\ndMS0pMu4JAiW+VEm6soCYd0Ub918Xvgcjl2WgrU0ZT7NwtOAteQ2kmQhZE+0\n+96qTGhd4oomBy1g1kLtEIrGSpuK9MOC5jtKjCXkvqV+vR6LKDhCfXDNo+2K\nDIGMptZFMgoKKnWyUbQJ66hHM14DQGawpHkPTFjyV6A9zZbZUwpV71bdbmdS\nn7NrW1+ObadxvnUhKI9yn9oy5HK/EqcCl+xzvQHo5mf6BcDPao5vDd+StjM9\n37DXv2dZbhqivy6INOtAd40woLUB2Uq7QKSrVN7p8iNf6ZFYBqB+P060NJBf\n4qPK\r\n=bP1h\r\n-----END PGP SIGNATURE-----\r\n" }, "maintainers": [ { "name": "pmmmwh", "email": "pmmmwh@gmail.com" } ], "_npmUser": { "name": "pmmmwh", "email": "pmmmwh@gmail.com" }, "directories": {}, "_npmOperationalInternal": { "host": "s3://npm-registry-packages", "tmp": "tmp/react-refresh-webpack-plugin_0.1.3_1576730310335_0.6854689091455126" }, "_hasShrinkwrap": false }, "0.2.0": { "name": "@pmmmwh/react-refresh-webpack-plugin", "version": "0.2.0", "description": "An **EXPERIMENTAL** Webpack plugin to enable \"Fast Refresh\" (also previously known as _Hot Reloading_) for React components.", "keywords": [ "react", "javascript", "webpack", "refresh", "hmr", "hotreload", "livereload", "live", "edit", "hot", "reload" ], "homepage": "https://github.com/pmmmwh/react-refresh-webpack-plugin#readme", "bugs": { "url": "https://github.com/pmmmwh/react-refresh-webpack-plugin/issues" }, "repository": { "type": "git", "url": "git+https://github.com/pmmmwh/react-refresh-webpack-plugin.git" }, "license": "MIT", "author": { "name": "Michael Mok" }, "main": "src/index.js", "scripts": { "lint": "eslint --report-unused-disable-directives \"**/*.js\"", "lint:fix": "yarn lint --fix", "format": "prettier --write \"**/*.{js,jsx,json,md}\"", "format:check": "prettier --check \"**/*.{js,jsx,json,md}\"" }, "dependencies": { "ansi-html": "^0.0.7", "error-stack-parser": "^2.0.4", "html-entities": "^1.2.1", "lodash.debounce": "^4.0.8", "react-dev-utils": "^9.1.0" }, "devDependencies": { "eslint": "^6.7.2", "eslint-config-prettier": "^6.7.0", "prettier": "^1.18.2", "react-refresh": "^0.7.0", "webpack": "^4.41.2", "webpack-hot-middleware": "^2.25.0" }, "peerDependencies": { "react-refresh": ">= 0.7", "sockjs-client": "^1.4.0", "webpack-hot-middleware": "^2.25.0" }, "peerDependenciesMeta": { "sockjs-client": { "optional": true }, "webpack-hot-middleware": { "optional": true } }, "engines": { "node": ">= 8.x" }, "gitHead": "6e06450574bf76c3267e7c57793bf7131381b380", "_id": "@pmmmwh/react-refresh-webpack-plugin@0.2.0", "_nodeVersion": "12.14.0", "_npmVersion": "6.13.4", "dist": { "integrity": "sha512-rjdNzcWroULJeD/Y0+eETy9LhM7c5tbPF+wqT5G680rwDkh3iothIPEqGAuEE2WJlXEaAq293aO6ySzsIU518Q==", "shasum": "e2a684d430f74ad6465680d9a5869f52f307ec1e", "tarball": "https://registry.npmjs.org/@pmmmwh/react-refresh-webpack-plugin/-/react-refresh-webpack-plugin-0.2.0.tgz", "fileCount": 31, "unpackedSize": 59973, "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeXVQXCRA9TVsSAnZWagAA1ycP/RT2W4XdTZw2l71WpnYo\nDGqMvQKxwQTFQVkfhNLaad65dP9yANY13171ESa28+u66Gk+WKYs9RMLNU/2\nmNI8PfD4DafohBUDCb/+FHIuBDO+JzDmn51F0b98QOu9HvRy4cemcPLTRPQv\nqELFxXqQB6TipLEFheVpp2No+jhwWc43PHT7BL5JWk6TVo7ma1kO0idLyOE3\nrE7Mms1sR0hy3hjB07IOMJs/GTjuKV8ZAIyXYnn2dXlldNn+8NPlO8xBERF9\nik01KvpD8XhjCkyzlcqCQGEepxsoFWT/gkChlhCKb8qpdDOfMh3dygX8Pccp\nThf4Q2tSm+lBNnaNPdGNRUiRaa/18BQ2R4hZSXi6JiOyLM5tkIsm1Yy4AuO3\nebsBfqEPsyjPpC2AExWfItg5fmy6icSd/nsT7SB2uOK4trHh9jA6TuKrbIi9\nOccLQOX44KGYv7PULN5mfDZ0wvTS2kuasE1b9fXxVLad5ThCsKRgViliwq5B\n1/FyeqjRpMt6l1OHQmt1nL1UnKxnG30SwVx2nGQNm08MIChgePzIg7sdhtq7\nui9unPDS6SqRY5ywq+wpKt6g/2cf3eiUCwHc7pMpcSRWSvpo6PNIgQMQkDmr\nBqf+uOjzj138hLbFC25biqSMqT3jar9vk+LWLz2CxwPali8h8wo+DrPVbKHk\nny5a\r\n=7pOf\r\n-----END PGP SIGNATURE-----\r\n" }, "maintainers": [ { "name": "pmmmwh", "email": "pmmmwh@gmail.com" } ], "_npmUser": { "name": "pmmmwh", "email": "pmmmwh@gmail.com" }, "directories": {}, "_npmOperationalInternal": { "host": "s3://npm-registry-packages", "tmp": "tmp/react-refresh-webpack-plugin_0.2.0_1583174678809_0.38653473166381436" }, "_hasShrinkwrap": false }, "0.3.0-beta.0": { "name": "@pmmmwh/react-refresh-webpack-plugin", "version": "0.3.0-beta.0", "description": "An **EXPERIMENTAL** Webpack plugin to enable \"Fast Refresh\" (also previously known as _Hot Reloading_) for React components.", "keywords": [ "react", "javascript", "webpack", "refresh", "hmr", "hotreload", "livereload", "live", "edit", "hot", "reload" ], "homepage": "https://github.com/pmmmwh/react-refresh-webpack-plugin#readme", "bugs": { "url": "https://github.com/pmmmwh/react-refresh-webpack-plugin/issues" }, "repository": { "type": "git", "url": "git+https://github.com/pmmmwh/react-refresh-webpack-plugin.git" }, "license": "MIT", "author": { "name": "Michael Mok" }, "main": "src/index.js", "scripts": { "lint": "eslint --report-unused-disable-directives \"**/*.js\"", "lint:fix": "yarn lint --fix", "format": "prettier --write \"**/*.{js,jsx,json,md}\"", "format:check": "prettier --check \"**/*.{js,jsx,json,md}\"" }, "dependencies": { "ansi-html": "^0.0.7", "error-stack-parser": "^2.0.4", "html-entities": "^1.2.1", "lodash.debounce": "^4.0.8", "react-dev-utils": "^9.1.0" }, "devDependencies": { "eslint": "^6.7.2", "eslint-config-prettier": "^6.7.0", "prettier": "^1.18.2", "react-refresh": "^0.7.0", "webpack": "^4.41.2", "webpack-hot-middleware": "^2.25.0" }, "peerDependencies": { "react-refresh": ">= 0.7", "sockjs-client": "^1.4.0", "webpack-hot-middleware": "^2.25.0" }, "peerDependenciesMeta": { "sockjs-client": { "optional": true }, "webpack-hot-middleware": { "optional": true } }, "engines": { "node": ">= 8.x" }, "gitHead": "bd6dd947757264d15dab074d4b884123f3466f5c", "_id": "@pmmmwh/react-refresh-webpack-plugin@0.3.0-beta.0", "_nodeVersion": "12.14.0", "_npmVersion": "6.13.4", "dist": { "integrity": "sha512-wyMqWs8rLpL9mXqXjDPZsyTuzwyPH877uCUZtNQh2hbX2UG4D+z+YYRBRhh6SarUjYNjenmdSEBrX9ljmQvSVQ==", "shasum": "012d6e6bebde81627386f54beb36c8e4f0c6a1ad", "tarball": "https://registry.npmjs.org/@pmmmwh/react-refresh-webpack-plugin/-/react-refresh-webpack-plugin-0.3.0-beta.0.tgz", "fileCount": 33, "unpackedSize": 62914, "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeflfJCRA9TVsSAnZWagAAnnQP/2o3apdZOjJ0TG1sPezr\nPa8KS/fQv2dXsrHk46zC/tTdsODYUOIooziU3pPvIMS5P1wxOrcjFhjQndtL\nBfz7ZAbfydpdmOuqRi3V1sx1TiGtcoIPRTc2lV91/N3BiVx87Tgi6NNmfwwD\n+ked8JIbnTt+XqH5v8V8Ur4im77Zd6VQFgTy2Egh4Z5cxyuGwvBL3rDr1M4r\nX0zqXtWehTgOj+xx8h3XMuSGwQs13EnqTU5biVxIGwWUppuTHEzxpmFaU6yH\n1Xqbpv+1egLk7DfAJfaUhi/e6bqTGyvAJ68ZUua4rFNcBpoOfu8iNCcsG+2B\nCX2vT8l6jRJcmhdFo33iW7ODReKk9QDnKJGXcKFNfXVSAE+qIIH211BXXvR7\n6dexZQaYfdITqeCImtDGBI7b4zrkCW2dF1QvzCuCynL8BHwV7yjl2C0dXNwj\n+Mt9bMrvFjTIPNUgFwkZSs19k5IceJ7Yb/Rv0KPxDmxycNUcLy8ROtmcK04s\nzz3Sr554QSyVdSsKALVsmN2sO+q99J0czGU5k94wP3T3ePSn5KG65h9DSx/7\n7wjtJJIRUdpN2OeA7YRiQPhzPgyIxN6iCk5Sqy8+FnDKxJIL+1aMS1frASyJ\nIsxSTA7jZZ4W07TKQQ0siDdPBClonEY3CvooMM+c1RDvxiHEMKdvkPQ1G+vx\nkWY/\r\n=NyXv\r\n-----END PGP SIGNATURE-----\r\n" }, "maintainers": [ { "name": "pmmmwh", "email": "pmmmwh@gmail.com" } ], "_npmUser": { "name": "pmmmwh", "email": "pmmmwh@gmail.com" }, "directories": {}, "_npmOperationalInternal": { "host": "s3://npm-registry-packages", "tmp": "tmp/react-refresh-webpack-plugin_0.3.0-beta.0_1585338312616_0.19332716648198955" }, "_hasShrinkwrap": false }, "0.3.0-beta.1": { "name": "@pmmmwh/react-refresh-webpack-plugin", "version": "0.3.0-beta.1", "description": "An **EXPERIMENTAL** Webpack plugin to enable \"Fast Refresh\" (also previously known as _Hot Reloading_) for React components.", "keywords": [ "react", "javascript", "webpack", "refresh", "hmr", "hotreload", "livereload", "live", "edit", "hot", "reload" ], "homepage": "https://github.com/pmmmwh/react-refresh-webpack-plugin#readme", "bugs": { "url": "https://github.com/pmmmwh/react-refresh-webpack-plugin/issues" }, "repository": { "type": "git", "url": "git+https://github.com/pmmmwh/react-refresh-webpack-plugin.git" }, "license": "MIT", "author": { "name": "Michael Mok" }, "main": "src/index.js", "scripts": { "lint": "eslint --report-unused-disable-directives \"**/*.js\"", "lint:fix": "yarn lint --fix", "format": "prettier --write \"**/*.{js,jsx,ts,tsx,json,md}\"", "format:check": "prettier --check \"**/*.{js,jsx,ts,tsx,json,md}\"" }, "dependencies": { "ansi-html": "^0.0.7", "error-stack-parser": "^2.0.6", "html-entities": "^1.2.1", "lodash.debounce": "^4.0.8", "native-url": "^0.2.6" }, "devDependencies": { "eslint": "^6.8.0", "eslint-config-prettier": "^6.10.1", "prettier": "^2.0.2", "react-refresh": "^0.8.1", "webpack": "^4.42.1", "webpack-hot-middleware": "^2.25.0" }, "peerDependencies": { "react-refresh": "^0.8.1", "sockjs-client": "^1.4.0", "webpack-hot-middleware": "^2.25.0" }, "peerDependenciesMeta": { "sockjs-client": { "optional": true }, "webpack-hot-middleware": { "optional": true } }, "engines": { "node": ">= 8.x" }, "readme": "# React Refresh Webpack Plugin\n\n[![Latest Version](https://img.shields.io/npm/v/@pmmmwh/react-refresh-webpack-plugin/latest)](https://www.npmjs.com/package/@pmmmwh/react-refresh-webpack-plugin/v/latest)\n[![Next Version](https://img.shields.io/npm/v/@pmmmwh/react-refresh-webpack-plugin/next)](https://www.npmjs.com/package/@pmmmwh/react-refresh-webpack-plugin/v/next)\n[![License](https://img.shields.io/github/license/pmmmwh/react-refresh-webpack-plugin)](./LICENSE)\n\nAn **EXPERIMENTAL** Webpack plugin to enable \"Fast Refresh\" (also previously known as _Hot Reloading_) for React components.\n\n## Installation\n\nFirst - this plugin is not 100% stable.\nIt works pretty reliably, and we have been testing it for some time, but there are still edge cases yet to be discovered.\nPlease **DO NOT** use it if you cannot afford to face breaking changes in the future.\n\n```sh\n# if you prefer npm\nnpm install -D @pmmmwh/react-refresh-webpack-plugin react-refresh\n\n# if you prefer yarn\nyarn add -D @pmmmwh/react-refresh-webpack-plugin react-refresh\n```\n\n## Usage\n\nFirst, apply the plugin in your Webpack configuration as follows:\n\n**webpack.config.js**\n\n```js\nconst ReactRefreshWebpackPlugin = require('@pmmmwh/react-refresh-webpack-plugin');\n// ... your other imports\n\n// You can tie this to whatever mechanisms you are using to detect a development environment.\n// For example, as shown here, is to tie that to `NODE_ENV` -\n// Then if you run `NODE_ENV=production webpack`, the constant will be set to false.\nconst isDevelopment = process.env.NODE_ENV !== 'production';\n\nmodule.exports = {\n // It is suggested to run the plugin in development mode only\n // If you are an advanced user and would like to setup Webpack yourselves,\n // you can also use the `none` mode,\n // but you will need to set `forceEnable: true` in the plugin options.\n mode: isDevelopment ? 'development' : 'production',\n // ... other configurations\n plugins: [\n // ... other plugins\n // You could also keep the plugin in your production config,\n // It will simply do nothing.\n isDevelopment && new ReactRefreshWebpackPlugin(),\n ].filter(Boolean),\n};\n```\n\nThen, update your Babel configuration.\nThis can either be done in your Webpack config (via options of `babel-loader`), or in the form of a `.babelrc`/`babel.config.js`.\n\n**webpack.config.js** (if you choose to inline the config)\n\n```js\nconst isDevelopment = process.env.NODE_ENV !== 'production';\n\nmodule.exports = {\n // DO NOT apply the plugin in production mode!\n mode: isDevelopment ? 'development' : 'production',\n module: {\n rules: [\n // ... other rules\n {\n // for TypeScript, change the following to \"\\.[jt]sx?\"\n test: /\\.jsx?$/,\n exclude: /node_modules/,\n use: [\n // ... other loaders\n {\n loader: require.resolve('babel-loader'),\n options: {\n // ... other options\n // DO NOT apply the Babel plugin in production mode!\n plugins: [isDevelopment && require.resolve('react-refresh/babel')].filter(Boolean),\n },\n },\n ],\n },\n ],\n },\n};\n```\n\n**.babelrc.js** (if you choose to extract the config)\n\n```js\nmodule.exports = (api) => {\n // This caches the Babel config by environment.\n api.cache.using(() => process.env.NODE_ENV);\n return {\n // ... other options\n plugins: [\n // ... other plugins\n // Applies the react-refresh Babel plugin on non-production modes only\n !api.env('production') && 'react-refresh/babel',\n ].filter(Boolean),\n };\n};\n```\n\nMore sample projects for common Webpack development setups are available in the [examples](https://github.com/pmmmwh/react-refresh-webpack-plugin/tree/master/examples) folder.\n\n> Note: If you are using TypeScript (instead of Babel) as a transpiler, you will still need to use `babel-loader` to process your source code.\n> Check out this [sample project](https://github.com/pmmmwh/react-refresh-webpack-plugin/tree/master/examples/typescript-without-babel) on how to set this up.\n\n### Polyfill for Older Browsers (WDS Only)\n\nIf you need to develop on IE11, you will need to polyfill the DOM URL API.\nThis can be done by adding the following before any of your code in the main entry (either one is fine):\n\n**Using `url-polyfill`**\n\n```js\nimport 'url-polyfill';\n```\n\n**Using `core-js`**\n\n```js\nimport 'core-js/features/url';\nimport 'core-js/features/url-search-params';\n```\n\n**Using `react-app-polyfill`**\n\n```js\nimport 'react-app-polyfill/ie11';\nimport 'react-app-polyfill/stable';\n```\n\n## Options\n\nThis plugin accepts a few options that are specifically targeted for advanced users.\n\n### `options.forceEnable`\n\nType: `boolean`\nDefault: `false`\n\nEnables the plugin forcefully.\nUseful if you want to use the plugin in production, or if you are using Webpack's `none` mode without `NODE_ENV`, for example.\n\n### `options.overlay`\n\nType: `boolean | ErrorOverlayOptions`\nDefault: `undefined`\n\nModifies how the error overlay integration works in the plugin.\n\n- If `options.overlay` is not provided or is `true`, the plugin will use the bundled error overlay interation.\n- If `options.overlay` is `false`, it will disable the error overlay integration.\n- If an `ErrorOverlayOptions` object is provided:\n (**NOTE**: This is an advanced option that exists mostly for tools like `create-react-app` or `Next.js`)\n\n - A `module` property must be defined.\n It should reference a JS file that exports at least two functions with footprints as follows:\n\n ```ts\n function handleRuntimeError(error: Error) {}\n function clearRuntimeErrors() {}\n ```\n\n - An optional `entry` property could also be defined, which should also reference a JS file that contains code needed to set up your custom error overlay integration.\n If it is not defined, the bundled error overlay entry will be used.\n It expects the `module` file to export two more functions:\n\n ```ts\n function showCompileError(webpackErrorMessage: string) {}\n function clearCompileErrors() {}\n ```\n\n Note that `webpackErrorMessage` is ANSI encoded, so you will need logic to parse it.\n\n - An example configuration:\n ```js\n const options = {\n overlay: {\n entry: 'some-webpack-entry-file',\n module: 'some-error-overlay-module',\n },\n };\n ```\n\n### `options.sockHost`\n\nType: `string`\nDefault: effectively `window.location.hostname`\n\nSet this if you are running webpack on a host other than `window.location.hostname`. This is used by the error overlay module.\n\n### `options.sockPort`\n\nType: `number`\nDefault: effectively `window.location.port`\n\nSet this if you are running webpack on a port other than `window.location.port`\n\n### `options.sockPath`\n\nType: `string`\nDefault: `/sockjs-node`\n\n### `options.useLegacyWDSSockets`\n\nType: `boolean`\nDefault: `false`\n\nSet this to true if you are using a `webpack-dev-server` version prior to 3.8 as it requires a custom SockJS implementation.\nIf you use this feature, you will also need to install `sockjs-client` as a peer dependency.\n\n## Related Work\n\n- [Initial Implementation by @maisano](https://gist.github.com/maisano/441a4bc6b2954205803d68deac04a716)\n", "readmeFilename": "README.md", "gitHead": "b531682aad1cfd678a5daaf188682101e1aabc2f", "_id": "@pmmmwh/react-refresh-webpack-plugin@0.3.0-beta.1", "_nodeVersion": "12.14.0", "_npmVersion": "6.13.4", "dist": { "integrity": "sha512-rKPDf5ty7TZqP7/TGDmoG9NFHL+7pDEeKbrvLh+bXcru65gmoaGLS1garlgR2FEOclW3/E8kPhUrRultt89/vg==", "shasum": "2d33c80cdc152a549c511a877eecaffbcdd44f8c", "tarball": "https://registry.npmjs.org/@pmmmwh/react-refresh-webpack-plugin/-/react-refresh-webpack-plugin-0.3.0-beta.1.tgz", "fileCount": 33, "unpackedSize": 66476, "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJehRtwCRA9TVsSAnZWagAAoKUP/30JWR31lzgntoYnHgvG\ncW7iEketLwO3+bqq4NqSNT7pJP8Ij91B3aYfw4x0sbCST4XByvouvxgN7WRf\njjzwqm9XW9zDhJRnRfZyRxHOMLJuJY9hg+eK0xQQOwpq3dKN3vTIBzTCCY4t\ncjAc7Gd34BaaM9CJ6wXeyt1SEoNeDd+lZe0KbyYkYqY8SQ0qJHQjMYVV6isa\noWLiDSo5gxO/k0FPqtQtDefPenGEKLClkaWOuCHSgP/Anu6aYW3OTwEx3HLy\nk7sMA+Mpmmezqaf5ZL/GzMICHjvtR0+vRhjaJgw+soU1+lhXctG6v07LmUo2\n1cgjmO5k1c8KBxqL46kPP1zEQj3ibUUJYn3ziV6EZbra6ZrlPJNgiF7GAhnS\nxyYgNA7t+n2/1nMhHd7zlUPdF3xLr/Jtyh0ucHHHkpOWplMuFcJPyXSZPocZ\nGPXR54uHFkM19tjVcLS6tYxSDArExCgys4cVKsRtkRVdvdTWouJ+0PGPyPSS\n7oX2CGBH+wNUKZGHwTKFyk8nhfug/XIopV6tZbWOb1jLn8fWWq9uaIxf/vu9\nLo0xGHhh/kAT8AcDLLyGoCBeWzlULHV67ArzYq2YklooIHRJNPjtS+t4DqNL\nlJWxlyqe3gH4E8MfzAK4qRlE+r0deVS8qZ9RgIS/A3LO0MNuYRSmvSfX7rdN\na7l8\r\n=z1Vz\r\n-----END PGP SIGNATURE-----\r\n" }, "maintainers": [ { "name": "pmmmwh", "email": "pmmmwh@gmail.com" } ], "_npmUser": { "name": "pmmmwh", "email": "pmmmwh@gmail.com" }, "directories": {}, "_npmOperationalInternal": { "host": "s3://npm-registry-packages", "tmp": "tmp/react-refresh-webpack-plugin_0.3.0-beta.1_1585781616077_0.8257817366704598" }, "_hasShrinkwrap": false }, "0.3.0-beta.2": { "name": "@pmmmwh/react-refresh-webpack-plugin", "version": "0.3.0-beta.2", "description": "An **EXPERIMENTAL** Webpack plugin to enable \"Fast Refresh\" (also previously known as _Hot Reloading_) for React components.", "keywords": [ "react", "javascript", "webpack", "refresh", "hmr", "hotreload", "livereload", "live", "edit", "hot", "reload" ], "homepage": "https://github.com/pmmmwh/react-refresh-webpack-plugin#readme", "bugs": { "url": "https://github.com/pmmmwh/react-refresh-webpack-plugin/issues" }, "repository": { "type": "git", "url": "git+https://github.com/pmmmwh/react-refresh-webpack-plugin.git" }, "license": "MIT", "author": { "name": "Michael Mok" }, "main": "src/index.js", "scripts": { "lint": "eslint --report-unused-disable-directives \"**/*.js\"", "lint:fix": "yarn lint --fix", "format": "prettier --write \"**/*.{js,jsx,ts,tsx,json,md}\"", "format:check": "prettier --check \"**/*.{js,jsx,ts,tsx,json,md}\"" }, "dependencies": { "ansi-html": "^0.0.7", "error-stack-parser": "^2.0.6", "html-entities": "^1.2.1", "lodash.debounce": "^4.0.8", "native-url": "^0.2.6" }, "devDependencies": { "eslint": "^6.8.0", "eslint-config-prettier": "^6.10.1", "prettier": "^2.0.2", "react-refresh": "^0.8.1", "webpack": "^4.42.1", "webpack-hot-middleware": "^2.25.0" }, "peerDependencies": { "react-refresh": "^0.8.1", "sockjs-client": "^1.4.0", "webpack-hot-middleware": "^2.25.0" }, "peerDependenciesMeta": { "sockjs-client": { "optional": true }, "webpack-hot-middleware": { "optional": true } }, "engines": { "node": ">= 8.x" }, "readme": "# React Refresh Webpack Plugin\n\n[![Latest Version](https://img.shields.io/npm/v/@pmmmwh/react-refresh-webpack-plugin/latest)](https://www.npmjs.com/package/@pmmmwh/react-refresh-webpack-plugin/v/latest)\n[![Next Version](https://img.shields.io/npm/v/@pmmmwh/react-refresh-webpack-plugin/next)](https://www.npmjs.com/package/@pmmmwh/react-refresh-webpack-plugin/v/next)\n[![License](https://img.shields.io/github/license/pmmmwh/react-refresh-webpack-plugin)](./LICENSE)\n\nAn **EXPERIMENTAL** Webpack plugin to enable \"Fast Refresh\" (also previously known as _Hot Reloading_) for React components.\n\n## Installation\n\nFirst - this plugin is not 100% stable.\nIt works pretty reliably, and we have been testing it for some time, but there are still edge cases yet to be discovered.\nPlease **DO NOT** use it if you cannot afford to face breaking changes in the future.\n\n```sh\n# if you prefer npm\nnpm install -D @pmmmwh/react-refresh-webpack-plugin react-refresh\n\n# if you prefer yarn\nyarn add -D @pmmmwh/react-refresh-webpack-plugin react-refresh\n```\n\n## Usage\n\nFirst, apply the plugin in your Webpack configuration as follows:\n\n**webpack.config.js**\n\n```js\nconst ReactRefreshWebpackPlugin = require('@pmmmwh/react-refresh-webpack-plugin');\n// ... your other imports\n\n// You can tie this to whatever mechanisms you are using to detect a development environment.\n// For example, as shown here, is to tie that to `NODE_ENV` -\n// Then if you run `NODE_ENV=production webpack`, the constant will be set to false.\nconst isDevelopment = process.env.NODE_ENV !== 'production';\n\nmodule.exports = {\n // It is suggested to run the plugin in development mode only\n // If you are an advanced user and would like to setup Webpack yourselves,\n // you can also use the `none` mode,\n // but you will need to set `forceEnable: true` in the plugin options.\n mode: isDevelopment ? 'development' : 'production',\n // ... other configurations\n plugins: [\n // ... other plugins\n // You could also keep the plugin in your production config,\n // It will simply do nothing.\n isDevelopment && new ReactRefreshWebpackPlugin(),\n ].filter(Boolean),\n};\n```\n\nThen, update your Babel configuration.\nThis can either be done in your Webpack config (via options of `babel-loader`), or in the form of a `.babelrc`/`babel.config.js`.\n\n**webpack.config.js** (if you choose to inline the config)\n\n```js\nconst isDevelopment = process.env.NODE_ENV !== 'production';\n\nmodule.exports = {\n // DO NOT apply the plugin in production mode!\n mode: isDevelopment ? 'development' : 'production',\n module: {\n rules: [\n // ... other rules\n {\n // for TypeScript, change the following to \"\\.[jt]sx?\"\n test: /\\.jsx?$/,\n exclude: /node_modules/,\n use: [\n // ... other loaders\n {\n loader: require.resolve('babel-loader'),\n options: {\n // ... other options\n // DO NOT apply the Babel plugin in production mode!\n plugins: [isDevelopment && require.resolve('react-refresh/babel')].filter(Boolean),\n },\n },\n ],\n },\n ],\n },\n};\n```\n\n**.babelrc.js** (if you choose to extract the config)\n\n```js\nmodule.exports = (api) => {\n // This caches the Babel config by environment.\n api.cache.using(() => process.env.NODE_ENV);\n return {\n // ... other options\n plugins: [\n // ... other plugins\n // Applies the react-refresh Babel plugin on non-production modes only\n !api.env('production') && 'react-refresh/babel',\n ].filter(Boolean),\n };\n};\n```\n\nMore sample projects for common Webpack development setups are available in the [examples](https://github.com/pmmmwh/react-refresh-webpack-plugin/tree/master/examples) folder.\n\n> Note: If you are using TypeScript (instead of Babel) as a transpiler, you will still need to use `babel-loader` to process your source code.\n> Check out this [sample project](https://github.com/pmmmwh/react-refresh-webpack-plugin/tree/master/examples/typescript-without-babel) on how to set this up.\n\n### Polyfill for Older Browsers\n\nIf you need to develop on IE11, you will need to polyfill the DOM URL API.\nThis can be done by adding the following before any of your code in the main entry (either one is fine):\n\n**Using `url-polyfill`**\n\n```js\nimport 'url-polyfill';\n```\n\n**Using `core-js`**\n\n```js\nimport 'core-js/features/url';\nimport 'core-js/features/url-search-params';\n```\n\n**Using `react-app-polyfill`**\n\n```js\nimport 'react-app-polyfill/ie11';\nimport 'react-app-polyfill/stable';\n```\n\n## Options\n\nThis plugin accepts a few options that are specifically targeted for advanced users.\n\n### `options.forceEnable`\n\nType: `boolean`\nDefault: `false`\n\nEnables the plugin forcefully.\nUseful if you want to use the plugin in production, or if you are using Webpack's `none` mode without `NODE_ENV`, for example.\n\n### `options.overlay`\n\nType: `boolean | ErrorOverlayOptions`\nDefault: `undefined`\n\nModifies how the error overlay integration works in the plugin.\n\n- If `options.overlay` is not provided or is `true`, the plugin will use the bundled error overlay interation.\n- If `options.overlay` is `false`, it will disable the error overlay integration.\n- If an `ErrorOverlayOptions` object is provided:\n (**NOTE**: This is an advanced option that exists mostly for tools like `create-react-app` or `Next.js`)\n\n - An optional `module` property could be defined.\n If it is not defined, the bundled error overlay will be used.\n If defined, it should reference a JS file that exports at least two functions with footprints as follows:\n\n ```ts\n function handleRuntimeError(error: Error) {}\n function clearRuntimeErrors() {}\n ```\n\n - An optional `entry` property could be defined, which should also reference a JS file that contains code needed to set up your custom error overlay integration.\n If it is not defined, the bundled error overlay entry will be used.\n It expects the `module` file to export two more functions:\n\n ```ts\n function showCompileError(webpackErrorMessage: string) {}\n function clearCompileErrors() {}\n ```\n\n Note that `webpackErrorMessage` is ANSI encoded, so you will need logic to parse it.\n\n - An example configuration:\n ```js\n const options = {\n overlay: {\n entry: 'some-webpack-entry-file',\n module: 'some-error-overlay-module',\n },\n };\n ```\n\n#### `options.overlay.sockHost`\n\nType: `string`\nDefault: `window.location.hostname`\n\nSet this if you are running webpack on a host other than `window.location.hostname`.\nThis will be used by the error overlay module, and is available for `webpack-dev-server` only.\n\n#### `options.overlay.sockIntegration`\n\nType: `wds` or `whm` or `string`\nDefault: `wds`\n\nThis controls how the error overlay connects to the sockets provided by several Webpack hot reload integrations.\n\n- If you use `webpack-dev-server`, you don't need to set this as it defaults to `wds`.\n- If you use `webpack-hot-middleware`, you should set this to `whm`.\n- If you use anything else, you will have to provide a path to a module that will accept a message handler function and initializes the socket connection.\n See the [`runtime/sockets`](https://github.com/pmmmwh/react-refresh-webpack-plugin/tree/master/src/runtime/sockets) folder for sample implementations.\n\n#### `options.overlay.sockPort`\n\nType: `number`\nDefault: `window.location.port`\n\nSet this if you are running webpack on a port other than `window.location.port`.\nThis will be used by the error overlay module, and is available for `webpack-dev-server` only.\n\n#### `options.overlay.sockPath`\n\nType: `string`\nDefault: `/sockjs-node`\n\nSet this if you are running webpack on a custom path.\nThis will be used by the error overlay module, and is available for `webpack-dev-server` only.\n\n### `options.useLegacyWDSSockets`\n\nType: `boolean`\nDefault: `false`\n\nSet this to true if you are using a `webpack-dev-server` version prior to 3.8 as it requires a custom SockJS implementation.\nIf you use this feature, you will also need to install `sockjs-client` as a peer dependency.\n\n## Related Work\n\n- [Initial Implementation by @maisano](https://gist.github.com/maisano/441a4bc6b2954205803d68deac04a716)\n", "readmeFilename": "README.md", "gitHead": "d11361d5a4d3ba8bdc991662ce4fdf3ab607d8ed", "_id": "@pmmmwh/react-refresh-webpack-plugin@0.3.0-beta.2", "_nodeVersion": "12.14.0", "_npmVersion": "6.13.4", "dist": { "integrity": "sha512-upq6YZA44lacTbab8kRuNTGPtoT9mvAWuce8UztX3/OnZHaDiyrV5aW25WGVEKp5h3L3K+Fg+cqTcPOY/gTSww==", "shasum": "47b48d1d99ae533cee823333530555c6b5a5cc48", "tarball": "https://registry.npmjs.org/@pmmmwh/react-refresh-webpack-plugin/-/react-refresh-webpack-plugin-0.3.0-beta.2.tgz", "fileCount": 35, "unpackedSize": 71334, "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJejO3NCRA9TVsSAnZWagAAFQQP/R6v+e+iecBAzRw/2LLp\nwKj9hvrHM4+uTSD0PKyanUpQ6lPpzGS3gmKI84pyvLQ7BRKqbIoIn6UrdyX1\n1zQ51VOzhULp90XN3gjhkePR52Kkd+cCivkymI8onoZzkPfr3bBSKnX2EZU/\nEbMb04u1PIaujUMFPbOx4M7928B3+G3FM8IjuJYglgDoi4ad5oi6Hm/wndcR\nRAfMkTE3azmM5o3TLMd556pivyXYadAyyZ2YCrMGH83EskQpZb6qlsekf2gR\ngK9Sti7/wHi1G8tK2py9+bl7rab6EQQOw8yC/jqJPSc9qDnO3OlcqeZluM5u\nUAH3uJCDD7pkpD1sa8vq0yAk/cIk4i6ji1OEOrrZ9rDH215gwuG7fbYiDMEb\ndSGXpvEFoYzA1rQEdtbnSQU7T5+aPjYeompSU8nsMuhKS1tUgZVCTX4zVv9N\nzNVO66dxQyNDGwtBajrtUNn9ep9jC8O8Y2CM2YwP88hI3GP15V8L1ijhgJId\n4+mJXKHDMm+BBKQfQ0xEvWjwrUM6knZgwQKbpidzdUtAmyq4N9v8kYQkdWNk\n7n37XB1sb6Ab3OxPgO8PvZTtx+YKeQexL7lk5uCZzUc/fx9HmgvZJv8lBqn3\nig3Dy5yTuL/D22DedYrRyFutmzPZcrIZdCwUZFal9YauyRVeo8Ch2K0NQdAK\n6cp3\r\n=4/SG\r\n-----END PGP SIGNATURE-----\r\n" }, "maintainers": [ { "name": "pmmmwh", "email": "pmmmwh@gmail.com" } ], "_npmUser": { "name": "pmmmwh", "email": "pmmmwh@gmail.com" }, "directories": {}, "_npmOperationalInternal": { "host": "s3://npm-registry-packages", "tmp": "tmp/react-refresh-webpack-plugin_0.3.0-beta.2_1586294220624_0.5770131363261806" }, "_hasShrinkwrap": false }, "0.3.0-beta.3": { "name": "@pmmmwh/react-refresh-webpack-plugin", "version": "0.3.0-beta.3", "description": "An **EXPERIMENTAL** Webpack plugin to enable \"Fast Refresh\" (also previously known as _Hot Reloading_) for React components.", "keywords": [ "react", "javascript", "webpack", "refresh", "hmr", "hotreload", "livereload", "live", "edit", "hot", "reload" ], "homepage": "https://github.com/pmmmwh/react-refresh-webpack-plugin#readme", "bugs": { "url": "https://github.com/pmmmwh/react-refresh-webpack-plugin/issues" }, "repository": { "type": "git", "url": "git+https://github.com/pmmmwh/react-refresh-webpack-plugin.git" }, "license": "MIT", "author": { "name": "Michael Mok" }, "main": "src/index.js", "scripts": { "lint": "eslint --report-unused-disable-directives \"**/*.js\"", "lint:fix": "yarn lint --fix", "format": "prettier --write \"**/*.{js,jsx,ts,tsx,json,md}\"", "format:check": "prettier --check \"**/*.{js,jsx,ts,tsx,json,md}\"" }, "dependencies": { "ansi-html": "^0.0.7", "error-stack-parser": "^2.0.6", "html-entities": "^1.2.1", "lodash.debounce": "^4.0.8", "native-url": "^0.2.6" }, "devDependencies": { "eslint": "^6.8.0", "eslint-config-prettier": "^6.10.1", "prettier": "^2.0.2", "react-refresh": "^0.8.1", "webpack": "^4.42.1", "webpack-hot-middleware": "^2.25.0" }, "peerDependencies": { "react-refresh": "^0.8.1", "sockjs-client": "^1.4.0", "webpack-hot-middleware": "^2.25.0" }, "peerDependenciesMeta": { "sockjs-client": { "optional": true }, "webpack-hot-middleware": { "optional": true } }, "engines": { "node": ">= 8.x" }, "readme": "# React Refresh Webpack Plugin\n\n[![Latest Version](https://img.shields.io/npm/v/@pmmmwh/react-refresh-webpack-plugin/latest)](https://www.npmjs.com/package/@pmmmwh/react-refresh-webpack-plugin/v/latest)\n[![Next Version](https://img.shields.io/npm/v/@pmmmwh/react-refresh-webpack-plugin/next)](https://www.npmjs.com/package/@pmmmwh/react-refresh-webpack-plugin/v/next)\n[![License](https://img.shields.io/github/license/pmmmwh/react-refresh-webpack-plugin)](./LICENSE)\n\nAn **EXPERIMENTAL** Webpack plugin to enable \"Fast Refresh\" (also previously known as _Hot Reloading_) for React components.\n\n## Installation\n\nFirst - this plugin is not 100% stable.\nIt works pretty reliably, and we have been testing it for some time, but there are still edge cases yet to be discovered.\nPlease **DO NOT** use it if you cannot afford to face breaking changes in the future.\n\n```sh\n# if you prefer npm\nnpm install -D @pmmmwh/react-refresh-webpack-plugin react-refresh\n\n# if you prefer yarn\nyarn add -D @pmmmwh/react-refresh-webpack-plugin react-refresh\n```\n\n## Usage\n\nFirst, apply the plugin in your Webpack configuration as follows:\n\n**webpack.config.js**\n\n```js\nconst ReactRefreshWebpackPlugin = require('@pmmmwh/react-refresh-webpack-plugin');\n// ... your other imports\n\n// You can tie this to whatever mechanisms you are using to detect a development environment.\n// For example, as shown here, is to tie that to `NODE_ENV` -\n// Then if you run `NODE_ENV=production webpack`, the constant will be set to false.\nconst isDevelopment = process.env.NODE_ENV !== 'production';\n\nmodule.exports = {\n // It is suggested to run the plugin in development mode only\n // If you are an advanced user and would like to setup Webpack yourselves,\n // you can also use the `none` mode,\n // but you will need to set `forceEnable: true` in the plugin options.\n mode: isDevelopment ? 'development' : 'production',\n // ... other configurations\n plugins: [\n // ... other plugins\n // You could also keep the plugin in your production config,\n // It will simply do nothing.\n isDevelopment && new ReactRefreshWebpackPlugin(),\n ].filter(Boolean),\n};\n```\n\nThen, update your Babel configuration.\nThis can either be done in your Webpack config (via options of `babel-loader`), or in the form of a `.babelrc`/`babel.config.js`.\n\n**webpack.config.js** (if you choose to inline the config)\n\n```js\nconst isDevelopment = process.env.NODE_ENV !== 'production';\n\nmodule.exports = {\n // DO NOT apply the plugin in production mode!\n mode: isDevelopment ? 'development' : 'production',\n module: {\n rules: [\n // ... other rules\n {\n // for TypeScript, change the following to \"\\.[jt]sx?\"\n test: /\\.jsx?$/,\n exclude: /node_modules/,\n use: [\n // ... other loaders\n {\n loader: require.resolve('babel-loader'),\n options: {\n // ... other options\n // DO NOT apply the Babel plugin in production mode!\n plugins: [isDevelopment && require.resolve('react-refresh/babel')].filter(Boolean),\n },\n },\n ],\n },\n ],\n },\n};\n```\n\n**.babelrc.js** (if you choose to extract the config)\n\n```js\nmodule.exports = (api) => {\n // This caches the Babel config by environment.\n api.cache.using(() => process.env.NODE_ENV);\n return {\n // ... other options\n plugins: [\n // ... other plugins\n // Applies the react-refresh Babel plugin on non-production modes only\n !api.env('production') && 'react-refresh/babel',\n ].filter(Boolean),\n };\n};\n```\n\nMore sample projects for common Webpack development setups are available in the [examples](https://github.com/pmmmwh/react-refresh-webpack-plugin/tree/master/examples) folder.\n\n> Note: If you are using TypeScript (instead of Babel) as a transpiler, you will still need to use `babel-loader` to process your source code.\n> Check out this [sample project](https://github.com/pmmmwh/react-refresh-webpack-plugin/tree/master/examples/typescript-without-babel) on how to set this up.\n\n### Polyfill for Older Browsers\n\nIf you need to develop on IE11, you will need to polyfill the DOM URL API.\nThis can be done by adding the following before any of your code in the main entry (either one is fine):\n\n**Using `url-polyfill`**\n\n```js\nimport 'url-polyfill';\n```\n\n**Using `core-js`**\n\n```js\nimport 'core-js/features/url';\nimport 'core-js/features/url-search-params';\n```\n\n**Using `react-app-polyfill`**\n\n```js\nimport 'react-app-polyfill/ie11';\nimport 'react-app-polyfill/stable';\n```\n\n## Options\n\nThis plugin accepts a few options that are specifically targeted for advanced users.\n\n### `options.forceEnable`\n\nType: `boolean`\nDefault: `false`\n\nEnables the plugin forcefully.\nUseful if you want to use the plugin in production, or if you are using Webpack's `none` mode without `NODE_ENV`, for example.\n\n### `options.overlay`\n\nType: `boolean | ErrorOverlayOptions`\nDefault: `undefined`\n\nModifies how the error overlay integration works in the plugin.\n\n- If `options.overlay` is not provided or is `true`, the plugin will use the bundled error overlay interation.\n- If `options.overlay` is `false`, it will disable the error overlay integration.\n- If an `ErrorOverlayOptions` object is provided:\n (**NOTE**: This is an advanced option that exists mostly for tools like `create-react-app` or `Next.js`)\n\n - An optional `module` property could be defined.\n If it is not defined, the bundled error overlay will be used.\n If defined, it should reference a JS file that exports at least two functions with footprints as follows:\n\n ```ts\n function handleRuntimeError(error: Error) {}\n function clearRuntimeErrors() {}\n ```\n\n - An optional `entry` property could be defined, which should also reference a JS file that contains code needed to set up your custom error overlay integration.\n If it is not defined, the bundled error overlay entry will be used.\n It expects the `module` file to export two more functions:\n\n ```ts\n function showCompileError(webpackErrorMessage: string) {}\n function clearCompileErrors() {}\n ```\n\n Note that `webpackErrorMessage` is ANSI encoded, so you will need logic to parse it.\n\n - An example configuration:\n ```js\n const options = {\n overlay: {\n entry: 'some-webpack-entry-file',\n module: 'some-error-overlay-module',\n },\n };\n ```\n\n#### `options.overlay.sockHost`\n\nType: `string`\nDefault: `window.location.hostname`\n\nSet this if you are running webpack on a host other than `window.location.hostname`.\nThis will be used by the error overlay module, and is available for `webpack-dev-server` only.\n\n#### `options.overlay.sockIntegration`\n\nType: `wds` or `whm` or `string`\nDefault: `wds`\n\nThis controls how the error overlay connects to the sockets provided by several Webpack hot reload integrations.\n\n- If you use `webpack-dev-server`, you don't need to set this as it defaults to `wds`.\n- If you use `webpack-hot-middleware`, you should set this to `whm`.\n- If you use anything else, you will have to provide a path to a module that will accept a message handler function and initializes the socket connection.\n See the [`runtime/sockets`](https://github.com/pmmmwh/react-refresh-webpack-plugin/tree/master/src/runtime/sockets) folder for sample implementations.\n\n#### `options.overlay.sockPort`\n\nType: `number`\nDefault: `window.location.port`\n\nSet this if you are running webpack on a port other than `window.location.port`.\nThis will be used by the error overlay module, and is available for `webpack-dev-server` only.\n\n#### `options.overlay.sockPath`\n\nType: `string`\nDefault: `/sockjs-node`\n\nSet this if you are running webpack on a custom path.\nThis will be used by the error overlay module, and is available for `webpack-dev-server` only.\n\n### `options.useLegacyWDSSockets`\n\nType: `boolean`\nDefault: `false`\n\nSet this to true if you are using a `webpack-dev-server` version prior to 3.8 as it requires a custom SockJS implementation.\nIf you use this feature, you will also need to install `sockjs-client` as a peer dependency.\n\n## Related Work\n\n- [Initial Implementation by @maisano](https://gist.github.com/maisano/441a4bc6b2954205803d68deac04a716)\n", "readmeFilename": "README.md", "gitHead": "e23275c49651a060540fa7abc151a202e97d541c", "_id": "@pmmmwh/react-refresh-webpack-plugin@0.3.0-beta.3", "_nodeVersion": "12.14.0", "_npmVersion": "6.13.4", "dist": { "integrity": "sha512-r1LSoEjgKNiAe6b9dVO5sVqVPsTbpJI1RFZVZOfjyKDaqcPDw2JLZXYUwaGAjgFVsGYD0X+Zt3Epa47IOlgh3g==", "shasum": "0a70be4efc99895f89262e622e7da37386732735", "tarball": "https://registry.npmjs.org/@pmmmwh/react-refresh-webpack-plugin/-/react-refresh-webpack-plugin-0.3.0-beta.3.tgz", "fileCount": 35, "unpackedSize": 71476, "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJej5bhCRA9TVsSAnZWagAAiaYP/1dAvI2isn9h1oK97El/\nm/w3o4NKViLIwjqzRjMVEfe/URABcTd0hk4YEPJPXAHIFUEmA7i9YNCEYLSP\n0cJord7NINEPqHAxB/e43kTkdidzV6F1uxiZK6o75dHjKM+dcb461LzChaBT\noMHbA/CfRMPx4O9FJfakTJ1lzWVmXICkrmw+OHKoAzmcy77QdaiwM27ugPHI\nBKUzKzV8eyjikxpI0jul0E3ULnQp8tTGXKSv4EpIEKPdp9yJyS7AA6zHwRVT\noDwr271N4aTLMRlz3Mxg6+/567Ud0p4fDAo/3KWmm93WuAtTiq+DgtHJCkEZ\nyn8347lyRqWX6yd7YIwfDHSU+Jd+EKB+52iMylH+VLkb81hxxpeYvOyXNSs3\nGYHTW7VHILbSI0jsWQs3cWKQStiXdTLXFY6aKO+ZNckFunX2y4u7rCXCV+w3\nEKI0ICbr1GEmgmGxX2Rg2H6NtmHoOtWTBbIMp7qu/r1DG0ZRjPQJbR+6nWaw\nxII7W7CUGrhSu5w67HoQc1wPyrLhIW4PhkOqfJBmmGzFfEeG+vPYnZk9uBCr\nuQFJblOkp7K6IvrfXu9oumRWluhcFNdrsKPcbNM1kAIedy0dtKMfTDmKiT0X\naXROhWiFDEkbqyB+7nrGMMMQmKqABpb1dsK+FPJCVlnViC4L3MDcxCWMnRok\nMxc/\r\n=zxEg\r\n-----END PGP SIGNATURE-----\r\n" }, "maintainers": [ { "name": "pmmmwh", "email": "pmmmwh@gmail.com" } ], "_npmUser": { "name": "pmmmwh", "email": "pmmmwh@gmail.com" }, "directories": {}, "_npmOperationalInternal": { "host": "s3://npm-registry-packages", "tmp": "tmp/react-refresh-webpack-plugin_0.3.0-beta.3_1586468577257_0.5686384947356811" }, "_hasShrinkwrap": false }, "0.3.0-beta.4": { "name": "@pmmmwh/react-refresh-webpack-plugin", "version": "0.3.0-beta.4", "description": "An **EXPERIMENTAL** Webpack plugin to enable \"Fast Refresh\" (also previously known as _Hot Reloading_) for React components.", "keywords": [ "react", "javascript", "webpack", "refresh", "hmr", "hotreload", "livereload", "live", "edit", "hot", "reload" ], "homepage": "https://github.com/pmmmwh/react-refresh-webpack-plugin#readme", "bugs": { "url": "https://github.com/pmmmwh/react-refresh-webpack-plugin/issues" }, "repository": { "type": "git", "url": "git+https://github.com/pmmmwh/react-refresh-webpack-plugin.git" }, "license": "MIT", "author": { "name": "Michael Mok" }, "main": "src/index.js", "scripts": { "lint": "eslint --report-unused-disable-directives --ext .js .", "lint:fix": "yarn lint --fix", "format": "prettier --write \"**/*.{js,jsx,ts,tsx,json,md}\"", "format:check": "prettier --check \"**/*.{js,jsx,ts,tsx,json,md}\"", "generate-types": "tsc -p tsconfig.json && rimraf \"types/{helpers,runtime}\"", "prepublishOnly": "rimraf types && yarn generate-types" }, "dependencies": { "ansi-html": "^0.0.7", "error-stack-parser": "^2.0.6", "html-entities": "^1.2.1", "lodash.debounce": "^4.0.8", "native-url": "^0.2.6", "schema-utils": "^2.6.5" }, "devDependencies": { "@types/json-schema": "^7.0.4", "@types/node": "^13.11.1", "@types/webpack": "^4.41.11", "eslint": "^6.8.0", "eslint-config-prettier": "^6.10.1", "prettier": "^2.0.4", "react-refresh": "^0.8.1", "rimraf": "^3.0.2", "typescript": "^3.8.3", "webpack": "^4.42.1", "webpack-hot-middleware": "^2.25.0" }, "peerDependencies": { "@types/webpack": "^4.41.11", "react-refresh": "^0.8.1", "sockjs-client": "^1.4.0", "type-fest": "^0.13.1", "webpack-hot-middleware": "^2.25.0" }, "peerDependenciesMeta": { "@types/webpack": { "optional": true }, "sockjs-client": { "optional": true }, "type-fest": { "optional": true }, "webpack-hot-middleware": { "optional": true } }, "engines": { "node": ">= 8.x" }, "gitHead": "64a60d0d921a41f7423d745ccb0aae7347a263ec", "_id": "@pmmmwh/react-refresh-webpack-plugin@0.3.0-beta.4", "_nodeVersion": "12.14.0", "_npmVersion": "6.13.4", "dist": { "integrity": "sha512-yHklACzfrVes87tl5nCFKOWng1/vBVDdCS51ib0FyFLN3HE4buXi5q8Dp4sV7c/xetxd3cLBSi6/yIqry2Dw9A==", "shasum": "84bf67c7f2d532957b15af61387666ea83cbcb92", "tarball": "https://registry.npmjs.org/@pmmmwh/react-refresh-webpack-plugin/-/react-refresh-webpack-plugin-0.3.0-beta.4.tgz", "fileCount": 37, "unpackedSize": 77589, "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJenRZLCRA9TVsSAnZWagAAtooP/jRulEOe1Zehk1IV89Tu\nPYSaVDG8oFN3uuKio1kaqKDGeNUNHDyiM7sbH8aHnP09q0VAVj2Tyh80Doy6\n7hmr2rvBh6Y+2feHG3eELiCcohjklwSpFNBPhy4RrwZxSVywrZHCtW5JCDLm\nLvrWaJTDjKMQqRFnLFhClK1Q2JJ/9rfH0EJwwre8/YwJQJCxvKnyrwm+TAlZ\nhS2yEBSISyb63rTYl1+U91TB8gC3j8Ymuvs5aCSQKXaHpoEivgFsGTrPYFPy\nfB/GJpaKzcDo5jqu0HYl8KFKVpgjFFkT+pz9MO21ZuukM9SfrInEhWlrNDp2\n2fxz7EY2NQ5dLVO5mqCKzRfTvZAyjbvr5OFvt1b1gG/GkkaayQk0Lr0UixS4\nvjCX8BvQAhTWXY3J1x7AmzITd9SbgZm6JfiuZlhorZCJGsnTRaV+oCA/wLOe\nNvd3Evh6/G3pfWL9jcrCPtK9yVMUwuOK3miHS8LjcqqZGck29EAvS1ATHBfY\nvMi/tB9N4q8Zh5gTAVXWBhG6SmnWsebwXvtH4JWGneK14A22CKi4xg8z/M2G\nmkBJbHI6y8/dcrllp1BwvASwk/B1LbEbO5aCu3sYl5UkSFjQhF34VmknhAWf\npMSS2DeSlvF6xjIDj5BuwwPK3Oy1FbdW8omCtFJ/XqjrwEar7kH+OgZREyWq\nEzLK\r\n=J/3x\r\n-----END PGP SIGNATURE-----\r\n" }, "maintainers": [ { "name": "pmmmwh", "email": "pmmmwh@gmail.com" } ], "_npmUser": { "name": "pmmmwh", "email": "pmmmwh@gmail.com" }, "directories": {}, "_npmOperationalInternal": { "host": "s3://npm-registry-packages", "tmp": "tmp/react-refresh-webpack-plugin_0.3.0-beta.4_1587353163350_0.4303232629009415" }, "_hasShrinkwrap": false }, "0.3.0-beta.5": { "name": "@pmmmwh/react-refresh-webpack-plugin", "version": "0.3.0-beta.5", "description": "An **EXPERIMENTAL** Webpack plugin to enable \"Fast Refresh\" (also previously known as _Hot Reloading_) for React components.", "keywords": [ "react", "javascript", "webpack", "refresh", "hmr", "hotreload", "livereload", "live", "edit", "hot", "reload" ], "homepage": "https://github.com/pmmmwh/react-refresh-webpack-plugin#readme", "bugs": { "url": "https://github.com/pmmmwh/react-refresh-webpack-plugin/issues" }, "repository": { "type": "git", "url": "git+https://github.com/pmmmwh/react-refresh-webpack-plugin.git" }, "license": "MIT", "author": { "name": "Michael Mok" }, "main": "src/index.js", "types": "types/index.d.ts", "scripts": { "lint": "eslint --report-unused-disable-directives --ext .js .", "lint:fix": "yarn lint --fix", "format": "prettier --write \"**/*.{js,jsx,ts,tsx,json,md}\"", "format:check": "prettier --check \"**/*.{js,jsx,ts,tsx,json,md}\"", "generate-types": "tsc -p tsconfig.json && rimraf \"types/{helpers,runtime}\"", "prepublishOnly": "rimraf types && yarn generate-types" }, "dependencies": { "ansi-html": "^0.0.7", "error-stack-parser": "^2.0.6", "html-entities": "^1.2.1", "lodash.debounce": "^4.0.8", "native-url": "^0.2.6", "schema-utils": "^2.6.5" }, "devDependencies": { "@types/json-schema": "^7.0.4", "@types/node": "^13.11.1", "@types/webpack": "^4.41.11", "eslint": "^6.8.0", "eslint-config-prettier": "^6.10.1", "prettier": "^2.0.4", "react-refresh": "^0.8.1", "rimraf": "^3.0.2", "typescript": "^3.8.3", "webpack": "^4.42.1", "webpack-hot-middleware": "^2.25.0" }, "peerDependencies": { "@types/webpack": "^4.41.11", "react-refresh": "^0.8.1", "sockjs-client": "^1.4.0", "type-fest": "^0.13.1", "webpack-hot-middleware": "^2.25.0" }, "peerDependenciesMeta": { "@types/webpack": { "optional": true }, "sockjs-client": { "optional": true }, "type-fest": { "optional": true }, "webpack-hot-middleware": { "optional": true } }, "engines": { "node": ">= 8.x" }, "readme": "# React Refresh Webpack Plugin\n\n[![Latest Version](https://img.shields.io/npm/v/@pmmmwh/react-refresh-webpack-plugin/latest)](https://www.npmjs.com/package/@pmmmwh/react-refresh-webpack-plugin/v/latest)\n[![Next Version](https://img.shields.io/npm/v/@pmmmwh/react-refresh-webpack-plugin/next)](https://www.npmjs.com/package/@pmmmwh/react-refresh-webpack-plugin/v/next)\n[![License](https://img.shields.io/github/license/pmmmwh/react-refresh-webpack-plugin)](./LICENSE)\n\nAn **EXPERIMENTAL** Webpack plugin to enable \"Fast Refresh\" (also previously known as _Hot Reloading_) for React components.\n\n## Installation\n\nFirst - this plugin is not 100% stable.\nIt works pretty reliably, and we have been testing it for some time, but there are still edge cases yet to be discovered.\nPlease **DO NOT** use it if you cannot afford to face breaking changes in the future.\n\n```sh\n# if you prefer npm\nnpm install -D @pmmmwh/react-refresh-webpack-plugin react-refresh\n\n# if you prefer yarn\nyarn add -D @pmmmwh/react-refresh-webpack-plugin react-refresh\n```\n\n## Usage\n\nFirst, apply the plugin in your Webpack configuration as follows:\n\n**webpack.config.js**\n\n```js\nconst ReactRefreshWebpackPlugin = require('@pmmmwh/react-refresh-webpack-plugin');\n// ... your other imports\n\n// You can tie this to whatever mechanisms you are using to detect a development environment.\n// For example, as shown here, is to tie that to `NODE_ENV` -\n// Then if you run `NODE_ENV=production webpack`, the constant will be set to false.\nconst isDevelopment = process.env.NODE_ENV !== 'production';\n\nmodule.exports = {\n // It is suggested to run the plugin in development mode only\n // If you are an advanced user and would like to setup Webpack yourselves,\n // you can also use the `none` mode,\n // but you will need to set `forceEnable: true` in the plugin options.\n mode: isDevelopment ? 'development' : 'production',\n // ... other configurations\n plugins: [\n // ... other plugins\n // You could also keep the plugin in your production config,\n // It will simply do nothing.\n isDevelopment && new ReactRefreshWebpackPlugin(),\n ].filter(Boolean),\n};\n```\n\nThen, update your Babel configuration.\nThis can either be done in your Webpack config (via options of `babel-loader`), or in the form of a `.babelrc`/`babel.config.js`.\n\n**webpack.config.js** (if you choose to inline the config)\n\n```js\nconst isDevelopment = process.env.NODE_ENV !== 'production';\n\nmodule.exports = {\n // DO NOT apply the plugin in production mode!\n mode: isDevelopment ? 'development' : 'production',\n module: {\n rules: [\n // ... other rules\n {\n // for TypeScript, change the following to \"\\.[jt]sx?\"\n test: /\\.jsx?$/,\n exclude: /node_modules/,\n use: [\n // ... other loaders\n {\n loader: require.resolve('babel-loader'),\n options: {\n // ... other options\n // DO NOT apply the Babel plugin in production mode!\n plugins: [isDevelopment && require.resolve('react-refresh/babel')].filter(Boolean),\n },\n },\n ],\n },\n ],\n },\n};\n```\n\n**.babelrc.js** (if you choose to extract the config)\n\n```js\nmodule.exports = (api) => {\n // This caches the Babel config by environment.\n api.cache.using(() => process.env.NODE_ENV);\n return {\n // ... other options\n plugins: [\n // ... other plugins\n // Applies the react-refresh Babel plugin on non-production modes only\n !api.env('production') && 'react-refresh/babel',\n ].filter(Boolean),\n };\n};\n```\n\nMore sample projects for common Webpack development setups are available in the [examples](https://github.com/pmmmwh/react-refresh-webpack-plugin/tree/master/examples) folder.\n\n> Note 1: If you use `webpack.config.ts`, please also install `type-fest` as a peer dependency.\n\n> Note 2: If you are using TypeScript (instead of Babel) as a transpiler, you will still need to use `babel-loader` to process your source code.\n> Check out this [sample project](https://github.com/pmmmwh/react-refresh-webpack-plugin/tree/master/examples/typescript-without-babel) on how to set this up.\n\n### Polyfill for Older Browsers\n\nIf you need to develop on IE11, you will need to polyfill the DOM URL API.\nThis can be done by adding the following before any of your code in the main entry (either one is fine):\n\n**Using `url-polyfill`**\n\n```js\nimport 'url-polyfill';\n```\n\n**Using `core-js`**\n\n```js\nimport 'core-js/features/url';\nimport 'core-js/features/url-search-params';\n```\n\n**Using `react-app-polyfill`**\n\n```js\nimport 'react-app-polyfill/ie11';\nimport 'react-app-polyfill/stable';\n```\n\n## Options\n\nThis plugin accepts a few options that are specifically targeted for advanced users.\n\n### `options.forceEnable`\n\nType: `boolean`\nDefault: `false`\n\nEnables the plugin forcefully.\nUseful if you want to use the plugin in production, or if you are using Webpack's `none` mode without `NODE_ENV`, for example.\n\n### `options.overlay`\n\nType: `boolean | ErrorOverlayOptions`\nDefault: `undefined`\n\nModifies how the error overlay integration works in the plugin.\n\n- If `options.overlay` is not provided or is `true`, the plugin will use the bundled error overlay interation.\n- If `options.overlay` is `false`, it will disable the error overlay integration.\n- If an `ErrorOverlayOptions` object is provided:\n (**NOTE**: This is an advanced option that exists mostly for tools like `create-react-app` or `Next.js`)\n\n - An optional `module` property could be defined.\n If it is not defined, the bundled error overlay will be used.\n If defined, it should reference a JS file that exports at least two functions with footprints as follows:\n\n ```ts\n function handleRuntimeError(error: Error) {}\n function clearRuntimeErrors() {}\n ```\n\n - An optional `entry` property could be defined, which should also reference a JS file that contains code needed to set up your custom error overlay integration.\n If it is not defined, the bundled error overlay entry will be used.\n It expects the `module` file to export two more functions:\n\n ```ts\n function showCompileError(webpackErrorMessage: string) {}\n function clearCompileErrors() {}\n ```\n\n Note that `webpackErrorMessage` is ANSI encoded, so you will need logic to parse it.\n\n - An example configuration:\n ```js\n const options = {\n overlay: {\n entry: 'some-webpack-entry-file',\n module: 'some-error-overlay-module',\n },\n };\n ```\n\n#### `options.overlay.sockHost`\n\nType: `string`\nDefault: `window.location.hostname`\n\nSet this if you are running webpack on a host other than `window.location.hostname`.\nThis will be used by the error overlay module, and is available for `webpack-dev-server` only.\n\n#### `options.overlay.sockIntegration`\n\nType: `wds` or `whm` or `string`\nDefault: `wds`\n\nThis controls how the error overlay connects to the sockets provided by several Webpack hot reload integrations.\n\n- If you use `webpack-dev-server`, you don't need to set this as it defaults to `wds`.\n- If you use `webpack-hot-middleware`, you should set this to `whm`.\n- If you use anything else, you will have to provide a path to a module that will accept a message handler function and initializes the socket connection.\n See the [`runtime/sockets`](https://github.com/pmmmwh/react-refresh-webpack-plugin/tree/master/src/runtime/sockets) folder for sample implementations.\n\n#### `options.overlay.sockPort`\n\nType: `number`\nDefault: `window.location.port`\n\nSet this if you are running webpack on a port other than `window.location.port`.\nThis will be used by the error overlay module, and is available for `webpack-dev-server` only.\n\n#### `options.overlay.sockPath`\n\nType: `string`\nDefault: `/sockjs-node`\n\nSet this if you are running webpack on a custom path.\nThis will be used by the error overlay module, and is available for `webpack-dev-server` only.\n\n### `options.useLegacyWDSSockets`\n\nType: `boolean`\nDefault: `false`\n\nSet this to true if you are using a `webpack-dev-server` version prior to 3.8 as it requires a custom SockJS implementation.\nIf you use this feature, you will also need to install `sockjs-client` as a peer dependency.\n\n## Related Work\n\n- [Initial Implementation by @maisano](https://gist.github.com/maisano/441a4bc6b2954205803d68deac04a716)\n", "readmeFilename": "README.md", "gitHead": "db9894a093aaa96ac587cf26a7ba09409e3a96bc", "_id": "@pmmmwh/react-refresh-webpack-plugin@0.3.0-beta.5", "_nodeVersion": "12.14.0", "_npmVersion": "6.13.4", "dist": { "integrity": "sha512-VFv1seIycjke+VNeAZ4bap0DoBe+nRMUaFcMnv+JFMqjoG+P7uo1MZxSeJ0hEhNZtOhCJn8wItPzYSuK2TnqZQ==", "shasum": "90976e261b543d0ab9603b7e434e07fe7b347575", "tarball": "https://registry.npmjs.org/@pmmmwh/react-refresh-webpack-plugin/-/react-refresh-webpack-plugin-0.3.0-beta.5.tgz", "fileCount": 37, "unpackedSize": 77611, "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeoeshCRA9TVsSAnZWagAAOrYQAJAYmcx0TD1BLdhsc6tE\n0liNN63h0L74KaS6PlxtvXRhgVmzjEK3Oy/ajWJ36E1PQIsjID4omEynxkB7\nlgOYfddX5CD8g9IHQJFoTfMT05G0w0ndB+eGMFxghu5KG0d3YqWztDrvvgVi\nFhyuiYUrPtCGlqQv1ff/Bm9U//hKzjwczHCuOMCLFGadjmCsGihNCmc9mdZr\nT4ahRfzNX1xeU+S+mvmeAbhk5U0zljB1keoekoabhQuEVpQMYuaBrcrtBn15\nWNxYgwbvXgzpvjipotfLwtdppW+x+OhTbTLqtzSyT8/va3J/ZM2Y3eSNymWS\nZ9TPitSKwJ26Ssa4NKg/ucz1aqjZ/jm8Lzo61IRs4T4pRMrmfFyqOPkvHS56\n7/O5s99zE1N6uHPcEqrwhAmIdhUmJ8SVNFBxtRBwq0lt2dkGe7C28PGhUDPl\nKqJ5GIG0katdaRA/fqCngdLOj4D9cVCuOxOpqFm5F/loWnaijo9wCaVlFmEK\nwK0dR5yjhhrkQrZPUOKJ9RzNZAM8pNOeoF6ey+BRC7LHIjEs+YgRj+Kt5VeO\n+2FjynCfOu63HXWOfvVAJLJmmdCbtAbAV1WKZtsp0W3/YGw6c1O5lLAegkp7\nAqzH7GVh7N+/+SrqHNIpZKfl0RedGAk+d97gpr4ZisAnJUkk5ODsMBbA629x\nPv9U\r\n=2TXk\r\n-----END PGP SIGNATURE-----\r\n" }, "maintainers": [ { "name": "pmmmwh", "email": "pmmmwh@gmail.com" } ], "_npmUser": { "name": "pmmmwh", "email": "pmmmwh@gmail.com" }, "directories": {}, "_npmOperationalInternal": { "host": "s3://npm-registry-packages", "tmp": "tmp/react-refresh-webpack-plugin_0.3.0-beta.5_1587669792962_0.872571497521653" }, "_hasShrinkwrap": false }, "0.3.0-beta.6": { "name": "@pmmmwh/react-refresh-webpack-plugin", "version": "0.3.0-beta.6", "description": "An **EXPERIMENTAL** Webpack plugin to enable \"Fast Refresh\" (also previously known as _Hot Reloading_) for React components.", "keywords": [ "react", "javascript", "webpack", "refresh", "hmr", "hotreload", "livereload", "live", "edit", "hot", "reload" ], "homepage": "https://github.com/pmmmwh/react-refresh-webpack-plugin#readme", "bugs": { "url": "https://github.com/pmmmwh/react-refresh-webpack-plugin/issues" }, "repository": { "type": "git", "url": "git+https://github.com/pmmmwh/react-refresh-webpack-plugin.git" }, "license": "MIT", "author": { "name": "Michael Mok" }, "main": "src/index.js", "types": "types/index.d.ts", "scripts": { "lint": "eslint --report-unused-disable-directives --ext .js .", "lint:fix": "yarn lint --fix", "format": "prettier --write \"**/*.{js,jsx,ts,tsx,json,md}\"", "format:check": "prettier --check \"**/*.{js,jsx,ts,tsx,json,md}\"", "generate-types": "tsc -p tsconfig.json && rimraf \"types/{helpers,runtime}\" && yarn format", "prepublishOnly": "rimraf types && yarn generate-types" }, "dependencies": { "ansi-html": "^0.0.7", "error-stack-parser": "^2.0.6", "html-entities": "^1.2.1", "lodash.debounce": "^4.0.8", "native-url": "^0.2.6", "schema-utils": "^2.6.5" }, "devDependencies": { "@types/json-schema": "^7.0.4", "@types/node": "^13.11.1", "@types/webpack": "^4.41.11", "eslint": "^6.8.0", "eslint-config-prettier": "^6.10.1", "prettier": "^2.0.4", "react-refresh": "^0.8.1", "rimraf": "^3.0.2", "type-fest": "^0.13.1", "typescript": "^3.8.3", "webpack": "^4.42.1", "webpack-hot-middleware": "^2.25.0", "webpack-plugin-serve": "^0.12.1" }, "peerDependencies": { "@types/webpack": "^4.41.11", "react-refresh": "^0.8.1", "sockjs-client": "^1.4.0", "type-fest": "^0.13.1", "webpack-hot-middleware": "^2.25.0", "webpack-plugin-serve": "^0.12.1" }, "peerDependenciesMeta": { "@types/webpack": { "optional": true }, "sockjs-client": { "optional": true }, "type-fest": { "optional": true }, "webpack-hot-middleware": { "optional": true }, "webpack-plugin-serve": { "optional": true } }, "engines": { "node": ">= 8.x" }, "readme": "# React Refresh Webpack Plugin\n\n[![Latest Version](https://img.shields.io/npm/v/@pmmmwh/react-refresh-webpack-plugin/latest)](https://www.npmjs.com/package/@pmmmwh/react-refresh-webpack-plugin/v/latest)\n[![Next Version](https://img.shields.io/npm/v/@pmmmwh/react-refresh-webpack-plugin/next)](https://www.npmjs.com/package/@pmmmwh/react-refresh-webpack-plugin/v/next)\n[![License](https://img.shields.io/github/license/pmmmwh/react-refresh-webpack-plugin)](./LICENSE)\n\nAn **EXPERIMENTAL** Webpack plugin to enable \"Fast Refresh\" (also previously known as _Hot Reloading_) for React components.\n\n## Installation\n\nFirst - this plugin is not 100% stable.\nIt works pretty reliably, and we have been testing it for some time, but there are still edge cases yet to be discovered.\nPlease **DO NOT** use it if you cannot afford to face breaking changes in the future.\n\n```sh\n# if you prefer npm\nnpm install -D @pmmmwh/react-refresh-webpack-plugin react-refresh\n\n# if you prefer yarn\nyarn add -D @pmmmwh/react-refresh-webpack-plugin react-refresh\n```\n\n## Usage\n\nFirst, apply the plugin in your Webpack configuration as follows:\n\n**webpack.config.js**\n\n```js\nconst ReactRefreshWebpackPlugin = require('@pmmmwh/react-refresh-webpack-plugin');\n// ... your other imports\n\n// You can tie this to whatever mechanisms you are using to detect a development environment.\n// For example, as shown here, is to tie that to `NODE_ENV` -\n// Then if you run `NODE_ENV=production webpack`, the constant will be set to false.\nconst isDevelopment = process.env.NODE_ENV !== 'production';\n\nmodule.exports = {\n // It is suggested to run the plugin in development mode only\n // If you are an advanced user and would like to setup Webpack yourselves,\n // you can also use the `none` mode,\n // but you will need to set `forceEnable: true` in the plugin options.\n mode: isDevelopment ? 'development' : 'production',\n // ... other configurations\n plugins: [\n // ... other plugins\n // You could also keep the plugin in your production config,\n // It will simply do nothing.\n isDevelopment && new ReactRefreshWebpackPlugin(),\n ].filter(Boolean),\n};\n```\n\nThen, update your Babel configuration.\nThis can either be done in your Webpack config (via options of `babel-loader`), or in the form of a `.babelrc`/`babel.config.js`.\n\n**webpack.config.js** (if you choose to inline the config)\n\n```js\nconst isDevelopment = process.env.NODE_ENV !== 'production';\n\nmodule.exports = {\n // DO NOT apply the plugin in production mode!\n mode: isDevelopment ? 'development' : 'production',\n module: {\n rules: [\n // ... other rules\n {\n // for TypeScript, change the following to \"\\.[jt]sx?\"\n test: /\\.jsx?$/,\n exclude: /node_modules/,\n use: [\n // ... other loaders\n {\n loader: require.resolve('babel-loader'),\n options: {\n // ... other options\n // DO NOT apply the Babel plugin in production mode!\n plugins: [isDevelopment && require.resolve('react-refresh/babel')].filter(Boolean),\n },\n },\n ],\n },\n ],\n },\n};\n```\n\n**.babelrc.js** (if you choose to extract the config)\n\n```js\nmodule.exports = (api) => {\n // This caches the Babel config by environment.\n api.cache.using(() => process.env.NODE_ENV);\n return {\n // ... other options\n plugins: [\n // ... other plugins\n // Applies the react-refresh Babel plugin on non-production modes only\n !api.env('production') && 'react-refresh/babel',\n ].filter(Boolean),\n };\n};\n```\n\nMore sample projects for common Webpack development setups are available in the [examples](https://github.com/pmmmwh/react-refresh-webpack-plugin/tree/master/examples) folder.\n\n> Note 1: If you use `webpack.config.ts`, please also install `type-fest` as a peer dependency.\n\n> Note 2: If you are using TypeScript (instead of Babel) as a transpiler, you will still need to use `babel-loader` to process your source code.\n> Check out this [sample project](https://github.com/pmmmwh/react-refresh-webpack-plugin/tree/master/examples/typescript-without-babel) on how to set this up.\n\n### Polyfill for Older Browsers\n\nIf you need to develop on IE11, you will need to polyfill the DOM URL API.\nThis can be done by adding the following before any of your code in the main entry (either one is fine):\n\n**Using `url-polyfill`**\n\n```js\nimport 'url-polyfill';\n```\n\n**Using `core-js`**\n\n```js\nimport 'core-js/features/url';\nimport 'core-js/features/url-search-params';\n```\n\n**Using `react-app-polyfill`**\n\n```js\nimport 'react-app-polyfill/ie11';\nimport 'react-app-polyfill/stable';\n```\n\n## Options\n\nThis plugin accepts a few options that are specifically targeted for advanced users.\n\n### `options.forceEnable`\n\nType: `boolean`\nDefault: `false`\n\nEnables the plugin forcefully.\nUseful if you want to use the plugin in production, or if you are using Webpack's `none` mode without `NODE_ENV`, for example.\n\n### `options.overlay`\n\nType: `boolean | ErrorOverlayOptions`\nDefault: `undefined`\n\nModifies how the error overlay integration works in the plugin.\n\n- If `options.overlay` is not provided or is `true`, the plugin will use the bundled error overlay interation.\n- If `options.overlay` is `false`, it will disable the error overlay integration.\n- If an `ErrorOverlayOptions` object is provided:\n (**NOTE**: This is an advanced option that exists mostly for tools like `create-react-app` or `Next.js`)\n\n - An optional `module` property could be defined.\n If it is not defined, the bundled error overlay will be used.\n If defined, it should reference a JS file that exports at least two functions with footprints as follows:\n\n ```ts\n function handleRuntimeError(error: Error) {}\n function clearRuntimeErrors() {}\n ```\n\n - An optional `entry` property could be defined, which should also reference a JS file that contains code needed to set up your custom error overlay integration.\n If it is not defined, the bundled error overlay entry will be used.\n It expects the `module` file to export two more functions:\n\n ```ts\n function showCompileError(webpackErrorMessage: string) {}\n function clearCompileErrors() {}\n ```\n\n Note that `webpackErrorMessage` is ANSI encoded, so you will need logic to parse it.\n\n - An example configuration:\n ```js\n const options = {\n overlay: {\n entry: 'some-webpack-entry-file',\n module: 'some-error-overlay-module',\n },\n };\n ```\n\n#### `options.overlay.sockHost`\n\nType: `string`\nDefault: `window.location.hostname`\n\nSet this if you are running webpack on a host other than `window.location.hostname`.\nThis will be used by the error overlay module, and is available for `webpack-dev-server` only.\n\n#### `options.overlay.sockIntegration`\n\nType: `wds`, `whm`, `wps` or `string`\nDefault: `wds`\n\nThis controls how the error overlay connects to the sockets provided by several Webpack hot reload integrations.\n\n- If you use `webpack-dev-server`, you don't need to set this as it defaults to `wds`.\n- If you use `webpack-hot-middleware`, you should set this to `whm`.\n- If you use `webpack-plugin-serve`, you should set this to `wps`.\n- If you use anything else, or if you want to customize the socket handling yourself, you will have to provide a path to a module that will accept a message handler function and initializes the socket connection.\n See the [`runtime/sockets`](https://github.com/pmmmwh/react-refresh-webpack-plugin/tree/master/src/runtime/sockets) folder for sample implementations.\n\n#### `options.overlay.sockPort`\n\nType: `number`\nDefault: `window.location.port`\n\nSet this if you are running webpack on a port other than `window.location.port`.\nThis will be used by the error overlay module, and is available for `webpack-dev-server` only.\n\n#### `options.overlay.sockPath`\n\nType: `string`\nDefault: `/sockjs-node`\n\nSet this if you are running webpack on a custom path.\nThis will be used by the error overlay module, and is available for `webpack-dev-server` only.\n\n### `options.useLegacyWDSSockets`\n\nType: `boolean`\nDefault: `false`\n\nSet this to true if you are using a `webpack-dev-server` version prior to 3.8 as it requires a custom SockJS implementation.\nIf you use this feature, you will also need to install `sockjs-client` as a peer dependency.\n\n## Related Work\n\n- [Initial Implementation by @maisano](https://gist.github.com/maisano/441a4bc6b2954205803d68deac04a716)\n", "readmeFilename": "README.md", "gitHead": "0e16653fbb03adce3f4cbee71c2cf2c954a21c1d", "_id": "@pmmmwh/react-refresh-webpack-plugin@0.3.0-beta.6", "_nodeVersion": "12.14.0", "_npmVersion": "6.13.4", "dist": { "integrity": "sha512-LcTFNKBN8kmDw9E6woQPPn+/d6ANCy7jAQYxKtOVnzy9X0i8M5ApqW2aiadJJpSLxxouRdWWRsd1dm7E6k4iVg==", "shasum": "e14fe4b3eb4ee5662f08d2637bb3cdc94e118e05", "tarball": "https://registry.npmjs.org/@pmmmwh/react-refresh-webpack-plugin/-/react-refresh-webpack-plugin-0.3.0-beta.6.tgz", "fileCount": 38, "unpackedSize": 79403, "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJes9ikCRA9TVsSAnZWagAAht8P/jX8W43Sl+6V48MqooUM\nPbO0RHl9uaH2usByWe5CG+7qVou6C0ZlSgBNFKuoh4llDBBRAU3iLPVc/fRs\n/cS8k4TgZPEUeoH78SA5vxHyW/h+6qgh94Qb9wllN7BzjfGnyttp5u/9MCd0\nGfAR52qfJ5uwoBliRmlGZ7X9GgERSneeiRD2CT7QmgHz/9cPyYMB0xTqMkj+\n76fRZv7yKHi4UDear2EluP1lIcdOUw0uknVHi5PbdoJW9AxJbPrKMzF2EXAW\nERForDb4Uq3a3xmW+eGnFRNW2gFUhvgPPE5TMsMqVSGbuxIdFFQfug46SbDs\nmQx+8RMekIC+3D+XSiP/9XF/bRroGZXYKLe16nMzcxBGw0ForJ1a5IKgsAsi\neQSD/u2Fp81SRbS1HosZ+/ZsB8Hfji9V0xoMEs45Ijanhu6Pp861bR4cLAQG\nuRDLMote9a/UA6m91xHXi3vCJDVNenTKnTK5XkVQdo/xji5F++e8BjXNob22\nx925LkoKQtkZrBu/y1mSNJ+jUctstWCpCbj9nSTuusBVFk5C2/8/HUw4cWCj\nO6sASS1LUVFEDoBU3VfHOo4XqLpudOilCFeHPbWu5pHaPZY7/O4eKsVbguQ+\njGwED/244NQ5gLAHSuMjUtg1oaLcjfXgkrl6rP0LeX5hVzCT5E8nucYuwl/N\nkuk4\r\n=xc3R\r\n-----END PGP SIGNATURE-----\r\n" }, "maintainers": [ { "name": "pmmmwh", "email": "pmmmwh@gmail.com" } ], "_npmUser": { "name": "pmmmwh", "email": "pmmmwh@gmail.com" }, "directories": {}, "_npmOperationalInternal": { "host": "s3://npm-registry-packages", "tmp": "tmp/react-refresh-webpack-plugin_0.3.0-beta.6_1588844708058_0.7877641841666121" }, "_hasShrinkwrap": false }, "0.3.0": { "name": "@pmmmwh/react-refresh-webpack-plugin", "version": "0.3.0", "description": "An **EXPERIMENTAL** Webpack plugin to enable \"Fast Refresh\" (also previously known as _Hot Reloading_) for React components.", "keywords": [ "react", "javascript", "webpack", "refresh", "hmr", "hotreload", "livereload", "live", "edit", "hot", "reload" ], "homepage": "https://github.com/pmmmwh/react-refresh-webpack-plugin#readme", "bugs": { "url": "https://github.com/pmmmwh/react-refresh-webpack-plugin/issues" }, "repository": { "type": "git", "url": "git+https://github.com/pmmmwh/react-refresh-webpack-plugin.git" }, "license": "MIT", "author": { "name": "Michael Mok" }, "main": "src/index.js", "types": "types/index.d.ts", "scripts": { "lint": "eslint --report-unused-disable-directives --ext .js .", "lint:fix": "yarn lint --fix", "format": "prettier --write \"**/*.{js,jsx,ts,tsx,json,md}\"", "format:check": "prettier --check \"**/*.{js,jsx,ts,tsx,json,md}\"", "generate-types": "tsc -p tsconfig.json && rimraf \"types/{helpers,runtime}\" && yarn format", "prepublishOnly": "rimraf types && yarn generate-types" }, "dependencies": { "ansi-html": "^0.0.7", "error-stack-parser": "^2.0.6", "html-entities": "^1.2.1", "lodash.debounce": "^4.0.8", "native-url": "^0.2.6", "schema-utils": "^2.6.5" }, "devDependencies": { "@types/json-schema": "^7.0.4", "@types/node": "^13.11.1", "@types/webpack": "^4.41.11", "eslint": "^6.8.0", "eslint-config-prettier": "^6.10.1", "prettier": "^2.0.4", "react-refresh": "^0.8.1", "rimraf": "^3.0.2", "type-fest": "^0.13.1", "typescript": "^3.8.3", "webpack": "^4.42.1", "webpack-hot-middleware": "^2.25.0", "webpack-plugin-serve": "^0.12.1" }, "peerDependencies": { "@types/webpack": "^4.41.11", "react-refresh": "^0.8.1", "sockjs-client": "^1.4.0", "type-fest": "^0.13.1", "webpack-hot-middleware": "^2.25.0", "webpack-plugin-serve": "^0.12.1" }, "peerDependenciesMeta": { "@types/webpack": { "optional": true }, "sockjs-client": { "optional": true }, "type-fest": { "optional": true }, "webpack-hot-middleware": { "optional": true }, "webpack-plugin-serve": { "optional": true } }, "engines": { "node": ">= 8.x" }, "gitHead": "0dc6e91943d7915b8f2d78e9e117260b759a68fa", "_id": "@pmmmwh/react-refresh-webpack-plugin@0.3.0", "_nodeVersion": "12.14.0", "_npmVersion": "6.13.4", "dist": { "integrity": "sha512-zeWx7HJ+7yJBFgm8TTEqUiUj172NcQxYduiAcK5ks9OHYdWgzfxfygtxlhvEzMLFM9fX60/dKxqFvlPKTGltOg==", "shasum": "1caa675c3098801152537ee63420bcd672213295", "tarball": "https://registry.npmjs.org/@pmmmwh/react-refresh-webpack-plugin/-/react-refresh-webpack-plugin-0.3.0.tgz", "fileCount": 38, "unpackedSize": 81215, "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJetvymCRA9TVsSAnZWagAAWxMP/A/E0XW9cy6ObvpGkses\nUvUdx4qV+kSJMPlfOyebkDu9btmvRPrDONHK2Jxk1QR9M2duNtGRAPnfBi1Y\nrCaSFCEgbW4JL8pZWmEPsb5i0HpgDy/+tQMRQz/gwA5dBWaigKRRIOswmI6h\nsdnd/NqEvAZ0DOumt7S3SagginFcvfZV88xfTAe5fYQyhSaFXjXrt31ErY4Q\nJVDFqWjhgv8tA9i0ALfj0xixSG8kXc6F6HMiGBzpXHEhJ/EWMuUwMAWAr2pK\nsyMZ1eh+ZQpiqiGR++mAVyiQjpCUtMxz7/MQQOB06UU6cvKiGAgFBwDDD/Fz\ntr3XBoe8nOnL7sMDX4lQppSMMzI2qyF17o0Qai14CRpZG4KVLodZRId8oKy3\nyG4+OJ4I1wWbweMEUL//3fg54wtgAy3CDbFKGXPzwZSdW8VoleAS9eY9p/r3\nwKZxx2H4nEd5/8pXAO2DuD6EQlnLfm+He3nfZaOamRA0Uz1BvrYHrU6jMgEI\ntSYpktr+EcuiIgmbh12wm+1BGiVrhZ1R9utkO1PtpFbaBymFdG0eGY7AGlLW\nIGqFWbist/92lbqWPtE7Aosrg64tFPZGObLqT8AIdXguZs3lqDMRCPFsnnUn\n+ZIhLD/nLYikpSqvLMj+oBiwYB1sADA5G75hC76XMDeU2Z2Ml0Ercnt4hm1t\nFVKH\r\n=ZoFo\r\n-----END PGP SIGNATURE-----\r\n" }, "maintainers": [ { "name": "pmmmwh", "email": "pmmmwh@gmail.com" } ], "_npmUser": { "name": "pmmmwh", "email": "pmmmwh@gmail.com" }, "directories": {}, "_npmOperationalInternal": { "host": "s3://npm-registry-packages", "tmp": "tmp/react-refresh-webpack-plugin_0.3.0_1589050534482_0.3254961549561983" }, "_hasShrinkwrap": false }, "0.3.1": { "name": "@pmmmwh/react-refresh-webpack-plugin", "version": "0.3.1", "description": "An **EXPERIMENTAL** Webpack plugin to enable \"Fast Refresh\" (also previously known as _Hot Reloading_) for React components.", "keywords": [ "react", "javascript", "webpack", "refresh", "hmr", "hotreload", "livereload", "live", "edit", "hot", "reload" ], "homepage": "https://github.com/pmmmwh/react-refresh-webpack-plugin#readme", "bugs": { "url": "https://github.com/pmmmwh/react-refresh-webpack-plugin/issues" }, "repository": { "type": "git", "url": "git+https://github.com/pmmmwh/react-refresh-webpack-plugin.git" }, "license": "MIT", "author": { "name": "Michael Mok" }, "main": "src/index.js", "types": "types/index.d.ts", "scripts": { "lint": "eslint --report-unused-disable-directives --ext .js .", "lint:fix": "yarn lint --fix", "format": "prettier --write \"**/*.{js,jsx,ts,tsx,json,md}\"", "format:check": "prettier --check \"**/*.{js,jsx,ts,tsx,json,md}\"", "generate-types": "tsc -p tsconfig.json && rimraf \"types/{helpers,runtime}\" && yarn format", "prepublishOnly": "rimraf types && yarn generate-types" }, "dependencies": { "ansi-html": "^0.0.7", "error-stack-parser": "^2.0.6", "html-entities": "^1.2.1", "lodash.debounce": "^4.0.8", "native-url": "^0.2.6", "schema-utils": "^2.6.5" }, "devDependencies": { "@types/json-schema": "^7.0.4", "@types/node": "^13.11.1", "@types/webpack": "^4.41.11", "eslint": "^6.8.0", "eslint-config-prettier": "^6.10.1", "prettier": "^2.0.4", "react-refresh": "^0.8.1", "rimraf": "^3.0.2", "type-fest": "^0.13.1", "typescript": "^3.8.3", "webpack": "^4.42.1", "webpack-dev-server": "^3.11.0", "webpack-hot-middleware": "^2.25.0", "webpack-plugin-serve": "^1.0.0" }, "peerDependencies": { "@types/webpack": "^4.41.12", "react-refresh": "^0.8.2", "sockjs-client": "^1.4.0", "type-fest": "^0.13.1", "webpack-dev-server": "3.x", "webpack-hot-middleware": "2.x", "webpack-plugin-serve": "0.x || 1.x" }, "peerDependenciesMeta": { "@types/webpack": { "optional": true }, "sockjs-client": { "optional": true }, "type-fest": { "optional": true }, "webpack-dev-server": { "optional": true }, "webpack-hot-middleware": { "optional": true }, "webpack-plugin-serve": { "optional": true } }, "engines": { "node": ">= 8.x" }, "gitHead": "e0ddc1e3f1f2af3ab0637d40000791d7ee571751", "_id": "@pmmmwh/react-refresh-webpack-plugin@0.3.1", "_nodeVersion": "12.14.0", "_npmVersion": "6.13.4", "dist": { "integrity": "sha512-JlbMOHNtoaLV5LR/GWpfDZht5qQqMr2E6Fcto2GcGCiVSDWN9C9wac+WNhGWaAfKh9pLOlz3EX4DkWl4Tb7sCg==", "shasum": "b2e0fa57949e72f27cdfef3b0f4554edd4776240", "tarball": "https://registry.npmjs.org/@pmmmwh/react-refresh-webpack-plugin/-/react-refresh-webpack-plugin-0.3.1.tgz", "fileCount": 38, "unpackedSize": 81443, "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeuEsjCRA9TVsSAnZWagAA6p0P/Rd2rQVCYbcP4YADPCMG\nkvHz/TXN+onBu3Y9il92R29GiKLvsqawRxdLf1PI2n4yRysdKDCCk0wQhbWO\nMXyra6cFD/ufVpOjJtJgeq30t334qBZ03XWMCfqnpMOt2O2952XQORuvPk52\nWqPzUEduQ9LJguUJ/kqHTxmjxhcDEaKXoi/HZ82rjiqtCW3x8ssPFdDiMHZX\no/0SEx1jz0ce9ACMUKqJs3HSs8nGS+bzv3tVW6qLszd3EL5Y6D2J5vwwotOC\n6mvrpNB7H5Zh4iCYUgoGNyj1JcDoNecKrBTnBYbo3lhOCAXGpKM7cQBGYwXP\nT363OLzHFiaU4Bdh2V15odcy50TEhVQQ/XjPeWnW9tsjyoAhVIPEEtmbyckh\n9Yt5qT1vRg4lcjNR3kWXAKiTbhJ8oPLFhbRy4j5uR8oWENfLF9pDsZD6fmUL\nSODOiLuDpKz2FR485yKruUDrw0+0I5F7XHr13xl3QHIO+JVMg9ShE7144UiS\n+QQ5zveZiIuFFGoIiMKvaBpByT5t5FrJ4TC37/jZ3SpksZ1AOXuPAW0SR18P\n+A1Nuj0mb0FgxsbnDB+5TSnzqxsazh9mGW6kUN8s1PyDgPQ3xzFs3lh4MHNX\nMtSc9a3j/TAzsCOJmD+rgG0Js4jqftP7Odg3cPtC4D4KgORl+FU6T5VbsH6m\npSRX\r\n=t3Yv\r\n-----END PGP SIGNATURE-----\r\n" }, "maintainers": [ { "name": "pmmmwh", "email": "pmmmwh@gmail.com" } ], "_npmUser": { "name": "pmmmwh", "email": "pmmmwh@gmail.com" }, "directories": {}, "_npmOperationalInternal": { "host": "s3://npm-registry-packages", "tmp": "tmp/react-refresh-webpack-plugin_0.3.1_1589136163249_0.3282604198414063" }, "_hasShrinkwrap": false }, "0.4.0-beta.0": { "name": "@pmmmwh/react-refresh-webpack-plugin", "version": "0.4.0-beta.0", "description": "An **EXPERIMENTAL** Webpack plugin to enable \"Fast Refresh\" (also previously known as _Hot Reloading_) for React components.", "keywords": [ "react", "javascript", "webpack", "refresh", "hmr", "hotreload", "livereload", "live", "edit", "hot", "reload" ], "homepage": "https://github.com/pmmmwh/react-refresh-webpack-plugin#readme", "bugs": { "url": "https://github.com/pmmmwh/react-refresh-webpack-plugin/issues" }, "repository": { "type": "git", "url": "git+https://github.com/pmmmwh/react-refresh-webpack-plugin.git" }, "license": "MIT", "author": { "name": "Michael Mok" }, "main": "src/index.js", "types": "types/index.d.ts", "scripts": { "test": "node scripts/test.js", "lint": "eslint --report-unused-disable-directives --ext .js .", "lint:fix": "yarn lint --fix", "format": "prettier --write \"**/*.{js,jsx,ts,tsx,json,md}\"", "format:check": "prettier --check \"**/*.{js,jsx,ts,tsx,json,md}\"", "generate-types": "tsc -p tsconfig.json && rimraf \"types/{helpers,runtime}\" && yarn format", "postinstall": "yarn link && yarn link \"@pmmmwh/react-refresh-webpack-plugin\"", "prepublishOnly": "rimraf types && yarn generate-types" }, "dependencies": { "ansi-html": "^0.0.7", "error-stack-parser": "^2.0.6", "html-entities": "^1.2.1", "lodash.debounce": "^4.0.8", "native-url": "^0.2.6", "schema-utils": "^2.6.5" }, "devDependencies": { "@babel/core": "^7.9.6", "@types/json-schema": "^7.0.4", "@types/node": "^14.0.1", "@types/puppeteer": "^2.1.0", "@types/webpack": "^4.41.12", "babel-loader": "^8.1.0", "cross-spawn": "^7.0.2", "eslint": "^7.0.0", "eslint-config-prettier": "^6.11.0", "fs-extra": "^9.0.0", "get-port": "^5.1.1", "jest": "^26.0.1", "jest-environment-node": "^26.0.1", "jest-watch-typeahead": "^0.6.0", "nanoid": "^3.1.7", "postinstall-postinstall": "^2.1.0", "prettier": "^2.0.5", "puppeteer": "^3.0.4", "react-refresh": "^0.8.2", "rimraf": "^3.0.2", "type-fest": "^0.13.1", "typescript": "^3.8.3", "webpack": "^4.43.0", "webpack-cli": "^3.3.11", "webpack-dev-server": "^3.11.0", "webpack-hot-middleware": "^2.25.0", "webpack-plugin-serve": "^1.0.0", "yn": "^4.0.0" }, "peerDependencies": { "@types/webpack": "^4.41.12", "react-refresh": "^0.8.2", "sockjs-client": "^1.4.0", "type-fest": "^0.13.1", "webpack": ">=4.43.0", "webpack-dev-server": "3.x", "webpack-hot-middleware": "2.x", "webpack-plugin-serve": "0.x || 1.x" }, "peerDependenciesMeta": { "@types/webpack": { "optional": true }, "sockjs-client": { "optional": true }, "type-fest": { "optional": true }, "webpack-dev-server": { "optional": true }, "webpack-hot-middleware": { "optional": true }, "webpack-plugin-serve": { "optional": true } }, "engines": { "node": ">= 8.x" }, "readme": "# React Refresh Webpack Plugin\n\n[![Latest Version](https://img.shields.io/npm/v/@pmmmwh/react-refresh-webpack-plugin/latest)](https://www.npmjs.com/package/@pmmmwh/react-refresh-webpack-plugin/v/latest)\n[![Next Version](https://img.shields.io/npm/v/@pmmmwh/react-refresh-webpack-plugin/next)](https://www.npmjs.com/package/@pmmmwh/react-refresh-webpack-plugin/v/next)\n[![License](https://img.shields.io/github/license/pmmmwh/react-refresh-webpack-plugin)](./LICENSE)\n\nAn **EXPERIMENTAL** Webpack plugin to enable \"Fast Refresh\" (also previously known as _Hot Reloading_) for React components.\n\n## Installation\n\nFirst - this plugin is not 100% stable.\nIt works pretty reliably, and we have been testing it for some time, but there are still edge cases yet to be discovered.\nPlease **DO NOT** use it if you cannot afford to face breaking changes in the future.\n\n```sh\n# if you prefer npm\nnpm install -D @pmmmwh/react-refresh-webpack-plugin react-refresh\n\n# if you prefer yarn\nyarn add -D @pmmmwh/react-refresh-webpack-plugin react-refresh\n```\n\n## Usage\n\nFirst, apply the plugin in your Webpack configuration as follows:\n\n**webpack.config.js**\n\n```js\nconst ReactRefreshWebpackPlugin = require('@pmmmwh/react-refresh-webpack-plugin');\n// ... your other imports\n\n// You can tie this to whatever mechanisms you are using to detect a development environment.\n// For example, as shown here, is to tie that to `NODE_ENV` -\n// Then if you run `NODE_ENV=production webpack`, the constant will be set to false.\nconst isDevelopment = process.env.NODE_ENV !== 'production';\n\nmodule.exports = {\n // It is suggested to run the plugin in development mode only\n // If you are an advanced user and would like to setup Webpack yourselves,\n // you can also use the `none` mode,\n // but you will need to set `forceEnable: true` in the plugin options.\n mode: isDevelopment ? 'development' : 'production',\n // ... other configurations\n plugins: [\n // ... other plugins\n // You could also keep the plugin in your production config,\n // It will simply do nothing.\n isDevelopment && new ReactRefreshWebpackPlugin(),\n ].filter(Boolean),\n};\n```\n\nThen, update your Babel configuration.\nThis can either be done in your Webpack config (via options of `babel-loader`), or in the form of a `.babelrc`/`babel.config.js`.\n\n**webpack.config.js** (if you choose to inline the config)\n\n```js\nconst isDevelopment = process.env.NODE_ENV !== 'production';\n\nmodule.exports = {\n // DO NOT apply the plugin in production mode!\n mode: isDevelopment ? 'development' : 'production',\n module: {\n rules: [\n // ... other rules\n {\n // for TypeScript, change the following to \"\\.[jt]sx?\"\n test: /\\.jsx?$/,\n exclude: /node_modules/,\n use: [\n // ... other loaders\n {\n loader: require.resolve('babel-loader'),\n options: {\n // ... other options\n // DO NOT apply the Babel plugin in production mode!\n plugins: [isDevelopment && require.resolve('react-refresh/babel')].filter(Boolean),\n },\n },\n ],\n },\n ],\n },\n};\n```\n\n**.babelrc.js** (if you choose to extract the config)\n\n```js\nmodule.exports = (api) => {\n // This caches the Babel config by environment.\n api.cache.using(() => process.env.NODE_ENV);\n return {\n // ... other options\n plugins: [\n // ... other plugins\n // Applies the react-refresh Babel plugin on non-production modes only\n !api.env('production') && 'react-refresh/babel',\n ].filter(Boolean),\n };\n};\n```\n\nMore sample projects for common Webpack development setups are available in the [examples](https://github.com/pmmmwh/react-refresh-webpack-plugin/tree/master/examples) folder.\n\n> Note 1: If you use `webpack.config.ts`, please also install `type-fest` as a peer dependency.\n\n> Note 2: If you are using TypeScript (instead of Babel) as a transpiler, you will still need to use `babel-loader` to process your source code.\n> Check out this [sample project](https://github.com/pmmmwh/react-refresh-webpack-plugin/tree/master/examples/typescript-without-babel) on how to set this up.\n\n### Polyfill for Older Browsers\n\nIf you need to develop on IE11, you will need to polyfill the DOM URL API.\nThis can be done by adding the following before any of your code in the main entry (either one is fine):\n\n**Using `url-polyfill`**\n\n```js\nimport 'url-polyfill';\n```\n\n**Using `core-js`**\n\n```js\nimport 'core-js/features/url';\nimport 'core-js/features/url-search-params';\n```\n\n**Using `react-app-polyfill`**\n\n```js\nimport 'react-app-polyfill/ie11';\nimport 'react-app-polyfill/stable';\n```\n\n## Options\n\nThis plugin accepts a few options that are specifically targeted for advanced users.\n\n### `options.forceEnable`\n\nType: `boolean`\nDefault: `false`\n\nEnables the plugin forcefully.\nUseful if you want to use the plugin in production, or if you are using Webpack's `none` mode without `NODE_ENV`, for example.\n\n### `options.overlay`\n\nType: `boolean | ErrorOverlayOptions`\nDefault: `undefined`\n\nModifies how the error overlay integration works in the plugin.\n\n- If `options.overlay` is not provided or is `true`, the plugin will use the bundled error overlay interation.\n- If `options.overlay` is `false`, it will disable the error overlay integration.\n- If an `ErrorOverlayOptions` object is provided:\n (**NOTE**: This is an advanced option that exists mostly for tools like `create-react-app` or `Next.js`)\n\n - An optional `module` property could be defined.\n If it is not defined, the bundled error overlay will be used.\n If defined, it should reference a JS file that exports at least two functions with footprints as follows:\n\n ```ts\n function handleRuntimeError(error: Error) {}\n function clearRuntimeErrors() {}\n ```\n\n - An optional `entry` property could be defined, which should also reference a JS file that contains code needed to set up your custom error overlay integration.\n If it is not defined, the bundled error overlay entry will be used.\n It expects the `module` file to export two more functions:\n\n ```ts\n function showCompileError(webpackErrorMessage: string) {}\n function clearCompileErrors() {}\n ```\n\n Note that `webpackErrorMessage` is ANSI encoded, so you will need logic to parse it.\n\n - An example configuration:\n ```js\n const options = {\n overlay: {\n entry: 'some-webpack-entry-file',\n module: 'some-error-overlay-module',\n },\n };\n ```\n\n#### `options.overlay.sockHost`\n\nType: `string`\nDefault: `window.location.hostname`\n\nSet this if you are running webpack on a host other than `window.location.hostname`.\nThis will be used by the error overlay module, and is available for `webpack-dev-server` only.\n\n#### `options.overlay.sockIntegration`\n\nType: `wds`, `whm`, `wps` or `string`\nDefault: `wds`\n\nThis controls how the error overlay connects to the sockets provided by several Webpack hot reload integrations.\n\n- If you use `webpack-dev-server`, you don't need to set this as it defaults to `wds`.\n- If you use `webpack-hot-middleware`, you should set this to `whm`.\n- If you use `webpack-plugin-serve`, you should set this to `wps`.\n- If you use anything else, or if you want to customize the socket handling yourself, you will have to provide a path to a module that will accept a message handler function and initializes the socket connection.\n See the [`runtime/sockets`](https://github.com/pmmmwh/react-refresh-webpack-plugin/tree/master/src/runtime/sockets) folder for sample implementations.\n\n#### `options.overlay.sockPort`\n\nType: `number`\nDefault: `window.location.port`\n\nSet this if you are running webpack on a port other than `window.location.port`.\nThis will be used by the error overlay module, and is available for `webpack-dev-server` only.\n\n#### `options.overlay.sockPath`\n\nType: `string`\nDefault: `/sockjs-node`\n\nSet this if you are running webpack on a custom path.\nThis will be used by the error overlay module, and is available for `webpack-dev-server` only.\n\n### `options.useLegacyWDSSockets`\n\nType: `boolean`\nDefault: `false`\n\nSet this to true if you are using a `webpack-dev-server` version prior to 3.8 as it requires a custom SockJS implementation.\nIf you use this feature, you will also need to install `sockjs-client` as a peer dependency.\n\n## Related Work\n\n- [Initial Implementation by @maisano](https://gist.github.com/maisano/441a4bc6b2954205803d68deac04a716)\n", "readmeFilename": "README.md", "gitHead": "4f87d83c202a2cd95283c17482746368d96c7d33", "_id": "@pmmmwh/react-refresh-webpack-plugin@0.4.0-beta.0", "_nodeVersion": "14.2.0", "_npmVersion": "6.14.4", "dist": { "integrity": "sha512-JQshnbqJy6aP5sI7pcNG67Dzl4mayfLAdzEMmNdiM7+6xiwoDAEEqS2BIk/FeFRyn+WDhv5wIFutiL8B9ydcKQ==", "shasum": "547b51e2d5d522e78fdf73b5834e95bbb835077d", "tarball": "https://registry.npmjs.org/@pmmmwh/react-refresh-webpack-plugin/-/react-refresh-webpack-plugin-0.4.0-beta.0.tgz", "fileCount": 38, "unpackedSize": 81675, "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJewoFCCRA9TVsSAnZWagAAw1UP/jcTaUYoKOQjnyuJaLZV\nvQWqmV4FN2o5shGV1KLAOAQ027BdHT79kPs4xkEkJEhfqxya78KEeWv2j3Zb\n8ePX4gxZ8foAGSHF2OM9p/q8Van/p1oq1rnnipObhk0Pt2EjIYmPVMxh5DzN\nmFWJvLBVq1elyaxGqawxGAcqvv+TOhZrWLqCfbD68D/sBbsoQLIqbOgXa4f6\nJlpIXhyau/pb+jJCduwXIi6mkH4MHSkPfFSliwExdulSu9lnresUQen6fgl1\ni2xRxj3gZ+fUntmWucsCCBuMgJU58qrwtRtDsgbGaH2d82VqLpg4Yfx/TbMw\nA5FZ0j/zRB4n/em/VmBySQDfw3o0xyK+qITTQTKfYvEi3rrrWBU4qhO5CEdF\nUDfxszQY9OPNG3kQgHunYvVdvQ5Itxim7ZLd3QvNt5C8i/2QR9k/1XfmYjJw\nhxBflRjj8CT/DwwdH3dSaoTjq0gWSgU6/C3xYUBEdOpZCgdYPP9CpSmGFrSH\nFVHH/6CmXrOd5Zd3Wkccox6c92f5F783nZy+joLK2SbUS3dL5/FqoVKrBWPO\n9DbFo0MRO+qX4DOo8D0x1Jb0O+qdUbd4c481EYvdUuQSFozAXQjAxjtw5SFT\nWGIgnJilpbn3fRnXv/fkgho6VSj+rUz6hkfXA2xk3LEtsOp8cw4nBbK/fA23\nCmfn\r\n=i4LT\r\n-----END PGP SIGNATURE-----\r\n" }, "maintainers": [ { "name": "pmmmwh", "email": "pmmmwh@gmail.com" } ], "_npmUser": { "name": "pmmmwh", "email": "pmmmwh@gmail.com" }, "directories": {}, "_npmOperationalInternal": { "host": "s3://npm-registry-packages", "tmp": "tmp/react-refresh-webpack-plugin_0.4.0-beta.0_1589805377888_0.27024065509537265" }, "_hasShrinkwrap": false }, "0.4.0-beta.1": { "name": "@pmmmwh/react-refresh-webpack-plugin", "version": "0.4.0-beta.1", "description": "An **EXPERIMENTAL** Webpack plugin to enable \"Fast Refresh\" (also previously known as _Hot Reloading_) for React components.", "keywords": [ "react", "javascript", "webpack", "refresh", "hmr", "hotreload", "livereload", "live", "edit", "hot", "reload" ], "homepage": "https://github.com/pmmmwh/react-refresh-webpack-plugin#readme", "bugs": { "url": "https://github.com/pmmmwh/react-refresh-webpack-plugin/issues" }, "repository": { "type": "git", "url": "git+https://github.com/pmmmwh/react-refresh-webpack-plugin.git" }, "license": "MIT", "author": { "name": "Michael Mok" }, "main": "src/index.js", "types": "types/index.d.ts", "scripts": { "pretest": "yarn link && yarn link \"@pmmmwh/react-refresh-webpack-plugin\"", "test": "node scripts/test.js", "lint": "eslint --report-unused-disable-directives --ext .js .", "lint:fix": "yarn lint --fix", "format": "prettier --write \"**/*.{js,jsx,ts,tsx,json,md}\"", "format:check": "prettier --check \"**/*.{js,jsx,ts,tsx,json,md}\"", "generate-types": "tsc -p tsconfig.json && rimraf \"types/{helpers,runtime}\" && yarn format", "prepublishOnly": "rimraf types && yarn generate-types" }, "dependencies": { "ansi-html": "^0.0.7", "error-stack-parser": "^2.0.6", "html-entities": "^1.2.1", "lodash.debounce": "^4.0.8", "native-url": "^0.2.6", "schema-utils": "^2.6.5" }, "devDependencies": { "@babel/core": "^7.9.6", "@types/json-schema": "^7.0.4", "@types/node": "^14.0.1", "@types/puppeteer": "^2.1.0", "@types/webpack": "^4.41.12", "babel-loader": "^8.1.0", "cross-spawn": "^7.0.2", "eslint": "^7.0.0", "eslint-config-prettier": "^6.11.0", "fs-extra": "^9.0.0", "get-port": "^5.1.1", "jest": "^26.0.1", "jest-environment-node": "^26.0.1", "jest-watch-typeahead": "^0.6.0", "nanoid": "^3.1.7", "postinstall-postinstall": "^2.1.0", "prettier": "^2.0.5", "puppeteer": "^3.0.4", "react-refresh": "^0.8.2", "rimraf": "^3.0.2", "type-fest": "^0.13.1", "typescript": "^3.8.3", "webpack": "^4.43.0", "webpack-cli": "^3.3.11", "webpack-dev-server": "^3.11.0", "webpack-hot-middleware": "^2.25.0", "webpack-plugin-serve": "^1.0.0", "yn": "^4.0.0" }, "peerDependencies": { "@types/webpack": "^4.41.12", "react-refresh": "^0.8.2", "sockjs-client": "^1.4.0", "type-fest": "^0.13.1", "webpack": ">=4.43.0", "webpack-dev-server": "3.x", "webpack-hot-middleware": "2.x", "webpack-plugin-serve": "0.x || 1.x" }, "peerDependenciesMeta": { "@types/webpack": { "optional": true }, "sockjs-client": { "optional": true }, "type-fest": { "optional": true }, "webpack-dev-server": { "optional": true }, "webpack-hot-middleware": { "optional": true }, "webpack-plugin-serve": { "optional": true } }, "engines": { "node": ">= 8.x" }, "readme": "# React Refresh Webpack Plugin\n\n[![Latest Version](https://img.shields.io/npm/v/@pmmmwh/react-refresh-webpack-plugin/latest)](https://www.npmjs.com/package/@pmmmwh/react-refresh-webpack-plugin/v/latest)\n[![Next Version](https://img.shields.io/npm/v/@pmmmwh/react-refresh-webpack-plugin/next)](https://www.npmjs.com/package/@pmmmwh/react-refresh-webpack-plugin/v/next)\n[![License](https://img.shields.io/github/license/pmmmwh/react-refresh-webpack-plugin)](./LICENSE)\n\nAn **EXPERIMENTAL** Webpack plugin to enable \"Fast Refresh\" (also previously known as _Hot Reloading_) for React components.\n\n## Installation\n\nFirst - this plugin is not 100% stable.\nIt works pretty reliably, and we have been testing it for some time, but there are still edge cases yet to be discovered.\nPlease **DO NOT** use it if you cannot afford to face breaking changes in the future.\n\n```sh\n# if you prefer npm\nnpm install -D @pmmmwh/react-refresh-webpack-plugin react-refresh\n\n# if you prefer yarn\nyarn add -D @pmmmwh/react-refresh-webpack-plugin react-refresh\n```\n\n## Usage\n\nFirst, apply the plugin in your Webpack configuration as follows:\n\n**webpack.config.js**\n\n```js\nconst ReactRefreshWebpackPlugin = require('@pmmmwh/react-refresh-webpack-plugin');\n// ... your other imports\n\n// You can tie this to whatever mechanisms you are using to detect a development environment.\n// For example, as shown here, is to tie that to `NODE_ENV` -\n// Then if you run `NODE_ENV=production webpack`, the constant will be set to false.\nconst isDevelopment = process.env.NODE_ENV !== 'production';\n\nmodule.exports = {\n // It is suggested to run the plugin in development mode only\n // If you are an advanced user and would like to setup Webpack yourselves,\n // you can also use the `none` mode,\n // but you will need to set `forceEnable: true` in the plugin options.\n mode: isDevelopment ? 'development' : 'production',\n // ... other configurations\n plugins: [\n // ... other plugins\n // You could also keep the plugin in your production config,\n // It will simply do nothing.\n isDevelopment && new ReactRefreshWebpackPlugin(),\n ].filter(Boolean),\n};\n```\n\nThen, update your Babel configuration.\nThis can either be done in your Webpack config (via options of `babel-loader`), or in the form of a `.babelrc`/`babel.config.js`.\n\n**webpack.config.js** (if you choose to inline the config)\n\n```js\nconst isDevelopment = process.env.NODE_ENV !== 'production';\n\nmodule.exports = {\n // DO NOT apply the plugin in production mode!\n mode: isDevelopment ? 'development' : 'production',\n module: {\n rules: [\n // ... other rules\n {\n // for TypeScript, change the following to \"\\.[jt]sx?\"\n test: /\\.jsx?$/,\n exclude: /node_modules/,\n use: [\n // ... other loaders\n {\n loader: require.resolve('babel-loader'),\n options: {\n // ... other options\n // DO NOT apply the Babel plugin in production mode!\n plugins: [isDevelopment && require.resolve('react-refresh/babel')].filter(Boolean),\n },\n },\n ],\n },\n ],\n },\n};\n```\n\n**.babelrc.js** (if you choose to extract the config)\n\n```js\nmodule.exports = (api) => {\n // This caches the Babel config by environment.\n api.cache.using(() => process.env.NODE_ENV);\n return {\n // ... other options\n plugins: [\n // ... other plugins\n // Applies the react-refresh Babel plugin on non-production modes only\n !api.env('production') && 'react-refresh/babel',\n ].filter(Boolean),\n };\n};\n```\n\nMore sample projects for common Webpack development setups are available in the [examples](https://github.com/pmmmwh/react-refresh-webpack-plugin/tree/master/examples) folder.\n\n> Note 1: If you use `webpack.config.ts`, please also install `type-fest` as a peer dependency.\n\n> Note 2: If you are using TypeScript (instead of Babel) as a transpiler, you will still need to use `babel-loader` to process your source code.\n> Check out this [sample project](https://github.com/pmmmwh/react-refresh-webpack-plugin/tree/master/examples/typescript-without-babel) on how to set this up.\n\n### Polyfill for Older Browsers\n\nIf you need to develop on IE11, you will need to polyfill the DOM URL API.\nThis can be done by adding the following before any of your code in the main entry (either one is fine):\n\n**Using `url-polyfill`**\n\n```js\nimport 'url-polyfill';\n```\n\n**Using `core-js`**\n\n```js\nimport 'core-js/features/url';\nimport 'core-js/features/url-search-params';\n```\n\n**Using `react-app-polyfill`**\n\n```js\nimport 'react-app-polyfill/ie11';\nimport 'react-app-polyfill/stable';\n```\n\n## Options\n\nThis plugin accepts a few options that are specifically targeted for advanced users.\n\n### `options.forceEnable`\n\nType: `boolean`\nDefault: `false`\n\nEnables the plugin forcefully.\nUseful if you want to use the plugin in production, or if you are using Webpack's `none` mode without `NODE_ENV`, for example.\n\n### `options.overlay`\n\nType: `boolean | ErrorOverlayOptions`\nDefault: `undefined`\n\nModifies how the error overlay integration works in the plugin.\n\n- If `options.overlay` is not provided or is `true`, the plugin will use the bundled error overlay interation.\n- If `options.overlay` is `false`, it will disable the error overlay integration.\n- If an `ErrorOverlayOptions` object is provided:\n (**NOTE**: This is an advanced option that exists mostly for tools like `create-react-app` or `Next.js`)\n\n - An optional `module` property could be defined.\n If it is not defined, the bundled error overlay will be used.\n If defined, it should reference a JS file that exports at least two functions with footprints as follows:\n\n ```ts\n function handleRuntimeError(error: Error) {}\n function clearRuntimeErrors() {}\n ```\n\n - An optional `entry` property could be defined, which should also reference a JS file that contains code needed to set up your custom error overlay integration.\n If it is not defined, the bundled error overlay entry will be used.\n It expects the `module` file to export two more functions:\n\n ```ts\n function showCompileError(webpackErrorMessage: string) {}\n function clearCompileErrors() {}\n ```\n\n Note that `webpackErrorMessage` is ANSI encoded, so you will need logic to parse it.\n\n - An example configuration:\n ```js\n const options = {\n overlay: {\n entry: 'some-webpack-entry-file',\n module: 'some-error-overlay-module',\n },\n };\n ```\n\n#### `options.overlay.sockHost`\n\nType: `string`\nDefault: `window.location.hostname`\n\nSet this if you are running webpack on a host other than `window.location.hostname`.\nThis will be used by the error overlay module, and is available for `webpack-dev-server` only.\n\n#### `options.overlay.sockIntegration`\n\nType: `wds`, `whm`, `wps` or `string`\nDefault: `wds`\n\nThis controls how the error overlay connects to the sockets provided by several Webpack hot reload integrations.\n\n- If you use `webpack-dev-server`, you don't need to set this as it defaults to `wds`.\n- If you use `webpack-hot-middleware`, you should set this to `whm`.\n- If you use `webpack-plugin-serve`, you should set this to `wps`.\n- If you use anything else, or if you want to customize the socket handling yourself, you will have to provide a path to a module that will accept a message handler function and initializes the socket connection.\n See the [`runtime/sockets`](https://github.com/pmmmwh/react-refresh-webpack-plugin/tree/master/src/runtime/sockets) folder for sample implementations.\n\n#### `options.overlay.sockPort`\n\nType: `number`\nDefault: `window.location.port`\n\nSet this if you are running webpack on a port other than `window.location.port`.\nThis will be used by the error overlay module, and is available for `webpack-dev-server` only.\n\n#### `options.overlay.sockPath`\n\nType: `string`\nDefault: `/sockjs-node`\n\nSet this if you are running webpack on a custom path.\nThis will be used by the error overlay module, and is available for `webpack-dev-server` only.\n\n### `options.useLegacyWDSSockets`\n\nType: `boolean`\nDefault: `false`\n\nSet this to true if you are using a `webpack-dev-server` version prior to 3.8 as it requires a custom SockJS implementation.\nIf you use this feature, you will also need to install `sockjs-client` as a peer dependency.\n\n## Related Work\n\n- [Initial Implementation by @maisano](https://gist.github.com/maisano/441a4bc6b2954205803d68deac04a716)\n", "readmeFilename": "README.md", "gitHead": "9b367584d4076e506ae36bda1814fefceeb89fd6", "_id": "@pmmmwh/react-refresh-webpack-plugin@0.4.0-beta.1", "_nodeVersion": "14.2.0", "_npmVersion": "6.14.4", "dist": { "integrity": "sha512-Ege+Yu41MDxZQGqpJYK3dNCaiWEbZNrYpbtzFq6MKbw5DmWaLuuMwHIBd336LGzBcQOVSpXuBiPAzKGsVElJzg==", "shasum": "ee72a65abc43e69a84236821f087dccf3b2cb661", "tarball": "https://registry.npmjs.org/@pmmmwh/react-refresh-webpack-plugin/-/react-refresh-webpack-plugin-0.4.0-beta.1.tgz", "fileCount": 38, "unpackedSize": 81671, "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJexHvvCRA9TVsSAnZWagAAzDsP/2BMC9H6CfnKeQbfnfvi\nBb4qmYtjoqvhTh++Uj58KGIv5tk4nLNrO2AF4yu+dZ2LJoU7IovqfZKD6jgR\nxrnAl6vMDKA9MMzU58ahAYYAG1YyBkFR6jby9/hK4nZig9X1UCPb7W5CDDBL\n7bmR0CJS1V5JuorjUIdtY1asr0nCcn8t3obwXWA+izu+lcEPro/wl1b/6X98\nTuccuOp3a2Zx9lKjO0uANSzRl66Kc+HoU0kOOrp6kk/AV5IpzgKPUKnRn60b\nRIE1vdvK04+s3C+laYSkYAoq2SOWDb6EVVkTpmdyVsUQNxI7VqK67ylB7ps2\nm3PJfpc/R0iFlax4Jc15QPu1r0sBdDpPuHX8qqFsXuhg21CynQsXNrFdWnb2\nb2frZd6Vy4czyskFY/Wex1ygDSgnw5F5baqFEl/g7fRHOFXsBHUSt23Qo759\nY256ZQ7RZESr7X3Wq08Ng0T6ss+qxhNmIYgzEbOvnb5HoIupdfjtEwflcK2d\nf5hmsyle5FlO/9TPnPRqexm3hfkhbHZchnFu+TkhFG6gVurPU40Kbro0VqPk\n7rYV+G71tK0KCrVQfnGWChyKJaEAVBQEb7tT3MP+3rEpbdUVV3/Y266T2m07\nOMnr5oLh15nefLGmbxavsqEDJJNkGI16oHtS5VLa28xrJ6l75kEVIdvsNDjV\nGEib\r\n=F2SL\r\n-----END PGP SIGNATURE-----\r\n" }, "maintainers": [ { "name": "pmmmwh", "email": "pmmmwh@gmail.com" } ], "_npmUser": { "name": "pmmmwh", "email": "pmmmwh@gmail.com" }, "directories": {}, "_npmOperationalInternal": { "host": "s3://npm-registry-packages", "tmp": "tmp/react-refresh-webpack-plugin_0.4.0-beta.1_1589935086809_0.9728660430031153" }, "_hasShrinkwrap": false }, "0.3.2": { "name": "@pmmmwh/react-refresh-webpack-plugin", "version": "0.3.2", "description": "An **EXPERIMENTAL** Webpack plugin to enable \"Fast Refresh\" (also previously known as _Hot Reloading_) for React components.", "keywords": [ "react", "javascript", "webpack", "refresh", "hmr", "hotreload", "livereload", "live", "edit", "hot", "reload" ], "homepage": "https://github.com/pmmmwh/react-refresh-webpack-plugin#readme", "bugs": { "url": "https://github.com/pmmmwh/react-refresh-webpack-plugin/issues" }, "repository": { "type": "git", "url": "git+https://github.com/pmmmwh/react-refresh-webpack-plugin.git" }, "license": "MIT", "author": { "name": "Michael Mok" }, "main": "src/index.js", "types": "types/index.d.ts", "scripts": { "lint": "eslint --report-unused-disable-directives --ext .js .", "lint:fix": "yarn lint --fix", "format": "prettier --write \"**/*.{js,jsx,ts,tsx,json,md}\"", "format:check": "prettier --check \"**/*.{js,jsx,ts,tsx,json,md}\"", "generate-types": "tsc -p tsconfig.json && rimraf \"types/{helpers,runtime}\" && yarn format", "prepublishOnly": "rimraf types && yarn generate-types" }, "dependencies": { "ansi-html": "^0.0.7", "error-stack-parser": "^2.0.6", "html-entities": "^1.2.1", "lodash.debounce": "^4.0.8", "native-url": "^0.2.6", "schema-utils": "^2.6.5" }, "devDependencies": { "@types/json-schema": "^7.0.4", "@types/node": "^13.11.1", "@types/webpack": "^4.41.11", "eslint": "^6.8.0", "eslint-config-prettier": "^6.10.1", "prettier": "^2.0.4", "react-refresh": "^0.8.1", "rimraf": "^3.0.2", "type-fest": "^0.13.1", "typescript": "^3.8.3", "webpack": "^4.42.1", "webpack-dev-server": "^3.11.0", "webpack-hot-middleware": "^2.25.0", "webpack-plugin-serve": "^1.0.0" }, "peerDependencies": { "@types/webpack": "^4.41.12", "react-refresh": "^0.8.2", "sockjs-client": "^1.4.0", "type-fest": "^0.13.1", "webpack-dev-server": "3.x", "webpack-hot-middleware": "2.x", "webpack-plugin-serve": "0.x || 1.x" }, "peerDependenciesMeta": { "@types/webpack": { "optional": true }, "sockjs-client": { "optional": true }, "type-fest": { "optional": true }, "webpack-dev-server": { "optional": true }, "webpack-hot-middleware": { "optional": true }, "webpack-plugin-serve": { "optional": true } }, "engines": { "node": ">= 8.x" }, "gitHead": "95232a7b232a37f6e5d24113f6b7274711f7cf90", "_id": "@pmmmwh/react-refresh-webpack-plugin@0.3.2", "_nodeVersion": "14.2.0", "_npmVersion": "6.14.4", "dist": { "integrity": "sha512-3BPQLDiev6hIkQvhUGKO0nS7/u8l2dgIu1AbUcVnjgxuzrwIox70gb98K8p9lDO67DgCg7bWT6KE9GgdcMYtng==", "shasum": "92452c98256491466862c14c887010518074b631", "tarball": "https://registry.npmjs.org/@pmmmwh/react-refresh-webpack-plugin/-/react-refresh-webpack-plugin-0.3.2.tgz", "fileCount": 38, "unpackedSize": 81243, "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJexrpuCRA9TVsSAnZWagAAtlEP+wcaAaTbNKafxIM3fZOG\n3F4zx996WQmOyTGS5Be6ejDiq8s88ij9iwG8FRKc2t1ZwcLwGk8CpB+B/uJA\nQYzNe3ngvz2m7evGgi+vgSF6LX6KAddrX+smTMRFhEkxjUVQeinhg9IbC2g1\npLbObb4rhNpJNnO2p9k7L7zS5itMnR0esFU/j84NThWkBoPJhSp9wZFVzgkV\nWmAs0ohF48sek53DJHoJSbwLKIzkVM6Vd6VSoTjovEqIGc9Ge76MurG118O0\nij0ck3Z1y/OB9m4QPq2QY+bu98/fAUWWg0W4cZyO6y2+kpxa1BYnKGphObzy\npoPmEeHmDP3gxvL8qesSXYvlnH2NXr0o2r8VgMwFr0A9xy2pLHb1REkRENM3\nmXGDVNJChHtR1e/xuokF8CxY6thUzPOYjSIxq5oNjjZ4n+Z2FBSOYajwdkwN\nL30U5n90hvLlPW02ixzocxfbPMitCbRfPfhYRz24IKDGgn8RuQ7hroP2iVQw\nNKrQkDKER6837YpRoMAJErcF5HpTeVs51d0KE+dT+A3BA3aS+lzWG7W4AHs+\nagpdA4bzAjCSUc+MyoulzoqcrLdp9Ybz7+lCl0Uq4vpnpkKARNt4NnBHXQ0U\nWwjehCSM6q1eKV23sBLZi0rQsx6Kqspwe75oGxHSdN0EQ8xbex15d/y/7flK\nLXI5\r\n=OEE2\r\n-----END PGP SIGNATURE-----\r\n" }, "maintainers": [ { "name": "pmmmwh", "email": "pmmmwh@gmail.com" } ], "_npmUser": { "name": "pmmmwh", "email": "pmmmwh@gmail.com" }, "directories": {}, "_npmOperationalInternal": { "host": "s3://npm-registry-packages", "tmp": "tmp/react-refresh-webpack-plugin_0.3.2_1590082157578_0.025432418366245324" }, "_hasShrinkwrap": false }, "0.4.0-beta.2": { "name": "@pmmmwh/react-refresh-webpack-plugin", "version": "0.4.0-beta.2", "description": "An **EXPERIMENTAL** Webpack plugin to enable \"Fast Refresh\" (also previously known as _Hot Reloading_) for React components.", "keywords": [ "react", "javascript", "webpack", "refresh", "hmr", "hotreload", "livereload", "live", "edit", "hot", "reload" ], "homepage": "https://github.com/pmmmwh/react-refresh-webpack-plugin#readme", "bugs": { "url": "https://github.com/pmmmwh/react-refresh-webpack-plugin/issues" }, "repository": { "type": "git", "url": "git+https://github.com/pmmmwh/react-refresh-webpack-plugin.git" }, "license": "MIT", "author": { "name": "Michael Mok" }, "main": "src/index.js", "types": "types/index.d.ts", "scripts": { "pretest": "yarn link && yarn link \"@pmmmwh/react-refresh-webpack-plugin\"", "test": "node scripts/test.js", "lint": "eslint --report-unused-disable-directives --ext .js .", "lint:fix": "yarn lint --fix", "format": "prettier --write \"**/*.{js,jsx,ts,tsx,json,md}\"", "format:check": "prettier --check \"**/*.{js,jsx,ts,tsx,json,md}\"", "generate-types": "tsc -p tsconfig.json && rimraf \"types/{helpers,runtime}\" && yarn format", "prepublishOnly": "rimraf types && yarn generate-types" }, "dependencies": { "ansi-html": "^0.0.7", "error-stack-parser": "^2.0.6", "html-entities": "^1.2.1", "lodash.debounce": "^4.0.8", "native-url": "^0.2.6", "schema-utils": "^2.6.5" }, "devDependencies": { "@babel/core": "^7.9.6", "@types/json-schema": "^7.0.4", "@types/node": "^14.0.1", "@types/puppeteer": "^2.1.0", "@types/webpack": "^4.41.12", "babel-loader": "^8.1.0", "cross-spawn": "^7.0.2", "eslint": "^7.0.0", "eslint-config-prettier": "^6.11.0", "eslint-plugin-prettier": "^3.1.3", "fs-extra": "^9.0.0", "get-port": "^5.1.1", "jest": "^26.0.1", "jest-circus": "^26.0.1", "jest-environment-node": "^26.0.1", "jest-watch-typeahead": "^0.6.0", "nanoid": "^3.1.7", "postinstall-postinstall": "^2.1.0", "prettier": "^2.0.5", "puppeteer": "^3.0.4", "react-refresh": "^0.8.2", "rimraf": "^3.0.2", "type-fest": "^0.13.1", "typescript": "^3.8.3", "webpack": "^4.43.0", "webpack-cli": "^3.3.11", "webpack-dev-server": "^3.11.0", "webpack-hot-middleware": "^2.25.0", "webpack-plugin-serve": "^1.0.0", "yn": "^4.0.0" }, "peerDependencies": { "@types/webpack": "^4.41.12", "react-refresh": "^0.8.2", "sockjs-client": "^1.4.0", "type-fest": "^0.13.1", "webpack": ">=4.43.0", "webpack-dev-server": "3.x", "webpack-hot-middleware": "2.x", "webpack-plugin-serve": "0.x || 1.x" }, "peerDependenciesMeta": { "@types/webpack": { "optional": true }, "sockjs-client": { "optional": true }, "type-fest": { "optional": true }, "webpack-dev-server": { "optional": true }, "webpack-hot-middleware": { "optional": true }, "webpack-plugin-serve": { "optional": true } }, "engines": { "node": ">= 8.x" }, "readme": "# React Refresh Webpack Plugin\n\n[![Latest Version](https://img.shields.io/npm/v/@pmmmwh/react-refresh-webpack-plugin/latest)](https://www.npmjs.com/package/@pmmmwh/react-refresh-webpack-plugin/v/latest)\n[![Next Version](https://img.shields.io/npm/v/@pmmmwh/react-refresh-webpack-plugin/next)](https://www.npmjs.com/package/@pmmmwh/react-refresh-webpack-plugin/v/next)\n[![License](https://img.shields.io/github/license/pmmmwh/react-refresh-webpack-plugin)](./LICENSE)\n\nAn **EXPERIMENTAL** Webpack plugin to enable \"Fast Refresh\" (also previously known as _Hot Reloading_) for React components.\n\n## Installation\n\nFirst - this plugin is not 100% stable.\nIt works pretty reliably, and we have been testing it for some time, but there are still edge cases yet to be discovered.\nPlease **DO NOT** use it if you cannot afford to face breaking changes in the future.\n\n```sh\n# if you prefer npm\nnpm install -D @pmmmwh/react-refresh-webpack-plugin react-refresh\n\n# if you prefer yarn\nyarn add -D @pmmmwh/react-refresh-webpack-plugin react-refresh\n```\n\n## Usage\n\nFirst, apply the plugin in your Webpack configuration as follows:\n\n**webpack.config.js**\n\n```js\nconst ReactRefreshWebpackPlugin = require('@pmmmwh/react-refresh-webpack-plugin');\n// ... your other imports\n\n// You can tie this to whatever mechanisms you are using to detect a development environment.\n// For example, as shown here, is to tie that to `NODE_ENV` -\n// Then if you run `NODE_ENV=production webpack`, the constant will be set to false.\nconst isDevelopment = process.env.NODE_ENV !== 'production';\n\nmodule.exports = {\n // It is suggested to run the plugin in development mode only\n // If you are an advanced user and would like to setup Webpack yourselves,\n // you can also use the `none` mode,\n // but you will need to set `forceEnable: true` in the plugin options.\n mode: isDevelopment ? 'development' : 'production',\n // ... other configurations\n plugins: [\n // ... other plugins\n // You could also keep the plugin in your production config,\n // It will simply do nothing.\n isDevelopment && new ReactRefreshWebpackPlugin(),\n ].filter(Boolean),\n};\n```\n\nThen, update your Babel configuration.\nThis can either be done in your Webpack config (via options of `babel-loader`), or in the form of a `.babelrc`/`babel.config.js`.\n\n**webpack.config.js** (if you choose to inline the config)\n\n```js\nconst isDevelopment = process.env.NODE_ENV !== 'production';\n\nmodule.exports = {\n // DO NOT apply the plugin in production mode!\n mode: isDevelopment ? 'development' : 'production',\n module: {\n rules: [\n // ... other rules\n {\n // for TypeScript, change the following to \"\\.[jt]sx?\"\n test: /\\.jsx?$/,\n exclude: /node_modules/,\n use: [\n // ... other loaders\n {\n loader: require.resolve('babel-loader'),\n options: {\n // ... other options\n // DO NOT apply the Babel plugin in production mode!\n plugins: [isDevelopment && require.resolve('react-refresh/babel')].filter(Boolean),\n },\n },\n ],\n },\n ],\n },\n};\n```\n\n**.babelrc.js** (if you choose to extract the config)\n\n```js\nmodule.exports = (api) => {\n // This caches the Babel config by environment.\n api.cache.using(() => process.env.NODE_ENV);\n return {\n // ... other options\n plugins: [\n // ... other plugins\n // Applies the react-refresh Babel plugin on non-production modes only\n !api.env('production') && 'react-refresh/babel',\n ].filter(Boolean),\n };\n};\n```\n\nMore sample projects for common Webpack development setups are available in the [examples](https://github.com/pmmmwh/react-refresh-webpack-plugin/tree/master/examples) folder.\n\n> Note 1: If you use `webpack.config.ts`, please also install `type-fest` as a peer dependency.\n\n> Note 2: If you are using TypeScript (instead of Babel) as a transpiler, you will still need to use `babel-loader` to process your source code.\n> Check out this [sample project](https://github.com/pmmmwh/react-refresh-webpack-plugin/tree/master/examples/typescript-without-babel) on how to set this up.\n\n### Polyfill for Older Browsers\n\nIf you need to develop on IE11, you will need to polyfill the DOM URL API.\nThis can be done by adding the following before any of your code in the main entry (either one is fine):\n\n**Using `url-polyfill`**\n\n```js\nimport 'url-polyfill';\n```\n\n**Using `core-js`**\n\n```js\nimport 'core-js/features/url';\nimport 'core-js/features/url-search-params';\n```\n\n**Using `react-app-polyfill`**\n\n```js\nimport 'react-app-polyfill/ie11';\nimport 'react-app-polyfill/stable';\n```\n\n## Options\n\nThis plugin accepts a few options that are specifically targeted for advanced users.\n\n### `options.forceEnable`\n\nType: `boolean`\nDefault: `false`\n\nEnables the plugin forcefully.\nUseful if you want to use the plugin in production, or if you are using Webpack's `none` mode without `NODE_ENV`, for example.\n\n### `options.overlay`\n\nType: `boolean | ErrorOverlayOptions`\nDefault: `undefined`\n\nModifies how the error overlay integration works in the plugin.\n\n- If `options.overlay` is not provided or is `true`, the plugin will use the bundled error overlay interation.\n- If `options.overlay` is `false`, it will disable the error overlay integration.\n- If an `ErrorOverlayOptions` object is provided:\n (**NOTE**: This is an advanced option that exists mostly for tools like `create-react-app` or `Next.js`)\n\n - An optional `module` property could be defined.\n If it is not defined, the bundled error overlay will be used.\n If defined, it should reference a JS file that exports at least two functions with footprints as follows:\n\n ```ts\n function handleRuntimeError(error: Error) {}\n function clearRuntimeErrors() {}\n ```\n\n - An optional `entry` property could be defined, which should also reference a JS file that contains code needed to set up your custom error overlay integration.\n If it is not defined, the bundled error overlay entry will be used.\n It expects the `module` file to export two more functions:\n\n ```ts\n function showCompileError(webpackErrorMessage: string) {}\n function clearCompileErrors() {}\n ```\n\n Note that `webpackErrorMessage` is ANSI encoded, so you will need logic to parse it.\n\n - An example configuration:\n ```js\n const options = {\n overlay: {\n entry: 'some-webpack-entry-file',\n module: 'some-error-overlay-module',\n },\n };\n ```\n\n#### `options.overlay.sockHost`\n\nType: `string`\nDefault: `window.location.hostname`\n\nSet this if you are running webpack on a host other than `window.location.hostname`.\nThis will be used by the error overlay module, and is available for `webpack-dev-server` only.\n\n#### `options.overlay.sockIntegration`\n\nType: `wds`, `whm`, `wps` or `string`\nDefault: `wds`\n\nThis controls how the error overlay connects to the sockets provided by several Webpack hot reload integrations.\n\n- If you use `webpack-dev-server`, you don't need to set this as it defaults to `wds`.\n- If you use `webpack-hot-middleware`, you should set this to `whm`.\n- If you use `webpack-plugin-serve`, you should set this to `wps`.\n- If you use anything else, or if you want to customize the socket handling yourself, you will have to provide a path to a module that will accept a message handler function and initializes the socket connection.\n See the [`runtime/sockets`](https://github.com/pmmmwh/react-refresh-webpack-plugin/tree/master/src/runtime/sockets) folder for sample implementations.\n\n#### `options.overlay.sockPort`\n\nType: `number`\nDefault: `window.location.port`\n\nSet this if you are running webpack on a port other than `window.location.port`.\nThis will be used by the error overlay module, and is available for `webpack-dev-server` only.\n\n#### `options.overlay.sockPath`\n\nType: `string`\nDefault: `/sockjs-node`\n\nSet this if you are running webpack on a custom path.\nThis will be used by the error overlay module, and is available for `webpack-dev-server` only.\n\n### `options.useLegacyWDSSockets`\n\nType: `boolean`\nDefault: `false`\n\nSet this to true if you are using a `webpack-dev-server` version prior to 3.8 as it requires a custom SockJS implementation.\nIf you use this feature, you will also need to install `sockjs-client` as a peer dependency.\n\n## Related Work\n\n- [Initial Implementation by @maisano](https://gist.github.com/maisano/441a4bc6b2954205803d68deac04a716)\n", "readmeFilename": "README.md", "gitHead": "3a807499dd1b9f98ff41fd72605cbfcb4e339741", "_id": "@pmmmwh/react-refresh-webpack-plugin@0.4.0-beta.2", "_nodeVersion": "14.2.0", "_npmVersion": "6.14.4", "dist": { "integrity": "sha512-tQgUGpjwNBAmfZhQxK0lac/O9WOj3bwnYZy0/8sTnN0It27ZN7LFRn8dvL7AxYL+gpXNDng20AsGn+D3G46onA==", "shasum": "67925467e54e9d1aa54bbbacd294cdf37729f622", "tarball": "https://registry.npmjs.org/@pmmmwh/react-refresh-webpack-plugin/-/react-refresh-webpack-plugin-0.4.0-beta.2.tgz", "fileCount": 38, "unpackedSize": 82300, "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe0NpuCRA9TVsSAnZWagAApb8QAIzyQBbTyqlxR+DKF4Vu\nU101RUdgmGo+0iShxuuXl4PnucDBJDacJXGfeqNUAvtm7Kdx+wZ3MP8M5ywj\n0YNwX99oYUkkLqw0FmHpKGq/SVJEwCktBMXMMWOqSFzvXGtRmirLqM1Hp77M\niQMos6udf8UDE8kuUC/anFE34kHQi9OI0/ZqxGORjMPI8jVwWlII8t8NC4YJ\nwr240n710U+vWhCRyqUUAdMe4c5CxYWLbSU0p+5EkXaRO0zdiP75rbphpBol\n5Do5vSSPZFOybGChbuFA9/YMoWreKyz/jOQhYjywm0O8Qn1rw7SPx8UySoNa\nKwVHBz7ednbaP5gxM22qpzu9lyE1HHKtjktquVMDh0H4QsMxQASggT36id0F\n1mAPSZbrRBwToLJFZq2NZCw0dNbB3ntTlClz3tJeB0dlJssOOJZ19PeDEmqo\npkenFm90s1tLg5gfSYo7pMDNiuxAVjDS+97nLuEcoqmnpXjuojmUxZ1mosxV\n7Zpbp0+DaL9nHyy6FL4rvi9sSDeUASbHXSFMlvpL1WvN5a7Zc8oBaiXxjG1n\njiEDQoSJSKJKgtl94LXnfjEMrRCl5WMz0bkcdxappRGuI3JMKs0PH1KF5g0K\nOOcEpMKPmVpEyGOsYl+KY10Mj5WtDlMs+qrQPbI/hlksNNfwAeXxhoEkt//h\nJqoZ\r\n=Ba7S\r\n-----END PGP SIGNATURE-----\r\n" }, "maintainers": [ { "name": "pmmmwh", "email": "pmmmwh@gmail.com" } ], "_npmUser": { "name": "pmmmwh", "email": "pmmmwh@gmail.com" }, "directories": {}, "_npmOperationalInternal": { "host": "s3://npm-registry-packages", "tmp": "tmp/react-refresh-webpack-plugin_0.4.0-beta.2_1590745709723_0.03584256099595806" }, "_hasShrinkwrap": false }, "0.3.3": { "name": "@pmmmwh/react-refresh-webpack-plugin", "version": "0.3.3", "description": "An **EXPERIMENTAL** Webpack plugin to enable \"Fast Refresh\" (also previously known as _Hot Reloading_) for React components.", "keywords": [ "react", "javascript", "webpack", "refresh", "hmr", "hotreload", "livereload", "live", "edit", "hot", "reload" ], "homepage": "https://github.com/pmmmwh/react-refresh-webpack-plugin#readme", "bugs": { "url": "https://github.com/pmmmwh/react-refresh-webpack-plugin/issues" }, "repository": { "type": "git", "url": "git+https://github.com/pmmmwh/react-refresh-webpack-plugin.git" }, "license": "MIT", "author": { "name": "Michael Mok" }, "main": "src/index.js", "types": "types/index.d.ts", "scripts": { "lint": "eslint --report-unused-disable-directives --ext .js .", "lint:fix": "yarn lint --fix", "format": "prettier --write \"**/*.{js,jsx,ts,tsx,json,md}\"", "format:check": "prettier --check \"**/*.{js,jsx,ts,tsx,json,md}\"", "generate-types": "tsc -p tsconfig.json && rimraf \"types/{helpers,runtime}\" && yarn format", "prepublishOnly": "rimraf types && yarn generate-types" }, "dependencies": { "ansi-html": "^0.0.7", "error-stack-parser": "^2.0.6", "html-entities": "^1.2.1", "lodash.debounce": "^4.0.8", "native-url": "^0.2.6", "schema-utils": "^2.6.5" }, "devDependencies": { "@types/json-schema": "^7.0.4", "@types/node": "^13.11.1", "@types/webpack": "^4.41.11", "eslint": "^6.8.0", "eslint-config-prettier": "^6.10.1", "prettier": "^2.0.4", "react-refresh": "^0.8.1", "rimraf": "^3.0.2", "type-fest": "^0.13.1", "typescript": "^3.8.3", "webpack": "^4.42.1", "webpack-dev-server": "^3.11.0", "webpack-hot-middleware": "^2.25.0", "webpack-plugin-serve": "^1.0.0" }, "peerDependencies": { "@types/webpack": "^4.41.12", "react-refresh": "^0.8.2", "sockjs-client": "^1.4.0", "type-fest": "^0.13.1", "webpack-dev-server": "3.x", "webpack-hot-middleware": "2.x", "webpack-plugin-serve": "0.x || 1.x" }, "peerDependenciesMeta": { "@types/webpack": { "optional": true }, "sockjs-client": { "optional": true }, "type-fest": { "optional": true }, "webpack-dev-server": { "optional": true }, "webpack-hot-middleware": { "optional": true }, "webpack-plugin-serve": { "optional": true } }, "engines": { "node": ">= 8.x" }, "gitHead": "c7bdc133120955acc206cc2aaccac0b9e861081c", "_id": "@pmmmwh/react-refresh-webpack-plugin@0.3.3", "_nodeVersion": "14.2.0", "_npmVersion": "6.14.4", "dist": { "integrity": "sha512-uc6FmPEegAZawSHjUMFQwU7EjaDn7zy1iD/KD/wBROL9F4378OES8MKMYHoRAKT61Fk7LxVKZSDR5VespMQiqw==", "shasum": "40a3d674f42a011b7f30a9609aa8fb68ec3c39c9", "tarball": "https://registry.npmjs.org/@pmmmwh/react-refresh-webpack-plugin/-/react-refresh-webpack-plugin-0.3.3.tgz", "fileCount": 38, "unpackedSize": 81309, "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe0SpfCRA9TVsSAnZWagAAKAwQAJ+RJLsr8+LW0gRnj09A\njVAO0PuwFA8KSv7wYE74865J/ne8syLuXs/ofn9xlBC7j7QMr0ezUyadaFWG\n2rTUgDkkzo6h2W/FzpS2bw2zFLK/KwlWDrMPiyvUfDmYUCGDSsooXnzwxXbK\nDQfu6c17V9gkG1qcra8jkxz5XRVlvpLinhh2l3eB8i/13B0vtN3EzKdI4NgX\n/CjJIe+ybWciuz04HiHVyOmYI4Nrz5LthVK1Rd8sdgiqbReyFHAgFyrPW/lh\nnMhkbcvgcNEJTRsR+CvzbOI/eFSkMBKaZ4iAQVFkw9tiS4lHsjqriwDFGz0/\nIz7RnycamiTgNgrocrEar7I9+JCzVTWPCsXRkx+FAA0XAUjRTlwXRUDGFwNN\naz/Xos7/eDu1/t1G1nfWi0gYXlcSUzdg+LHhdOpG6wnv5z8Vmm+Yuljhodgr\nBfidHE0vxENAk3kCV1mdX8J4p2+5HCIVOTW64nuKF1T3VXHR9jDW0R0DMg6m\n+07qf4EAhyLeQkOCwv3ftw7QiotaRG7dwHckiivUpO1SiY2CciHj10PfWTpC\nZaJ6HsRQ7bELuksperDGq5sz/e4da26sQA5nyncqzwsrwYyTcFV4OhwMdh+u\nXR1xq2awRQtPDOMq26uNbTwSenxNjBmnkSXOe9tC4q9fv+RqSN7JvvT37SQU\n3zDW\r\n=mip3\r\n-----END PGP SIGNATURE-----\r\n" }, "maintainers": [ { "name": "pmmmwh", "email": "pmmmwh@gmail.com" } ], "_npmUser": { "name": "pmmmwh", "email": "pmmmwh@gmail.com" }, "directories": {}, "_npmOperationalInternal": { "host": "s3://npm-registry-packages", "tmp": "tmp/react-refresh-webpack-plugin_0.3.3_1590766174515_0.1092431486751968" }, "_hasShrinkwrap": false }, "0.4.0-beta.3": { "name": "@pmmmwh/react-refresh-webpack-plugin", "version": "0.4.0-beta.3", "description": "An **EXPERIMENTAL** Webpack plugin to enable \"Fast Refresh\" (also previously known as _Hot Reloading_) for React components.", "keywords": [ "react", "javascript", "webpack", "refresh", "hmr", "hotreload", "livereload", "live", "edit", "hot", "reload" ], "homepage": "https://github.com/pmmmwh/react-refresh-webpack-plugin#readme", "bugs": { "url": "https://github.com/pmmmwh/react-refresh-webpack-plugin/issues" }, "repository": { "type": "git", "url": "git+https://github.com/pmmmwh/react-refresh-webpack-plugin.git" }, "license": "MIT", "author": { "name": "Michael Mok" }, "main": "src/index.js", "types": "types/index.d.ts", "scripts": { "pretest": "yarn link && yarn link \"@pmmmwh/react-refresh-webpack-plugin\"", "posttest": "yarn unlink \"@pmmmwh/react-refresh-webpack-plugin\"", "test": "node scripts/test.js", "lint": "eslint --report-unused-disable-directives --ext .js .", "lint:fix": "yarn lint --fix", "format": "prettier --write \"**/*.{js,jsx,ts,tsx,json,md}\"", "format:check": "prettier --check \"**/*.{js,jsx,ts,tsx,json,md}\"", "generate-types": "tsc -p tsconfig.json && rimraf \"types/{helpers,runtime}\" && yarn format", "prepublishOnly": "rimraf types && yarn generate-types" }, "dependencies": { "ansi-html": "^0.0.7", "error-stack-parser": "^2.0.6", "html-entities": "^1.2.1", "lodash.debounce": "^4.0.8", "native-url": "^0.2.6", "schema-utils": "^2.6.5", "source-map": "^0.7.3" }, "devDependencies": { "@babel/core": "^7.9.6", "@types/json-schema": "^7.0.4", "@types/node": "^14.0.1", "@types/puppeteer": "^2.1.0", "@types/webpack": "^4.41.12", "babel-loader": "^8.1.0", "cross-spawn": "^7.0.2", "eslint": "^7.0.0", "eslint-config-prettier": "^6.11.0", "eslint-plugin-prettier": "^3.1.3", "fs-extra": "^9.0.0", "get-port": "^5.1.1", "jest": "^26.0.1", "jest-circus": "^26.0.1", "jest-environment-node": "^26.0.1", "jest-watch-typeahead": "^0.6.0", "nanoid": "^3.1.7", "postinstall-postinstall": "^2.1.0", "prettier": "^2.0.5", "puppeteer": "^3.0.4", "react-refresh": "^0.8.2", "rimraf": "^3.0.2", "type-fest": "^0.13.1", "typescript": "^3.8.3", "webpack": "^4.43.0", "webpack-cli": "^3.3.11", "webpack-dev-server": "^3.11.0", "webpack-hot-middleware": "^2.25.0", "webpack-plugin-serve": "^1.0.0", "yn": "^4.0.0" }, "peerDependencies": { "@types/webpack": "^4.41.12", "react-refresh": "^0.8.2", "sockjs-client": "^1.4.0", "type-fest": "^0.13.1", "webpack": ">=4.43.0", "webpack-dev-server": "3.x", "webpack-hot-middleware": "2.x", "webpack-plugin-serve": "0.x || 1.x" }, "peerDependenciesMeta": { "@types/webpack": { "optional": true }, "sockjs-client": { "optional": true }, "type-fest": { "optional": true }, "webpack-dev-server": { "optional": true }, "webpack-hot-middleware": { "optional": true }, "webpack-plugin-serve": { "optional": true } }, "engines": { "node": ">= 8.x" }, "readme": "# React Refresh Webpack Plugin\n\n[![Latest Version](https://img.shields.io/npm/v/@pmmmwh/react-refresh-webpack-plugin/latest)](https://www.npmjs.com/package/@pmmmwh/react-refresh-webpack-plugin/v/latest)\n[![Next Version](https://img.shields.io/npm/v/@pmmmwh/react-refresh-webpack-plugin/next)](https://www.npmjs.com/package/@pmmmwh/react-refresh-webpack-plugin/v/next)\n[![License](https://img.shields.io/github/license/pmmmwh/react-refresh-webpack-plugin)](./LICENSE)\n\nAn **EXPERIMENTAL** Webpack plugin to enable \"Fast Refresh\" (also previously known as _Hot Reloading_) for React components.\n\n## Installation\n\nFirst - this plugin is not 100% stable.\nIt works pretty reliably, and we have been testing it for some time, but there are still edge cases yet to be discovered.\nPlease **DO NOT** use it if you cannot afford to face breaking changes in the future.\n\n```sh\n# if you prefer npm\nnpm install -D @pmmmwh/react-refresh-webpack-plugin react-refresh\n\n# if you prefer yarn\nyarn add -D @pmmmwh/react-refresh-webpack-plugin react-refresh\n```\n\n## Usage\n\nFirst, apply the plugin in your Webpack configuration as follows:\n\n**webpack.config.js**\n\n```js\nconst ReactRefreshWebpackPlugin = require('@pmmmwh/react-refresh-webpack-plugin');\n// ... your other imports\n\n// You can tie this to whatever mechanisms you are using to detect a development environment.\n// For example, as shown here, is to tie that to `NODE_ENV` -\n// Then if you run `NODE_ENV=production webpack`, the constant will be set to false.\nconst isDevelopment = process.env.NODE_ENV !== 'production';\n\nmodule.exports = {\n // It is suggested to run the plugin in development mode only\n // If you are an advanced user and would like to setup Webpack yourselves,\n // you can also use the `none` mode,\n // but you will need to set `forceEnable: true` in the plugin options.\n mode: isDevelopment ? 'development' : 'production',\n // ... other configurations\n plugins: [\n // ... other plugins\n // You could also keep the plugin in your production config,\n // It will simply do nothing.\n isDevelopment && new ReactRefreshWebpackPlugin(),\n ].filter(Boolean),\n};\n```\n\nThen, update your Babel configuration.\nThis can either be done in your Webpack config (via options of `babel-loader`), or in the form of a `.babelrc`/`babel.config.js`.\n\n**webpack.config.js** (if you choose to inline the config)\n\n```js\nconst isDevelopment = process.env.NODE_ENV !== 'production';\n\nmodule.exports = {\n // DO NOT apply the plugin in production mode!\n mode: isDevelopment ? 'development' : 'production',\n module: {\n rules: [\n // ... other rules\n {\n // for TypeScript, change the following to \"\\.[jt]sx?\"\n test: /\\.jsx?$/,\n exclude: /node_modules/,\n use: [\n // ... other loaders\n {\n loader: require.resolve('babel-loader'),\n options: {\n // ... other options\n // DO NOT apply the Babel plugin in production mode!\n plugins: [isDevelopment && require.resolve('react-refresh/babel')].filter(Boolean),\n },\n },\n ],\n },\n ],\n },\n};\n```\n\n**.babelrc.js** (if you choose to extract the config)\n\n```js\nmodule.exports = (api) => {\n // This caches the Babel config by environment.\n api.cache.using(() => process.env.NODE_ENV);\n return {\n // ... other options\n plugins: [\n // ... other plugins\n // Applies the react-refresh Babel plugin on non-production modes only\n !api.env('production') && 'react-refresh/babel',\n ].filter(Boolean),\n };\n};\n```\n\nMore sample projects for common Webpack development setups are available in the [examples](https://github.com/pmmmwh/react-refresh-webpack-plugin/tree/master/examples) folder.\n\n> Note 1: If you use `webpack.config.ts`, please also install `type-fest` as a peer dependency.\n\n> Note 2: If you are using TypeScript (instead of Babel) as a transpiler, you will still need to use `babel-loader` to process your source code.\n> Check out this [sample project](https://github.com/pmmmwh/react-refresh-webpack-plugin/tree/master/examples/typescript-without-babel) on how to set this up.\n\n### Polyfill for Older Browsers\n\nIf you need to develop on IE11, you will need to polyfill the DOM URL API.\nThis can be done by adding the following before any of your code in the main entry (either one is fine):\n\n**Using `url-polyfill`**\n\n```js\nimport 'url-polyfill';\n```\n\n**Using `core-js`**\n\n```js\nimport 'core-js/features/url';\nimport 'core-js/features/url-search-params';\n```\n\n**Using `react-app-polyfill`**\n\n```js\nimport 'react-app-polyfill/ie11';\nimport 'react-app-polyfill/stable';\n```\n\n## Options\n\nThis plugin accepts a few options that are specifically targeted for advanced users.\n\n### `options.forceEnable`\n\nType: `boolean`\nDefault: `false`\n\nEnables the plugin forcefully.\nUseful if you want to use the plugin in production, or if you are using Webpack's `none` mode without `NODE_ENV`, for example.\n\n### `options.overlay`\n\nType: `boolean | ErrorOverlayOptions`\nDefault: `undefined`\n\nModifies how the error overlay integration works in the plugin.\n\n- If `options.overlay` is not provided or is `true`, the plugin will use the bundled error overlay interation.\n- If `options.overlay` is `false`, it will disable the error overlay integration.\n- If an `ErrorOverlayOptions` object is provided:\n (**NOTE**: This is an advanced option that exists mostly for tools like `create-react-app` or `Next.js`)\n\n - An optional `module` property could be defined.\n If it is not defined, the bundled error overlay will be used.\n If defined, it should reference a JS file that exports at least two functions with footprints as follows:\n\n ```ts\n function handleRuntimeError(error: Error) {}\n function clearRuntimeErrors() {}\n ```\n\n - An optional `entry` property could be defined, which should also reference a JS file that contains code needed to set up your custom error overlay integration.\n If it is not defined, the bundled error overlay entry will be used.\n It expects the `module` file to export two more functions:\n\n ```ts\n function showCompileError(webpackErrorMessage: string) {}\n function clearCompileErrors() {}\n ```\n\n Note that `webpackErrorMessage` is ANSI encoded, so you will need logic to parse it.\n\n - An example configuration:\n ```js\n const options = {\n overlay: {\n entry: 'some-webpack-entry-file',\n module: 'some-error-overlay-module',\n },\n };\n ```\n\n#### `options.overlay.sockHost`\n\nType: `string`\nDefault: `window.location.hostname`\n\nSet this if you are running webpack on a host other than `window.location.hostname`.\nThis will be used by the error overlay module, and is available for `webpack-dev-server` only.\n\n#### `options.overlay.sockIntegration`\n\nType: `wds`, `whm`, `wps` or `string`\nDefault: `wds`\n\nThis controls how the error overlay connects to the sockets provided by several Webpack hot reload integrations.\n\n- If you use `webpack-dev-server`, you don't need to set this as it defaults to `wds`.\n- If you use `webpack-hot-middleware`, you should set this to `whm`.\n- If you use `webpack-plugin-serve`, you should set this to `wps`.\n- If you use anything else, or if you want to customize the socket handling yourself, you will have to provide a path to a module that will accept a message handler function and initializes the socket connection.\n See the [`runtime/sockets`](https://github.com/pmmmwh/react-refresh-webpack-plugin/tree/master/src/runtime/sockets) folder for sample implementations.\n\n#### `options.overlay.sockPort`\n\nType: `number`\nDefault: `window.location.port`\n\nSet this if you are running webpack on a port other than `window.location.port`.\nThis will be used by the error overlay module, and is available for `webpack-dev-server` only.\n\n#### `options.overlay.sockPath`\n\nType: `string`\nDefault: `/sockjs-node`\n\nSet this if you are running webpack on a custom path.\nThis will be used by the error overlay module, and is available for `webpack-dev-server` only.\n\n### `options.useLegacyWDSSockets`\n\nType: `boolean`\nDefault: `false`\n\nSet this to true if you are using a `webpack-dev-server` version prior to 3.8 as it requires a custom SockJS implementation.\nIf you use this feature, you will also need to install `sockjs-client` as a peer dependency.\n\n## Related Work\n\n- [Initial Implementation by @maisano](https://gist.github.com/maisano/441a4bc6b2954205803d68deac04a716)\n", "readmeFilename": "README.md", "gitHead": "a61176a057797090a01ed6b590084e369ae98528", "_id": "@pmmmwh/react-refresh-webpack-plugin@0.4.0-beta.3", "_nodeVersion": "14.2.0", "_npmVersion": "6.14.4", "dist": { "integrity": "sha512-G4WG/fEOV/avjonQLMVLQtimNS+PVEt68c9k7Zq0+rMFLUqB6mx1TwqMY7ZNVpOj01Hpa5qYaKt4FfdWPmNalg==", "shasum": "dccbc4c4c71f176c5ee15f391309a8949234a8ee", "tarball": "https://registry.npmjs.org/@pmmmwh/react-refresh-webpack-plugin/-/react-refresh-webpack-plugin-0.4.0-beta.3.tgz", "fileCount": 38, "unpackedSize": 86579, "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe3dxaCRA9TVsSAnZWagAAWKQP/RcmEy8HezGozLOJmYzG\n3tptUEbzwP6+kRQ9YJJeKI2DlUtvNcEaUG62gtiQkK1HYYunDhRCc6T6EYGS\npiHE8tChs2Ao8M9LZB72cwV7seO4kv9R8823nWzofp0odZQpmm9DHHFQRqkU\n1vulaOFTs8I2Ee4zva6PnvU6S2GIAkEEZsY9txvuP66YviFcyxuPM4CAY8fN\nwcuRVneyQJSDKTNew7eeoWrecAbupjaQUp/H6hewFZcG3WWPM7xwSqlsrnCm\nEl/gW6ceusBk9BzP9T8dIeuNFEW1orOxOSefscRgGgmPsVBVKHbwiOReWWnc\nXLk6VMXlEqR7X+4g6JSJd5/9drSvLVbHzhTiWYE+DCaPaFGo8JuJnjBblswR\nYgE2IxoLqrFr+tam8SLoJ3cPx+poRZ6m1rNxcZP0ZgPW4JJbjg4B039jlxU4\nObVBUInTvAHS0IOWEivXqtibrrFDBcSO6fGvUGxn8AVZDAVRRZ/FJZjMAl/H\ndL8+DjiFE1vszAMTvMiOoyjce3eXtHBxRNwOuNlP3H7rHxlOgJ3ZtnKo7XRU\nOUyr2ZjjkiSjhL+i4ynHPoauIfDMepCGQClq0V2kSm66/pxdAvyKhd+4kMVf\nsBg14CG5QxjmMmu+He6W3HUJeQdAKf6nU3mvLRQZ9a70mXglDREQ1ZRCh4ov\nWPuZ\r\n=SsVJ\r\n-----END PGP SIGNATURE-----\r\n" }, "maintainers": [ { "name": "pmmmwh", "email": "pmmmwh@gmail.com" } ], "_npmUser": { "name": "pmmmwh", "email": "pmmmwh@gmail.com" }, "directories": {}, "_npmOperationalInternal": { "host": "s3://npm-registry-packages", "tmp": "tmp/react-refresh-webpack-plugin_0.4.0-beta.3_1591598169773_0.12083891280419934" }, "_hasShrinkwrap": false }, "0.4.0-beta.4": { "name": "@pmmmwh/react-refresh-webpack-plugin", "version": "0.4.0-beta.4", "description": "An **EXPERIMENTAL** Webpack plugin to enable \"Fast Refresh\" (also previously known as _Hot Reloading_) for React components.", "keywords": [ "react", "javascript", "webpack", "refresh", "hmr", "hotreload", "livereload", "live", "edit", "hot", "reload" ], "homepage": "https://github.com/pmmmwh/react-refresh-webpack-plugin#readme", "bugs": { "url": "https://github.com/pmmmwh/react-refresh-webpack-plugin/issues" }, "repository": { "type": "git", "url": "git+https://github.com/pmmmwh/react-refresh-webpack-plugin.git" }, "license": "MIT", "author": { "name": "Michael Mok" }, "main": "src/index.js", "types": "types/index.d.ts", "scripts": { "pretest": "yarn link && yarn link \"@pmmmwh/react-refresh-webpack-plugin\"", "posttest": "yarn unlink \"@pmmmwh/react-refresh-webpack-plugin\"", "test": "node scripts/test.js", "lint": "eslint --report-unused-disable-directives --ext .js .", "lint:fix": "yarn lint --fix", "format": "prettier --write \"**/*.{js,jsx,ts,tsx,json,md}\"", "format:check": "prettier --check \"**/*.{js,jsx,ts,tsx,json,md}\"", "generate-types": "tsc -p tsconfig.json && rimraf \"types/{helpers,runtime}\" && yarn format", "prepublishOnly": "rimraf types && yarn generate-types" }, "dependencies": { "ansi-html": "^0.0.7", "error-stack-parser": "^2.0.6", "html-entities": "^1.2.1", "lodash.debounce": "^4.0.8", "native-url": "^0.2.6", "schema-utils": "^2.6.5", "source-map": "^0.7.3" }, "devDependencies": { "@babel/core": "^7.9.6", "@types/json-schema": "^7.0.4", "@types/node": "^14.0.1", "@types/puppeteer": "^2.1.0", "@types/webpack": "^4.41.12", "babel-loader": "^8.1.0", "cross-spawn": "^7.0.2", "eslint": "^7.0.0", "eslint-config-prettier": "^6.11.0", "eslint-plugin-prettier": "^3.1.3", "fs-extra": "^9.0.0", "get-port": "^5.1.1", "jest": "^26.0.1", "jest-circus": "^26.0.1", "jest-environment-node": "^26.0.1", "jest-watch-typeahead": "^0.6.0", "nanoid": "^3.1.7", "postinstall-postinstall": "^2.1.0", "prettier": "^2.0.5", "puppeteer": "^3.0.4", "react-refresh": "^0.8.2", "rimraf": "^3.0.2", "type-fest": "^0.13.1", "typescript": "^3.8.3", "webpack": "^4.43.0", "webpack-cli": "^3.3.11", "webpack-dev-server": "^3.11.0", "webpack-hot-middleware": "^2.25.0", "webpack-plugin-serve": "^1.0.0", "yn": "^4.0.0" }, "peerDependencies": { "@types/webpack": "^4.41.12", "react-refresh": "^0.8.2", "sockjs-client": "^1.4.0", "type-fest": "^0.13.1", "webpack": ">=4.43.0", "webpack-dev-server": "3.x", "webpack-hot-middleware": "2.x", "webpack-plugin-serve": "0.x || 1.x" }, "peerDependenciesMeta": { "@types/webpack": { "optional": true }, "sockjs-client": { "optional": true }, "type-fest": { "optional": true }, "webpack-dev-server": { "optional": true }, "webpack-hot-middleware": { "optional": true }, "webpack-plugin-serve": { "optional": true } }, "engines": { "node": ">= 10.x" }, "readme": "# React Refresh Webpack Plugin\n\n[![Latest Version](https://img.shields.io/npm/v/@pmmmwh/react-refresh-webpack-plugin/latest)](https://www.npmjs.com/package/@pmmmwh/react-refresh-webpack-plugin/v/latest)\n[![Next Version](https://img.shields.io/npm/v/@pmmmwh/react-refresh-webpack-plugin/next)](https://www.npmjs.com/package/@pmmmwh/react-refresh-webpack-plugin/v/next)\n[![License](https://img.shields.io/github/license/pmmmwh/react-refresh-webpack-plugin)](./LICENSE)\n\nAn **EXPERIMENTAL** Webpack plugin to enable \"Fast Refresh\" (also previously known as _Hot Reloading_) for React components.\n\n## Installation\n\nFirst - this plugin is not 100% stable.\nIt works pretty reliably, and we have been testing it for some time, but there are still edge cases yet to be discovered.\nPlease **DO NOT** use it if you cannot afford to face breaking changes in the future.\n\n```sh\n# if you prefer npm\nnpm install -D @pmmmwh/react-refresh-webpack-plugin react-refresh\n\n# if you prefer yarn\nyarn add -D @pmmmwh/react-refresh-webpack-plugin react-refresh\n```\n\n## Usage\n\nFirst, apply the plugin in your Webpack configuration as follows:\n\n**webpack.config.js**\n\n```js\nconst ReactRefreshWebpackPlugin = require('@pmmmwh/react-refresh-webpack-plugin');\n// ... your other imports\n\n// You can tie this to whatever mechanisms you are using to detect a development environment.\n// For example, as shown here, is to tie that to `NODE_ENV` -\n// Then if you run `NODE_ENV=production webpack`, the constant will be set to false.\nconst isDevelopment = process.env.NODE_ENV !== 'production';\n\nmodule.exports = {\n // It is suggested to run the plugin in development mode only\n // If you are an advanced user and would like to setup Webpack yourselves,\n // you can also use the `none` mode,\n // but you will need to set `forceEnable: true` in the plugin options.\n mode: isDevelopment ? 'development' : 'production',\n // ... other configurations\n plugins: [\n // ... other plugins\n // You could also keep the plugin in your production config,\n // It will simply do nothing.\n isDevelopment && new ReactRefreshWebpackPlugin(),\n ].filter(Boolean),\n};\n```\n\nThen, update your Babel configuration.\nThis can either be done in your Webpack config (via options of `babel-loader`), or in the form of a `.babelrc`/`babel.config.js`.\n\n**webpack.config.js** (if you choose to inline the config)\n\n```js\nconst isDevelopment = process.env.NODE_ENV !== 'production';\n\nmodule.exports = {\n // DO NOT apply the plugin in production mode!\n mode: isDevelopment ? 'development' : 'production',\n module: {\n rules: [\n // ... other rules\n {\n // for TypeScript, change the following to \"\\.[jt]sx?\"\n test: /\\.jsx?$/,\n exclude: /node_modules/,\n use: [\n // ... other loaders\n {\n loader: require.resolve('babel-loader'),\n options: {\n // ... other options\n // DO NOT apply the Babel plugin in production mode!\n plugins: [isDevelopment && require.resolve('react-refresh/babel')].filter(Boolean),\n },\n },\n ],\n },\n ],\n },\n};\n```\n\n**.babelrc.js** (if you choose to extract the config)\n\n```js\nmodule.exports = (api) => {\n // This caches the Babel config by environment.\n api.cache.using(() => process.env.NODE_ENV);\n return {\n // ... other options\n plugins: [\n // ... other plugins\n // Applies the react-refresh Babel plugin on non-production modes only\n !api.env('production') && 'react-refresh/babel',\n ].filter(Boolean),\n };\n};\n```\n\nMore sample projects for common Webpack development setups are available in the [examples](https://github.com/pmmmwh/react-refresh-webpack-plugin/tree/master/examples) folder.\n\n> Note 1: If you use `webpack.config.ts`, please also install `type-fest` as a peer dependency.\n\n> Note 2: If you are using TypeScript (instead of Babel) as a transpiler, you will still need to use `babel-loader` to process your source code.\n> Check out this [sample project](https://github.com/pmmmwh/react-refresh-webpack-plugin/tree/master/examples/typescript-without-babel) on how to set this up.\n\n### Polyfill for Older Browsers\n\nIf you need to develop on IE11, you will need to polyfill the DOM URL API.\nThis can be done by adding the following before any of your code in the main entry (either one is fine):\n\n**Using `url-polyfill`**\n\n```js\nimport 'url-polyfill';\n```\n\n**Using `core-js`**\n\n```js\nimport 'core-js/features/url';\nimport 'core-js/features/url-search-params';\n```\n\n**Using `react-app-polyfill`**\n\n```js\nimport 'react-app-polyfill/ie11';\nimport 'react-app-polyfill/stable';\n```\n\n## Options\n\nThis plugin accepts a few options that are specifically targeted for advanced users.\n\n### `options.forceEnable`\n\nType: `boolean`\nDefault: `false`\n\nEnables the plugin forcefully.\nUseful if you want to use the plugin in production, or if you are using Webpack's `none` mode without `NODE_ENV`, for example.\n\n### `options.overlay`\n\nType: `boolean | ErrorOverlayOptions`\nDefault: `undefined`\n\nModifies how the error overlay integration works in the plugin.\n\n- If `options.overlay` is not provided or is `true`, the plugin will use the bundled error overlay interation.\n- If `options.overlay` is `false`, it will disable the error overlay integration.\n- If an `ErrorOverlayOptions` object is provided:\n (**NOTE**: This is an advanced option that exists mostly for tools like `create-react-app` or `Next.js`)\n\n - An optional `module` property could be defined.\n If it is not defined, the bundled error overlay will be used.\n If defined, it should reference a JS file that exports at least two functions with footprints as follows:\n\n ```ts\n function handleRuntimeError(error: Error) {}\n function clearRuntimeErrors() {}\n ```\n\n - An optional `entry` property could be defined, which should also reference a JS file that contains code needed to set up your custom error overlay integration.\n If it is not defined, the bundled error overlay entry will be used.\n It expects the `module` file to export two more functions:\n\n ```ts\n function showCompileError(webpackErrorMessage: string) {}\n function clearCompileErrors() {}\n ```\n\n Note that `webpackErrorMessage` is ANSI encoded, so you will need logic to parse it.\n\n - An example configuration:\n ```js\n const options = {\n overlay: {\n entry: 'some-webpack-entry-file',\n module: 'some-error-overlay-module',\n },\n };\n ```\n\n#### `options.overlay.sockHost`\n\nType: `string`\nDefault: `window.location.hostname`\n\nSet this if you are running webpack on a host other than `window.location.hostname`.\nThis will be used by the error overlay module, and is available for `webpack-dev-server` only.\n\n#### `options.overlay.sockIntegration`\n\nType: `wds`, `whm`, `wps` or `string`\nDefault: `wds`\n\nThis controls how the error overlay connects to the sockets provided by several Webpack hot reload integrations.\n\n- If you use `webpack-dev-server`, you don't need to set this as it defaults to `wds`.\n- If you use `webpack-hot-middleware`, you should set this to `whm`.\n- If you use `webpack-plugin-serve`, you should set this to `wps`.\n- If you use anything else, or if you want to customize the socket handling yourself, you will have to provide a path to a module that will accept a message handler function and initializes the socket connection.\n See the [`runtime/sockets`](https://github.com/pmmmwh/react-refresh-webpack-plugin/tree/master/src/runtime/sockets) folder for sample implementations.\n\n#### `options.overlay.sockPort`\n\nType: `number`\nDefault: `window.location.port`\n\nSet this if you are running webpack on a port other than `window.location.port`.\nThis will be used by the error overlay module, and is available for `webpack-dev-server` only.\n\n#### `options.overlay.sockPath`\n\nType: `string`\nDefault: `/sockjs-node`\n\nSet this if you are running webpack on a custom path.\nThis will be used by the error overlay module, and is available for `webpack-dev-server` only.\n\n### `options.useLegacyWDSSockets`\n\nType: `boolean`\nDefault: `false`\n\nSet this to true if you are using a `webpack-dev-server` version prior to 3.8 as it requires a custom SockJS implementation.\nIf you use this feature, you will also need to install `sockjs-client` as a peer dependency.\n\n## Related Work\n\n- [Initial Implementation by @maisano](https://gist.github.com/maisano/441a4bc6b2954205803d68deac04a716)\n", "readmeFilename": "README.md", "gitHead": "fee6c146460ce5dabd28621eefdf12afac2bc96d", "_id": "@pmmmwh/react-refresh-webpack-plugin@0.4.0-beta.4", "_nodeVersion": "14.4.0", "_npmVersion": "6.14.5", "dist": { "integrity": "sha512-3QfDv7NKYO8hfEg5ruMQfXs7+Ejp8iAjFobu1ta9P+ZsCLUc4Vq5/l/nxw3f+Ff6s36DXdW8C52aF9bSrj7fAw==", "shasum": "3f7585b3fb9deb11dae6300c30ada2ca55d89c80", "tarball": "https://registry.npmjs.org/@pmmmwh/react-refresh-webpack-plugin/-/react-refresh-webpack-plugin-0.4.0-beta.4.tgz", "fileCount": 38, "unpackedSize": 86580, "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe3eVJCRA9TVsSAnZWagAA3t4P/R55UwiUYWsvaiFk96iV\nePB74X5DzCFewWXUyYFHfsjsX/tFhz7OXcA5hv3sdrKd542fZ39kT0pjqYpd\nqiiR9D4UcCXC9r2rCnekgwAvqvc7wBHwbAmaSs2FxWKaheO/VIksvi/lMFsj\nX9GtrND/cI9jDFBI1dDnPyH1ATAAwbZ70COf8bThh1/sLNIYw+cV5UVBp1Qd\nePRptn++sEB4/aitDNVP8B84dNw/U9EXpedEES3oEprPekl3lPaJaVPPmk7C\nswUQeqnctdG7ECrJPC724xJnemdQM36/k5pIiDsWeHCAsSpurwAyUnyMDE9J\nwzp2H690ROunPKxIAPFeOe1ISKj8zRMLLvFGteV/0OqRm11vnNNaDi7VKHQv\n3GhZPwAJDUIa4BMhBFbV16VTza1q5Skqpkg+nVuYfjOpTCQd4unMZRqYNKEY\nJkt/REHwSFh4temIOWieNTHDP/4m9RhLQYNSqVEMq1lTQAuegUOh0o+LdWXr\nYCjADdjfnCwPyNdTI9RHxgJPNXGt0/I+Dyt67LiREUdKyM0UcKS/TEi5b1+T\nlObApAS31LVVa4vENq9BSM7dRHGJNafi8lwD7nSz7SiNF1wG7r+Rnh5E6ocJ\nEvbBAR/fkkS56Xt2I1vWTQfUqxRW6qMXBZV0+tsbeztdq4K6nBakOK8iZrl8\n3S7u\r\n=wY1v\r\n-----END PGP SIGNATURE-----\r\n" }, "maintainers": [ { "name": "pmmmwh", "email": "pmmmwh@gmail.com" } ], "_npmUser": { "name": "pmmmwh", "email": "pmmmwh@gmail.com" }, "directories": {}, "_npmOperationalInternal": { "host": "s3://npm-registry-packages", "tmp": "tmp/react-refresh-webpack-plugin_0.4.0-beta.4_1591600457043_0.7716734308798514" }, "_hasShrinkwrap": false }, "0.4.0-beta.5": { "name": "@pmmmwh/react-refresh-webpack-plugin", "version": "0.4.0-beta.5", "description": "An **EXPERIMENTAL** Webpack plugin to enable \"Fast Refresh\" (also previously known as _Hot Reloading_) for React components.", "keywords": [ "react", "javascript", "webpack", "refresh", "hmr", "hotreload", "livereload", "live", "edit", "hot", "reload" ], "homepage": "https://github.com/pmmmwh/react-refresh-webpack-plugin#readme", "bugs": { "url": "https://github.com/pmmmwh/react-refresh-webpack-plugin/issues" }, "repository": { "type": "git", "url": "git+https://github.com/pmmmwh/react-refresh-webpack-plugin.git" }, "license": "MIT", "author": { "name": "Michael Mok" }, "main": "src/index.js", "types": "types/index.d.ts", "scripts": { "pretest": "yarn link && yarn link \"@pmmmwh/react-refresh-webpack-plugin\"", "posttest": "yarn unlink \"@pmmmwh/react-refresh-webpack-plugin\"", "test": "node scripts/test.js", "lint": "eslint --report-unused-disable-directives --ext .js .", "lint:fix": "yarn lint --fix", "format": "prettier --write \"**/*.{js,jsx,ts,tsx,json,md}\"", "format:check": "prettier --check \"**/*.{js,jsx,ts,tsx,json,md}\"", "generate-types": "tsc -p tsconfig.json && rimraf \"types/{helpers,runtime}\" && yarn format", "prepublishOnly": "rimraf types && yarn generate-types" }, "dependencies": { "ansi-html": "^0.0.7", "error-stack-parser": "^2.0.6", "html-entities": "^1.2.1", "lodash.debounce": "^4.0.8", "native-url": "^0.2.6", "schema-utils": "^2.6.5", "source-map": "^0.7.3" }, "devDependencies": { "@babel/core": "^7.9.6", "@types/json-schema": "^7.0.4", "@types/node": "^14.0.1", "@types/puppeteer": "^2.1.0", "@types/webpack": "^4.41.12", "babel-loader": "^8.1.0", "cross-spawn": "^7.0.2", "eslint": "^7.0.0", "eslint-config-prettier": "^6.11.0", "eslint-plugin-prettier": "^3.1.3", "fs-extra": "^9.0.0", "get-port": "^5.1.1", "jest": "^26.0.1", "jest-circus": "^26.0.1", "jest-environment-node": "^26.0.1", "jest-watch-typeahead": "^0.6.0", "nanoid": "^3.1.7", "postinstall-postinstall": "^2.1.0", "prettier": "^2.0.5", "puppeteer": "^3.0.4", "react-refresh": "^0.8.2", "rimraf": "^3.0.2", "type-fest": "^0.13.1", "typescript": "^3.8.3", "webpack": "^4.43.0", "webpack-cli": "^3.3.11", "webpack-dev-server": "^3.11.0", "webpack-hot-middleware": "^2.25.0", "webpack-plugin-serve": "^1.0.0", "yn": "^4.0.0" }, "peerDependencies": { "@types/webpack": "^4.41.12", "react-refresh": "^0.8.2", "sockjs-client": "^1.4.0", "type-fest": "^0.13.1", "webpack": ">=4.43.0", "webpack-dev-server": "3.x", "webpack-hot-middleware": "2.x", "webpack-plugin-serve": "0.x || 1.x" }, "peerDependenciesMeta": { "@types/webpack": { "optional": true }, "sockjs-client": { "optional": true }, "type-fest": { "optional": true }, "webpack-dev-server": { "optional": true }, "webpack-hot-middleware": { "optional": true }, "webpack-plugin-serve": { "optional": true } }, "engines": { "node": ">= 10.x" }, "readme": "# React Refresh Webpack Plugin\n\n[![Latest Version](https://img.shields.io/npm/v/@pmmmwh/react-refresh-webpack-plugin/latest)](https://www.npmjs.com/package/@pmmmwh/react-refresh-webpack-plugin/v/latest)\n[![Next Version](https://img.shields.io/npm/v/@pmmmwh/react-refresh-webpack-plugin/next)](https://www.npmjs.com/package/@pmmmwh/react-refresh-webpack-plugin/v/next)\n[![License](https://img.shields.io/github/license/pmmmwh/react-refresh-webpack-plugin)](./LICENSE)\n\nAn **EXPERIMENTAL** Webpack plugin to enable \"Fast Refresh\" (also previously known as _Hot Reloading_) for React components.\n\n## Installation\n\nFirst - this plugin is not 100% stable.\nIt works pretty reliably, and we have been testing it for some time, but there are still edge cases yet to be discovered.\nPlease **DO NOT** use it if you cannot afford to face breaking changes in the future.\n\n```sh\n# if you prefer npm\nnpm install -D @pmmmwh/react-refresh-webpack-plugin react-refresh\n\n# if you prefer yarn\nyarn add -D @pmmmwh/react-refresh-webpack-plugin react-refresh\n```\n\n## Usage\n\nFirst, apply the plugin in your Webpack configuration as follows:\n\n**webpack.config.js**\n\n```js\nconst ReactRefreshWebpackPlugin = require('@pmmmwh/react-refresh-webpack-plugin');\n// ... your other imports\n\n// You can tie this to whatever mechanisms you are using to detect a development environment.\n// For example, as shown here, is to tie that to `NODE_ENV` -\n// Then if you run `NODE_ENV=production webpack`, the constant will be set to false.\nconst isDevelopment = process.env.NODE_ENV !== 'production';\n\nmodule.exports = {\n // It is suggested to run the plugin in development mode only\n // If you are an advanced user and would like to setup Webpack yourselves,\n // you can also use the `none` mode,\n // but you will need to set `forceEnable: true` in the plugin options.\n mode: isDevelopment ? 'development' : 'production',\n // ... other configurations\n plugins: [\n // ... other plugins\n // You could also keep the plugin in your production config,\n // It will simply do nothing.\n isDevelopment && new ReactRefreshWebpackPlugin(),\n ].filter(Boolean),\n};\n```\n\nThen, update your Babel configuration.\nThis can either be done in your Webpack config (via options of `babel-loader`), or in the form of a `.babelrc`/`babel.config.js`.\n\n**webpack.config.js** (if you choose to inline the config)\n\n```js\nconst isDevelopment = process.env.NODE_ENV !== 'production';\n\nmodule.exports = {\n // DO NOT apply the plugin in production mode!\n mode: isDevelopment ? 'development' : 'production',\n module: {\n rules: [\n // ... other rules\n {\n // for TypeScript, change the following to \"\\.[jt]sx?\"\n test: /\\.jsx?$/,\n exclude: /node_modules/,\n use: [\n // ... other loaders\n {\n loader: require.resolve('babel-loader'),\n options: {\n // ... other options\n // DO NOT apply the Babel plugin in production mode!\n plugins: [isDevelopment && require.resolve('react-refresh/babel')].filter(Boolean),\n },\n },\n ],\n },\n ],\n },\n};\n```\n\n**.babelrc.js** (if you choose to extract the config)\n\n```js\nmodule.exports = (api) => {\n // This caches the Babel config by environment.\n api.cache.using(() => process.env.NODE_ENV);\n return {\n // ... other options\n plugins: [\n // ... other plugins\n // Applies the react-refresh Babel plugin on non-production modes only\n !api.env('production') && 'react-refresh/babel',\n ].filter(Boolean),\n };\n};\n```\n\nMore sample projects for common Webpack development setups are available in the [examples](https://github.com/pmmmwh/react-refresh-webpack-plugin/tree/main/examples) folder.\n\n> Note 1: If you use `webpack.config.ts`, please also install `type-fest` as a peer dependency.\n\n> Note 2: If you are using TypeScript (instead of Babel) as a transpiler, you will still need to use `babel-loader` to process your source code.\n> Check out this [sample project](https://github.com/pmmmwh/react-refresh-webpack-plugin/tree/main/examples/typescript-without-babel) on how to set this up.\n\n### Caveats\n\n- Class components will be re-mounted on hot update.\n See [this comment](https://github.com/pmmmwh/react-refresh-webpack-plugin/issues/112#issuecomment-642491198) for more background on why this is the case.\n- Unnamed components will fallback to full refresh.\n See [this comment](https://github.com/pmmmwh/react-refresh-webpack-plugin/issues/82#issuecomment-624590282) for more info and why this is generally a bad idea.\n\n### Polyfill for Older Browsers\n\nIf you need to develop on IE11, you will need to polyfill the DOM URL API.\nThis can be done by adding the following before any of your code in the main entry (either one is fine):\n\n**Using `url-polyfill`**\n\n```js\nimport 'url-polyfill';\n```\n\n**Using `core-js`**\n\n```js\nimport 'core-js/features/url';\nimport 'core-js/features/url-search-params';\n```\n\n**Using `react-app-polyfill`**\n\n```js\nimport 'react-app-polyfill/ie11';\nimport 'react-app-polyfill/stable';\n```\n\n## Options\n\nThis plugin accepts a few options that are specifically targeted for advanced users.\n\n### `options.forceEnable`\n\nType: `boolean`\nDefault: `false`\n\nEnables the plugin forcefully.\nUseful if you want to use the plugin in production, or if you are using Webpack's `none` mode without `NODE_ENV`, for example.\n\n### `options.overlay`\n\nType: `boolean | ErrorOverlayOptions`\nDefault: `undefined`\n\nModifies how the error overlay integration works in the plugin.\n\n- If `options.overlay` is not provided or is `true`, the plugin will use the bundled error overlay interation.\n- If `options.overlay` is `false`, it will disable the error overlay integration.\n- If an `ErrorOverlayOptions` object is provided:\n (**NOTE**: This is an advanced option that exists mostly for tools like `create-react-app` or `Next.js`)\n\n - An optional `module` property could be defined.\n If it is not defined, the bundled error overlay will be used.\n If defined, it should reference a JS file that exports at least two functions with footprints as follows:\n\n ```ts\n function handleRuntimeError(error: Error) {}\n function clearRuntimeErrors() {}\n ```\n\n - An optional `entry` property could be defined, which should also reference a JS file that contains code needed to set up your custom error overlay integration.\n If it is not defined, the bundled error overlay entry will be used.\n It expects the `module` file to export two more functions:\n\n ```ts\n function showCompileError(webpackErrorMessage: string) {}\n function clearCompileErrors() {}\n ```\n\n Note that `webpackErrorMessage` is ANSI encoded, so you will need logic to parse it.\n\n - An example configuration:\n ```js\n const options = {\n overlay: {\n entry: 'some-webpack-entry-file',\n module: 'some-error-overlay-module',\n },\n };\n ```\n\n#### `options.overlay.sockHost`\n\nType: `string`\nDefault: `window.location.hostname`\n\nSet this if you are running webpack on a host other than `window.location.hostname`.\nThis will be used by the error overlay module, and is available for `webpack-dev-server` only.\n\n#### `options.overlay.sockIntegration`\n\nType: `wds`, `whm`, `wps` or `string`\nDefault: `wds`\n\nThis controls how the error overlay connects to the sockets provided by several Webpack hot reload integrations.\n\n- If you use `webpack-dev-server`, you don't need to set this as it defaults to `wds`.\n- If you use `webpack-hot-middleware`, you should set this to `whm`.\n- If you use `webpack-plugin-serve`, you should set this to `wps`.\n- If you use anything else, or if you want to customize the socket handling yourself, you will have to provide a path to a module that will accept a message handler function and initializes the socket connection.\n See the [`runtime/sockets`](https://github.com/pmmmwh/react-refresh-webpack-plugin/tree/main/src/runtime/sockets) folder for sample implementations.\n\n#### `options.overlay.sockPort`\n\nType: `number`\nDefault: `window.location.port`\n\nSet this if you are running webpack on a port other than `window.location.port`.\nThis will be used by the error overlay module, and is available for `webpack-dev-server` only.\n\n#### `options.overlay.sockPath`\n\nType: `string`\nDefault: `/sockjs-node`\n\nSet this if you are running webpack on a custom path.\nThis will be used by the error overlay module, and is available for `webpack-dev-server` only.\n\n### `options.useLegacyWDSSockets`\n\nType: `boolean`\nDefault: `false`\n\nSet this to true if you are using a `webpack-dev-server` version prior to 3.8 as it requires a custom SockJS implementation.\nIf you use this feature, you will also need to install `sockjs-client` as a peer dependency.\n\n## Related Work\n\n- [Initial Implementation by @maisano](https://gist.github.com/maisano/441a4bc6b2954205803d68deac04a716)\n", "readmeFilename": "README.md", "gitHead": "1a0fa520e69f073059751ee2d1fb7695535a6e15", "_id": "@pmmmwh/react-refresh-webpack-plugin@0.4.0-beta.5", "_nodeVersion": "14.4.0", "_npmVersion": "6.14.5", "dist": { "integrity": "sha512-5GFz6Rz688mkAs4/JtwQ4vUD+fNFSvDWg5oPaSTzZ4cxN5zbE6hME0Wi95g2mAC8OGaMjgaxdoWUKAE/XLiTTQ==", "shasum": "3c7c19f414b528d5664cac18324789ab3b66aed3", "tarball": "https://registry.npmjs.org/@pmmmwh/react-refresh-webpack-plugin/-/react-refresh-webpack-plugin-0.4.0-beta.5.tgz", "fileCount": 38, "unpackedSize": 87449, "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe57WyCRA9TVsSAnZWagAAj80P/RHhE9Rv05Jwx92aCnN4\nY+IKBYCLza96zmS9CODNYagqrwbrQ7yajLHDm+bXL7xU5dJRBeP6hEHr7roq\n4O/lTJpSt5NV8FX/XP3bkmO86kj4ZSQ2rNP1xHHlPWvmfo8/WfYOk8msfQJD\nM25mw26CZ8jSOsuIHfzbPhbPRMZFBdoQ0gUraiaiO4P9cvbz26SSWbkcdXtS\nU4tiQj5K7/Odwh65N+uM5KdU9YdtMY7J88iPlbkpuAXrSURNydFxyfUF00uB\nr2QgSKeR2zeTaMSyakyzwtAA8zWEjHQs7ekKmwyWC4YqlGkJm5AFbGl/Jqyr\nRq3ZncPL8bifR/3wxyalIWCPnURXcqZI+ZAhXRSH4fxKt5c2Nu9RM3r7UcXJ\nFTWFDWmICPUxtwiRZKltRhFG5P9cnu4G7mVER8okqLsh1MgX1/O2zYCVCqm8\nRJu8dWA4Matrqz/F4Fp8zzcujeWVclncHDUc+tDq9QEY7yzv/Z9rr0Xue5V+\n6Y2K2svIoGRTf+M2P1cVEqx71MhNVLSX2bMxk1mz0kLKy6xiW5v/mTI4odrI\n6757xunM6kGex9ZcWUC5DT+6QIr0evQUpwE3YSII+BDAgTb8tT5HiCkjjKtp\nhbPY3hqaiueMKKWKGZWSaj6Cyge2Oi6tIZaOOqhL1MNckhHstnj86374cZfa\n/R3K\r\n=jRug\r\n-----END PGP SIGNATURE-----\r\n" }, "maintainers": [ { "name": "pmmmwh", "email": "pmmmwh@gmail.com" } ], "_npmUser": { "name": "pmmmwh", "email": "pmmmwh@gmail.com" }, "directories": {}, "_npmOperationalInternal": { "host": "s3://npm-registry-packages", "tmp": "tmp/react-refresh-webpack-plugin_0.4.0-beta.5_1592243633927_0.8830103285264552" }, "_hasShrinkwrap": false }, "0.4.0-beta.6": { "name": "@pmmmwh/react-refresh-webpack-plugin", "version": "0.4.0-beta.6", "description": "An **EXPERIMENTAL** Webpack plugin to enable \"Fast Refresh\" (also previously known as _Hot Reloading_) for React components.", "keywords": [ "react", "javascript", "webpack", "refresh", "hmr", "hotreload", "livereload", "live", "edit", "hot", "reload" ], "homepage": "https://github.com/pmmmwh/react-refresh-webpack-plugin#readme", "bugs": { "url": "https://github.com/pmmmwh/react-refresh-webpack-plugin/issues" }, "repository": { "type": "git", "url": "git+https://github.com/pmmmwh/react-refresh-webpack-plugin.git" }, "license": "MIT", "author": { "name": "Michael Mok" }, "main": "lib/index.js", "types": "types/index.d.ts", "scripts": { "pretest": "yarn link && yarn link \"@pmmmwh/react-refresh-webpack-plugin\"", "posttest": "yarn unlink \"@pmmmwh/react-refresh-webpack-plugin\"", "test": "node scripts/test.js", "lint": "eslint --report-unused-disable-directives --ext .js .", "lint:fix": "yarn lint --fix", "format": "prettier --write \"**/*.{js,jsx,ts,tsx,json,md}\"", "format:check": "prettier --check \"**/*.{js,jsx,ts,tsx,json,md}\"", "generate-types": "tsc -p tsconfig.json && rimraf \"types/{globals.*,runtime,utils}\" && yarn format", "prepublishOnly": "rimraf types && yarn generate-types" }, "dependencies": { "ansi-html": "^0.0.7", "error-stack-parser": "^2.0.6", "html-entities": "^1.2.1", "lodash.debounce": "^4.0.8", "native-url": "^0.2.6", "schema-utils": "^2.6.5", "source-map": "^0.7.3" }, "devDependencies": { "@babel/core": "^7.10.3", "@types/json-schema": "^7.0.5", "@types/node": "^14.0.14", "@types/puppeteer": "^3.0.0", "@types/webpack": "^4.41.17", "@webpack-cli/serve": "^1.0.1-alpha.5", "babel-loader": "^8.1.0", "cross-spawn": "^7.0.3", "eslint": "^7.3.1", "eslint-config-prettier": "^6.11.0", "eslint-plugin-prettier": "^3.1.4", "fs-extra": "^9.0.1", "get-port": "^5.1.1", "jest": "^26.1.0", "jest-circus": "^26.1.0", "jest-environment-node": "^26.1.0", "jest-junit": "^11.0.1", "jest-watch-typeahead": "^0.6.0", "nanoid": "^3.1.10", "prettier": "^2.0.5", "puppeteer": "^3.3.0", "react-refresh": "^0.8.3", "rimraf": "^3.0.2", "type-fest": "^0.15.1", "typescript": "^3.9.5", "webpack": "^4.43.0", "webpack-cli": "^3.3.12", "webpack-dev-server": "^3.11.0", "webpack-hot-middleware": "^2.25.0", "webpack-plugin-serve": "^1.0.1", "yn": "^4.0.0" }, "peerDependencies": { "@types/webpack": "^4.41.17", "react-refresh": "^0.8.3", "sockjs-client": "^1.4.0", "type-fest": "^0.13.1", "webpack": ">=4.43.0 <6.0.0", "webpack-dev-server": "3.x", "webpack-hot-middleware": "2.x", "webpack-plugin-serve": "0.x || 1.x" }, "peerDependenciesMeta": { "@types/webpack": { "optional": true }, "sockjs-client": { "optional": true }, "type-fest": { "optional": true }, "webpack-dev-server": { "optional": true }, "webpack-hot-middleware": { "optional": true }, "webpack-plugin-serve": { "optional": true } }, "engines": { "node": ">= 10.x" }, "readme": "# React Refresh Webpack Plugin\n\n[![Latest Version](https://img.shields.io/npm/v/@pmmmwh/react-refresh-webpack-plugin/latest)](https://www.npmjs.com/package/@pmmmwh/react-refresh-webpack-plugin/v/latest)\n[![Next Version](https://img.shields.io/npm/v/@pmmmwh/react-refresh-webpack-plugin/next)](https://www.npmjs.com/package/@pmmmwh/react-refresh-webpack-plugin/v/next)\n[![License](https://img.shields.io/github/license/pmmmwh/react-refresh-webpack-plugin)](./LICENSE)\n\nAn **EXPERIMENTAL** Webpack plugin to enable \"Fast Refresh\" (also previously known as _Hot Reloading_) for React components.\n\n## Installation\n\nFirst - this plugin is not 100% stable.\nIt works pretty reliably, and we have been testing it for some time, but there are still edge cases yet to be discovered.\nPlease **DO NOT** use it if you cannot afford to face breaking changes in the future.\n\n```sh\n# if you prefer npm\nnpm install -D @pmmmwh/react-refresh-webpack-plugin react-refresh\n\n# if you prefer yarn\nyarn add -D @pmmmwh/react-refresh-webpack-plugin react-refresh\n```\n\n## Usage\n\nFirst, apply the plugin in your Webpack configuration as follows:\n\n**webpack.config.js**\n\n```js\nconst ReactRefreshWebpackPlugin = require('@pmmmwh/react-refresh-webpack-plugin');\n// ... your other imports\n\n// You can tie this to whatever mechanisms you are using to detect a development environment.\n// For example, as shown here, is to tie that to `NODE_ENV` -\n// Then if you run `NODE_ENV=production webpack`, the constant will be set to false.\nconst isDevelopment = process.env.NODE_ENV !== 'production';\n\nmodule.exports = {\n // It is suggested to run the plugin in development mode only\n // If you are an advanced user and would like to setup Webpack yourselves,\n // you can also use the `none` mode,\n // but you will need to set `forceEnable: true` in the plugin options.\n mode: isDevelopment ? 'development' : 'production',\n // ... other configurations\n plugins: [\n // ... other plugins\n // You could also keep the plugin in your production config,\n // It will simply do nothing.\n isDevelopment && new ReactRefreshWebpackPlugin(),\n ].filter(Boolean),\n};\n```\n\nThen, update your Babel configuration.\nThis can either be done in your Webpack config (via options of `babel-loader`), or in the form of a `.babelrc`/`babel.config.js`.\n\n**webpack.config.js** (if you choose to inline the config)\n\n```js\nconst isDevelopment = process.env.NODE_ENV !== 'production';\n\nmodule.exports = {\n // DO NOT apply the plugin in production mode!\n mode: isDevelopment ? 'development' : 'production',\n module: {\n rules: [\n // ... other rules\n {\n // for TypeScript, change the following to \"\\.[jt]sx?\"\n test: /\\.jsx?$/,\n exclude: /node_modules/,\n use: [\n // ... other loaders\n {\n loader: require.resolve('babel-loader'),\n options: {\n // ... other options\n // DO NOT apply the Babel plugin in production mode!\n plugins: [isDevelopment && require.resolve('react-refresh/babel')].filter(Boolean),\n },\n },\n ],\n },\n ],\n },\n};\n```\n\n**.babelrc.js** (if you choose to extract the config)\n\n```js\nmodule.exports = (api) => {\n // This caches the Babel config by environment.\n api.cache.using(() => process.env.NODE_ENV);\n return {\n // ... other options\n plugins: [\n // ... other plugins\n // Applies the react-refresh Babel plugin on non-production modes only\n !api.env('production') && 'react-refresh/babel',\n ].filter(Boolean),\n };\n};\n```\n\nMore sample projects for common Webpack development setups are available in the [examples](https://github.com/pmmmwh/react-refresh-webpack-plugin/tree/main/examples) directory.\n\n> Note 1: If you use `webpack.config.ts`, please also install `type-fest` as a peer dependency.\n\n> Note 2: If you are using TypeScript (instead of Babel) as a transpiler, you will still need to use `babel-loader` to process your source code.\n> Check out this [sample project](https://github.com/pmmmwh/react-refresh-webpack-plugin/tree/main/examples/typescript-without-babel) on how to set this up.\n\n### Caveats\n\n- Class components will be re-mounted on hot update.\n See [this comment](https://github.com/pmmmwh/react-refresh-webpack-plugin/issues/112#issuecomment-642491198) for more background on why this is the case.\n- Unnamed components will fallback to full refresh.\n See [this comment](https://github.com/pmmmwh/react-refresh-webpack-plugin/issues/82#issuecomment-624590282) for more info and why this is generally a bad idea.\n\n### Polyfill for Older Browsers\n\nIf you need to develop on IE11, you will need to polyfill the DOM URL API.\nThis can be done by adding the following before any of your code in the main entry (either one is fine):\n\n**Using `url-polyfill`**\n\n```js\nimport 'url-polyfill';\n```\n\n**Using `core-js`**\n\n```js\nimport 'core-js/features/url';\nimport 'core-js/features/url-search-params';\n```\n\n**Using `react-app-polyfill`**\n\n```js\nimport 'react-app-polyfill/ie11';\nimport 'react-app-polyfill/stable';\n```\n\n## Options\n\nThis plugin accepts a few options that are specifically targeted for advanced users.\n\n### `options.forceEnable`\n\nType: `boolean`\nDefault: `false`\n\nEnables the plugin forcefully.\nUseful if you want to use the plugin in production, or if you are using Webpack's `none` mode without `NODE_ENV`, for example.\n\n### `options.overlay`\n\nType: `boolean | ErrorOverlayOptions`\nDefault: `undefined`\n\nModifies how the error overlay integration works in the plugin.\n\n- If `options.overlay` is not provided or is `true`, the plugin will use the bundled error overlay interation.\n- If `options.overlay` is `false`, it will disable the error overlay integration.\n- If an `ErrorOverlayOptions` object is provided:\n (**NOTE**: This is an advanced option that exists mostly for tools like `create-react-app` or `Next.js`)\n\n - An optional `module` property could be defined.\n If it is not defined, the bundled error overlay will be used.\n If defined, it should reference a JS file that exports at least two functions with footprints as follows:\n\n ```ts\n function handleRuntimeError(error: Error) {}\n function clearRuntimeErrors() {}\n ```\n\n - An optional `entry` property could be defined, which should also reference a JS file that contains code needed to set up your custom error overlay integration.\n If it is not defined, the bundled error overlay entry will be used.\n It expects the `module` file to export two more functions:\n\n ```ts\n function showCompileError(webpackErrorMessage: string) {}\n function clearCompileErrors() {}\n ```\n\n Note that `webpackErrorMessage` is ANSI encoded, so you will need logic to parse it.\n\n - An example configuration:\n ```js\n const options = {\n overlay: {\n entry: 'some-webpack-entry-file',\n module: 'some-error-overlay-module',\n },\n };\n ```\n\n#### `options.overlay.sockHost`\n\nType: `string`\nDefault: `window.location.hostname`\n\nSet this if you are running webpack on a host other than `window.location.hostname`.\nThis will be used by the error overlay module, and is available for `webpack-dev-server` only.\n\n#### `options.overlay.sockIntegration`\n\nType: `wds`, `whm`, `wps` or `string`\nDefault: `wds`\n\nThis controls how the error overlay connects to the sockets provided by several Webpack hot reload integrations.\n\n- If you use `webpack-dev-server`, you don't need to set this as it defaults to `wds`.\n- If you use `webpack-hot-middleware`, you should set this to `whm`.\n- If you use `webpack-plugin-serve`, you should set this to `wps`.\n- If you use anything else, or if you want to customize the socket handling yourself, you will have to provide a path to a module that will accept a message handler function and initializes the socket connection.\n See the [`sockets`](https://github.com/pmmmwh/react-refresh-webpack-plugin/tree/main/sockets) directory for sample implementations.\n\n#### `options.overlay.sockPort`\n\nType: `number`\nDefault: `window.location.port`\n\nSet this if you are running webpack on a port other than `window.location.port`.\nThis will be used by the error overlay module, and is available for `webpack-dev-server` only.\n\n#### `options.overlay.sockPath`\n\nType: `string`\nDefault: `/sockjs-node`\n\nSet this if you are running webpack on a custom path.\nThis will be used by the error overlay module, and is available for `webpack-dev-server` only.\n\n### `options.useLegacyWDSSockets`\n\nType: `boolean`\nDefault: `false`\n\nSet this to true if you are using a `webpack-dev-server` version prior to 3.8 as it requires a custom SockJS implementation.\nIf you use this feature, you will also need to install `sockjs-client` as a peer dependency.\n\n## Related Work\n\n- [Initial Implementation by @maisano](https://gist.github.com/maisano/441a4bc6b2954205803d68deac04a716)\n", "readmeFilename": "README.md", "gitHead": "85cf54aac7d1a6c91ebbfe9b30aded012b000b54", "_id": "@pmmmwh/react-refresh-webpack-plugin@0.4.0-beta.6", "_nodeVersion": "14.4.0", "_npmVersion": "6.14.5", "dist": { "integrity": "sha512-mKEO3LrodXJ/D0vQT4QLv/bExV1ounCwDUDeZH9x5KHqQ4PvMkQ6oNBpTJi+LHFdXcB4Bql00a0Htb3tDpifPQ==", "shasum": "79e39fa91eccd1b63ddb1fb54b515e505fc36c2b", "tarball": "https://registry.npmjs.org/@pmmmwh/react-refresh-webpack-plugin/-/react-refresh-webpack-plugin-0.4.0-beta.6.tgz", "fileCount": 44, "unpackedSize": 95080, "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe8569CRA9TVsSAnZWagAAVSIP/27toaNnHs5U7XQT2CqU\nPRh4y+icXYLIHZkmn+5r69KquFyrkzurpSjPtqnDCVCctsMQ8efNXcVIveJW\n/Wszb2xjJY5bSivvXbAxphRSMSFFCU+S/05cPHL+C0E2PJF9L3GlztCVRdlN\n4ORm061ezgKq/g4k6B0vEgBlv4jriFvuXL1SWwodG3nTJ5Zj4Bv0S4O0mlzV\nXaxqP65rYVqzW5g8QYOY8LVIo5tHp+I3xX0ZqGaYYfOElENOkzqe3ai1WSSS\nIrgyDz9lwMZb+9QikLLGIcvO3PYFGnD4ogeQLiJ4sLk9M/NS2pp8Fzj0CGVQ\nmsXGJ2kEwpJcPybjNUwruU16DTII6p1zlFhGvPXPE1/XniAP4BeHQdB6sOuu\nZl/tAcESpzJd4uixmtKZoMpVJWBVyyhIzCgS//sUgAP7URwtOM+nCYWI+sQ5\nD3rLUpSXg/jZHwVgke/WrBggeunbT4H/ksr3IRBGi5vkzjX89F/426INQaln\nuwpIN7lSgl1i93mDqLaVnMZu63rMwmUGIg9ZE1haAC9BZVsrkCAPp6hkL8Xp\nIyngZhzVhIKpN1TJAxz9YJFb/u9dCi3kYaoCdKJJ/+OSiiEH4z1oisxzyYSL\nFWgSuPkY0x/TCle6lTHRLOyXtInLiAB9GnPjmLZURpLLxR/LLy2PHj35yt65\n/amj\r\n=2MIV\r\n-----END PGP SIGNATURE-----\r\n" }, "maintainers": [ { "name": "pmmmwh", "email": "pmmmwh@gmail.com" } ], "_npmUser": { "name": "pmmmwh", "email": "pmmmwh@gmail.com" }, "directories": {}, "_npmOperationalInternal": { "host": "s3://npm-registry-packages", "tmp": "tmp/react-refresh-webpack-plugin_0.4.0-beta.6_1593024188558_0.5042383587175208" }, "_hasShrinkwrap": false }, "0.4.0-beta.7": { "name": "@pmmmwh/react-refresh-webpack-plugin", "version": "0.4.0-beta.7", "description": "An **EXPERIMENTAL** Webpack plugin to enable \"Fast Refresh\" (also previously known as _Hot Reloading_) for React components.", "keywords": [ "react", "javascript", "webpack", "refresh", "hmr", "hotreload", "livereload", "live", "edit", "hot", "reload" ], "homepage": "https://github.com/pmmmwh/react-refresh-webpack-plugin#readme", "bugs": { "url": "https://github.com/pmmmwh/react-refresh-webpack-plugin/issues" }, "repository": { "type": "git", "url": "git+https://github.com/pmmmwh/react-refresh-webpack-plugin.git" }, "license": "MIT", "author": { "name": "Michael Mok" }, "main": "lib/index.js", "types": "types/index.d.ts", "scripts": { "pretest": "patch-package && yarn link && yarn link \"@pmmmwh/react-refresh-webpack-plugin\"", "posttest": "yarn unlink \"@pmmmwh/react-refresh-webpack-plugin\"", "test": "node scripts/test.js", "lint": "eslint --report-unused-disable-directives --ext .js .", "lint:fix": "yarn lint --fix", "format": "prettier --write \"**/*.{js,jsx,ts,tsx,json,md}\"", "format:check": "prettier --check \"**/*.{js,jsx,ts,tsx,json,md}\"", "generate-types": "tsc -p tsconfig.json && rimraf \"types/{globals.*,runtime,utils}\" && yarn format", "prepublishOnly": "rimraf types && yarn generate-types" }, "dependencies": { "ansi-html": "^0.0.7", "error-stack-parser": "^2.0.6", "html-entities": "^1.2.1", "lodash.debounce": "^4.0.8", "native-url": "^0.2.6", "schema-utils": "^2.6.5", "source-map": "^0.7.3" }, "devDependencies": { "@babel/core": "^7.10.3", "@types/json-schema": "^7.0.5", "@types/node": "^14.0.14", "@types/puppeteer": "^3.0.0", "@types/webpack": "^4.41.17", "@webpack-cli/serve": "^1.0.1-alpha.5", "babel-loader": "^8.1.0", "cross-spawn": "^7.0.3", "eslint": "^7.3.1", "eslint-config-prettier": "^6.11.0", "eslint-plugin-prettier": "^3.1.4", "fs-extra": "^9.0.1", "get-port": "^5.1.1", "jest": "^26.1.0", "jest-circus": "^26.1.0", "jest-environment-node": "^26.1.0", "jest-junit": "^11.0.1", "jest-watch-typeahead": "^0.6.0", "memfs": "^3.2.0", "nanoid": "^3.1.10", "patch-package": "^6.2.2", "prettier": "^2.0.5", "puppeteer": "^3.3.0", "react-refresh": "^0.8.3", "rimraf": "^3.0.2", "sourcemap-validator": "^2.1.0", "type-fest": "^0.15.1", "typescript": "^3.9.5", "webpack": "^4.43.0", "webpack-cli": "^3.3.12", "webpack-dev-server": "^3.11.0", "webpack-hot-middleware": "^2.25.0", "webpack-plugin-serve": "^1.0.1", "yn": "^4.0.0" }, "peerDependencies": { "@types/webpack": "^4.41.17", "react-refresh": "^0.8.3", "sockjs-client": "^1.4.0", "type-fest": "^0.13.1", "webpack": ">=4.43.0 <6.0.0", "webpack-dev-server": "3.x", "webpack-hot-middleware": "2.x", "webpack-plugin-serve": "0.x || 1.x" }, "peerDependenciesMeta": { "@types/webpack": { "optional": true }, "sockjs-client": { "optional": true }, "type-fest": { "optional": true }, "webpack-dev-server": { "optional": true }, "webpack-hot-middleware": { "optional": true }, "webpack-plugin-serve": { "optional": true } }, "engines": { "node": ">= 10.x" }, "readme": "# React Refresh Webpack Plugin\n\n[![Latest Version](https://img.shields.io/npm/v/@pmmmwh/react-refresh-webpack-plugin/latest)](https://www.npmjs.com/package/@pmmmwh/react-refresh-webpack-plugin/v/latest)\n[![Next Version](https://img.shields.io/npm/v/@pmmmwh/react-refresh-webpack-plugin/next)](https://www.npmjs.com/package/@pmmmwh/react-refresh-webpack-plugin/v/next)\n[![License](https://img.shields.io/github/license/pmmmwh/react-refresh-webpack-plugin)](./LICENSE)\n\nAn **EXPERIMENTAL** Webpack plugin to enable \"Fast Refresh\" (also previously known as _Hot Reloading_) for React components.\n\n## Installation\n\nFirst - this plugin is not 100% stable.\nIt works pretty reliably, and we have been testing it for some time, but there are still edge cases yet to be discovered.\nPlease **DO NOT** use it if you cannot afford to face breaking changes in the future.\n\n```sh\n# if you prefer npm\nnpm install -D @pmmmwh/react-refresh-webpack-plugin react-refresh\n\n# if you prefer yarn\nyarn add -D @pmmmwh/react-refresh-webpack-plugin react-refresh\n```\n\n## Usage\n\nFirst, apply the plugin in your Webpack configuration as follows:\n\n**webpack.config.js**\n\n```js\nconst ReactRefreshWebpackPlugin = require('@pmmmwh/react-refresh-webpack-plugin');\n// ... your other imports\n\n// You can tie this to whatever mechanisms you are using to detect a development environment.\n// For example, as shown here, is to tie that to `NODE_ENV` -\n// Then if you run `NODE_ENV=production webpack`, the constant will be set to false.\nconst isDevelopment = process.env.NODE_ENV !== 'production';\n\nmodule.exports = {\n // It is suggested to run the plugin in development mode only\n // If you are an advanced user and would like to setup Webpack yourselves,\n // you can also use the `none` mode,\n // but you will need to set `forceEnable: true` in the plugin options.\n mode: isDevelopment ? 'development' : 'production',\n // ... other configurations\n plugins: [\n // ... other plugins\n // You could also keep the plugin in your production config,\n // It will simply do nothing.\n isDevelopment && new ReactRefreshWebpackPlugin(),\n ].filter(Boolean),\n};\n```\n\nThen, update your Babel configuration.\nThis can either be done in your Webpack config (via options of `babel-loader`), or in the form of a `.babelrc`/`babel.config.js`.\n\n**webpack.config.js** (if you choose to inline the config)\n\n```js\nconst isDevelopment = process.env.NODE_ENV !== 'production';\n\nmodule.exports = {\n // DO NOT apply the plugin in production mode!\n mode: isDevelopment ? 'development' : 'production',\n module: {\n rules: [\n // ... other rules\n {\n // for TypeScript, change the following to \"\\.[jt]sx?\"\n test: /\\.jsx?$/,\n exclude: /node_modules/,\n use: [\n // ... other loaders\n {\n loader: require.resolve('babel-loader'),\n options: {\n // ... other options\n // DO NOT apply the Babel plugin in production mode!\n plugins: [isDevelopment && require.resolve('react-refresh/babel')].filter(Boolean),\n },\n },\n ],\n },\n ],\n },\n};\n```\n\n**.babelrc.js** (if you choose to extract the config)\n\n```js\nmodule.exports = (api) => {\n // This caches the Babel config by environment.\n api.cache.using(() => process.env.NODE_ENV);\n return {\n // ... other options\n plugins: [\n // ... other plugins\n // Applies the react-refresh Babel plugin on non-production modes only\n !api.env('production') && 'react-refresh/babel',\n ].filter(Boolean),\n };\n};\n```\n\nMore sample projects for common Webpack development setups are available in the [examples](https://github.com/pmmmwh/react-refresh-webpack-plugin/tree/main/examples) directory.\n\n> Note 1: If you use `webpack.config.ts`, please also install `type-fest` as a peer dependency.\n\n> Note 2: If you are using TypeScript (instead of Babel) as a transpiler, you will still need to use `babel-loader` to process your source code.\n> Check out this [sample project](https://github.com/pmmmwh/react-refresh-webpack-plugin/tree/main/examples/typescript-without-babel) on how to set this up.\n\n### Caveats\n\n- Class components will be re-mounted on hot update.\n See [this comment](https://github.com/pmmmwh/react-refresh-webpack-plugin/issues/112#issuecomment-642491198) for more background on why this is the case.\n- Unnamed components will fallback to full refresh.\n See [this comment](https://github.com/pmmmwh/react-refresh-webpack-plugin/issues/82#issuecomment-624590282) for more info and why this is generally a bad idea.\n\n### Polyfill for Older Browsers\n\nIf you need to develop on IE11, you will need to polyfill the DOM URL API.\nThis can be done by adding the following before any of your code in the main entry (either one is fine):\n\n**Using `url-polyfill`**\n\n```js\nimport 'url-polyfill';\n```\n\n**Using `core-js`**\n\n```js\nimport 'core-js/features/url';\nimport 'core-js/features/url-search-params';\n```\n\n**Using `react-app-polyfill`**\n\n```js\nimport 'react-app-polyfill/ie11';\nimport 'react-app-polyfill/stable';\n```\n\n## Options\n\nThis plugin accepts a few options that are specifically targeted for advanced users.\n\n### `options.forceEnable`\n\nType: `boolean`\nDefault: `false`\n\nEnables the plugin forcefully.\nUseful if you want to use the plugin in production, or if you are using Webpack's `none` mode without `NODE_ENV`, for example.\n\n### `options.overlay`\n\nType: `boolean | ErrorOverlayOptions`\nDefault: `undefined`\n\nModifies how the error overlay integration works in the plugin.\n\n- If `options.overlay` is not provided or is `true`, the plugin will use the bundled error overlay interation.\n- If `options.overlay` is `false`, it will disable the error overlay integration.\n- If an `ErrorOverlayOptions` object is provided:\n (**NOTE**: This is an advanced option that exists mostly for tools like `create-react-app` or `Next.js`)\n\n - An optional `module` property could be defined.\n If it is not defined, the bundled error overlay will be used.\n If defined, it should reference a JS file that exports at least two functions with footprints as follows:\n\n ```ts\n function handleRuntimeError(error: Error) {}\n function clearRuntimeErrors() {}\n ```\n\n - An optional `entry` property could be defined, which should also reference a JS file that contains code needed to set up your custom error overlay integration.\n If it is not defined, the bundled error overlay entry will be used.\n It expects the `module` file to export two more functions:\n\n ```ts\n function showCompileError(webpackErrorMessage: string) {}\n function clearCompileErrors() {}\n ```\n\n Note that `webpackErrorMessage` is ANSI encoded, so you will need logic to parse it.\n\n - An example configuration:\n ```js\n const options = {\n overlay: {\n entry: 'some-webpack-entry-file',\n module: 'some-error-overlay-module',\n },\n };\n ```\n\n#### `options.overlay.sockHost`\n\nType: `string`\nDefault: `window.location.hostname`\n\nSet this if you are running webpack on a host other than `window.location.hostname`.\nThis will be used by the error overlay module, and is available for `webpack-dev-server` only.\n\n#### `options.overlay.sockIntegration`\n\nType: `wds`, `whm`, `wps` or `string`\nDefault: `wds`\n\nThis controls how the error overlay connects to the sockets provided by several Webpack hot reload integrations.\n\n- If you use `webpack-dev-server`, you don't need to set this as it defaults to `wds`.\n- If you use `webpack-hot-middleware`, you should set this to `whm`.\n- If you use `webpack-plugin-serve`, you should set this to `wps`.\n- If you use anything else, or if you want to customize the socket handling yourself, you will have to provide a path to a module that will accept a message handler function and initializes the socket connection.\n See the [`sockets`](https://github.com/pmmmwh/react-refresh-webpack-plugin/tree/main/sockets) directory for sample implementations.\n\n#### `options.overlay.sockPort`\n\nType: `number`\nDefault: `window.location.port`\n\nSet this if you are running webpack on a port other than `window.location.port`.\nThis will be used by the error overlay module, and is available for `webpack-dev-server` only.\n\n#### `options.overlay.sockPath`\n\nType: `string`\nDefault: `/sockjs-node`\n\nSet this if you are running webpack on a custom path.\nThis will be used by the error overlay module, and is available for `webpack-dev-server` only.\n\n### `options.useLegacyWDSSockets`\n\nType: `boolean`\nDefault: `false`\n\nSet this to true if you are using a `webpack-dev-server` version prior to 3.8 as it requires a custom SockJS implementation.\nIf you use this feature, you will also need to install `sockjs-client` as a peer dependency.\n\n## Related Work\n\n- [Initial Implementation by @maisano](https://gist.github.com/maisano/441a4bc6b2954205803d68deac04a716)\n", "readmeFilename": "README.md", "gitHead": "4c863c36eceba704ecf1dd301a17d20de4edbffb", "_id": "@pmmmwh/react-refresh-webpack-plugin@0.4.0-beta.7", "_nodeVersion": "14.4.0", "_npmVersion": "6.14.5", "dist": { "integrity": "sha512-CE2kc00jQZiJwL/5q9wRynxyHzT2e8ZIwEqsuLvZ2qQ762YD7mEslr8Y0EOGHiTaNhhFOCcnGxH6kAYc9a3JnQ==", "shasum": "40cc2b2fc6890cf8993a1521f7973503502ccc77", "tarball": "https://registry.npmjs.org/@pmmmwh/react-refresh-webpack-plugin/-/react-refresh-webpack-plugin-0.4.0-beta.7.tgz", "fileCount": 46, "unpackedSize": 100211, "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfBYhKCRA9TVsSAnZWagAAYB8P/icN3r9HQY/6nS/yQPKE\nKQSNUx+fQnbuxXu3R/M54UV11inS2FL7vaAKi12HqbltId7/tcHeKBdAGwN5\nmkszDP58hXrhxLbzbwMfvcvy++moZThlSz0chP30wNQEjsalIATtdKb4zz/S\nG9rbPPherouEHWkfY50GhhnVigepoyE1C3Td4u2dIujoOPBo5wUaL+YjETeU\n3T+T8bDaNFWfP+e35nDz926rfMojOErOTh5YpOpfdb0rjLBtNah2GF3f01XE\n9NO4dvzuhVxzuvmw6+YpS/TO7Mh50VAU+OZG3SQOJibOCwd1YCBACm+5gwO4\nLT623FLF+liJZqsN5QCj7JKufNbThuHJMnpm4HOGtbkSR5Ug0vD0C5EoZyub\nGJcg7SVGZk8aX1NFgKGaPrfuZI1OoLC9fR+tHaXBCdXOacClYyPV+1YDfPve\nRGQy80aFqk6OdBJvVVLAljGoxVoXjgf+pv1bMeEGWZGivsKydSwNrkmuzCV7\n81fFwjDUzbqC5rExRCWUTnPgMtsmRy8qipwNTYtloNJiIq66XbqtxV0zjEGd\nQ7cIXI/Jt7vapnVCxgazWY3fDnceRRkKY8Ml1Ipdfi69bW4arYnnwo7kZ14a\nKvoZgzu3ZjrGIW1SXCt07r9hsNoPeZUOQZtC2ZinjzYf/3fvhYbA3b/9XG1G\nUhPu\r\n=5ft5\r\n-----END PGP SIGNATURE-----\r\n" }, "maintainers": [ { "name": "pmmmwh", "email": "pmmmwh@gmail.com" } ], "_npmUser": { "name": "pmmmwh", "email": "pmmmwh@gmail.com" }, "directories": {}, "_npmOperationalInternal": { "host": "s3://npm-registry-packages", "tmp": "tmp/react-refresh-webpack-plugin_0.4.0-beta.7_1594198090073_0.3954232710801435" }, "_hasShrinkwrap": false }, "0.4.0-beta.8": { "name": "@pmmmwh/react-refresh-webpack-plugin", "version": "0.4.0-beta.8", "description": "An **EXPERIMENTAL** Webpack plugin to enable \"Fast Refresh\" (also previously known as _Hot Reloading_) for React components.", "keywords": [ "react", "javascript", "webpack", "refresh", "hmr", "hotreload", "livereload", "live", "edit", "hot", "reload" ], "homepage": "https://github.com/pmmmwh/react-refresh-webpack-plugin#readme", "bugs": { "url": "https://github.com/pmmmwh/react-refresh-webpack-plugin/issues" }, "repository": { "type": "git", "url": "git+https://github.com/pmmmwh/react-refresh-webpack-plugin.git" }, "license": "MIT", "author": { "name": "Michael Mok" }, "main": "lib/index.js", "types": "types/index.d.ts", "scripts": { "pretest": "patch-package && yarn link && yarn link \"@pmmmwh/react-refresh-webpack-plugin\"", "posttest": "yarn unlink \"@pmmmwh/react-refresh-webpack-plugin\"", "test": "node scripts/test.js", "test:webpack-5": "WEBPACK_VERSION=5 yarn test", "lint": "eslint --report-unused-disable-directives --ext .js .", "lint:fix": "yarn lint --fix", "format": "prettier --write \"**/*.{js,jsx,ts,tsx,json,md}\"", "format:check": "prettier --check \"**/*.{js,jsx,ts,tsx,json,md}\"", "generate-types": "tsc -p tsconfig.json && rimraf \"types/{globals.*,runtime,utils}\" && yarn format", "prepublishOnly": "rimraf types && yarn generate-types" }, "dependencies": { "ansi-html": "^0.0.7", "error-stack-parser": "^2.0.6", "html-entities": "^1.2.1", "lodash.debounce": "^4.0.8", "native-url": "^0.2.6", "schema-utils": "^2.6.5", "source-map": "^0.7.3" }, "devDependencies": { "@babel/core": "^7.10.3", "@types/json-schema": "^7.0.5", "@types/node": "^14.0.14", "@types/puppeteer": "^3.0.0", "@types/webpack": "^4.41.17", "@webpack-cli/serve": "^1.0.1-alpha.5", "babel-loader": "^8.1.0", "cross-spawn": "^7.0.3", "eslint": "^7.3.1", "eslint-config-prettier": "^6.11.0", "eslint-plugin-prettier": "^3.1.4", "fs-extra": "^9.0.1", "get-port": "^5.1.1", "jest": "^26.1.0", "jest-circus": "^26.1.0", "jest-environment-node": "^26.1.0", "jest-junit": "^11.0.1", "jest-watch-typeahead": "^0.6.0", "memfs": "^3.2.0", "nanoid": "^3.1.10", "patch-package": "^6.2.2", "prettier": "^2.0.5", "puppeteer": "^3.3.0", "react-refresh": "^0.8.3", "rimraf": "^3.0.2", "sourcemap-validator": "^2.1.0", "type-fest": "^0.15.1", "typescript": "^3.9.5", "webpack": "^4.43.0", "webpack.next": "npm:webpack@^5.0.0-beta.21", "webpack-cli": "^3.3.12", "webpack-cli.beta": "npm:webpack-cli@^4.0.0-beta.8", "webpack-dev-server": "^3.11.0", "webpack-hot-middleware": "^2.25.0", "webpack-plugin-serve": "^1.0.1", "yn": "^4.0.0" }, "peerDependencies": { "@types/webpack": "^4.41.17", "react-refresh": "^0.8.3", "sockjs-client": "^1.4.0", "type-fest": "^0.13.1", "webpack": ">=4.43.0 <6.0.0", "webpack-dev-server": "3.x", "webpack-hot-middleware": "2.x", "webpack-plugin-serve": "0.x || 1.x" }, "peerDependenciesMeta": { "@types/webpack": { "optional": true }, "sockjs-client": { "optional": true }, "type-fest": { "optional": true }, "webpack-dev-server": { "optional": true }, "webpack-hot-middleware": { "optional": true }, "webpack-plugin-serve": { "optional": true } }, "engines": { "node": ">= 10.x" }, "readme": "# React Refresh Webpack Plugin\n\n[![Latest Version](https://img.shields.io/npm/v/@pmmmwh/react-refresh-webpack-plugin/latest)](https://www.npmjs.com/package/@pmmmwh/react-refresh-webpack-plugin/v/latest)\n[![Next Version](https://img.shields.io/npm/v/@pmmmwh/react-refresh-webpack-plugin/next)](https://www.npmjs.com/package/@pmmmwh/react-refresh-webpack-plugin/v/next)\n[![License](https://img.shields.io/github/license/pmmmwh/react-refresh-webpack-plugin)](./LICENSE)\n\nAn **EXPERIMENTAL** Webpack plugin to enable \"Fast Refresh\" (also previously known as _Hot Reloading_) for React components.\n\n## Installation\n\nFirst - this plugin is not 100% stable.\nIt works pretty reliably, and we have been testing it for some time, but there are still edge cases yet to be discovered.\nPlease **DO NOT** use it if you cannot afford to face breaking changes in the future.\n\n```sh\n# if you prefer npm\nnpm install -D @pmmmwh/react-refresh-webpack-plugin react-refresh\n\n# if you prefer yarn\nyarn add -D @pmmmwh/react-refresh-webpack-plugin react-refresh\n```\n\n## Usage\n\nFirst, apply the plugin in your Webpack configuration as follows:\n\n**webpack.config.js**\n\n```js\nconst ReactRefreshWebpackPlugin = require('@pmmmwh/react-refresh-webpack-plugin');\n// ... your other imports\n\n// You can tie this to whatever mechanisms you are using to detect a development environment.\n// For example, as shown here, is to tie that to `NODE_ENV` -\n// Then if you run `NODE_ENV=production webpack`, the constant will be set to false.\nconst isDevelopment = process.env.NODE_ENV !== 'production';\n\nmodule.exports = {\n // It is suggested to run the plugin in development mode only\n // If you are an advanced user and would like to setup Webpack yourselves,\n // you can also use the `none` mode,\n // but you will need to set `forceEnable: true` in the plugin options.\n mode: isDevelopment ? 'development' : 'production',\n // ... other configurations\n plugins: [\n // ... other plugins\n // You could also keep the plugin in your production config,\n // It will simply do nothing.\n isDevelopment && new ReactRefreshWebpackPlugin(),\n ].filter(Boolean),\n};\n```\n\nThen, update your Babel configuration.\nThis can either be done in your Webpack config (via options of `babel-loader`), or in the form of a `.babelrc`/`babel.config.js`.\n\n**webpack.config.js** (if you choose to inline the config)\n\n```js\nconst isDevelopment = process.env.NODE_ENV !== 'production';\n\nmodule.exports = {\n // DO NOT apply the plugin in production mode!\n mode: isDevelopment ? 'development' : 'production',\n module: {\n rules: [\n // ... other rules\n {\n // for TypeScript, change the following to \"\\.[jt]sx?\"\n test: /\\.jsx?$/,\n exclude: /node_modules/,\n use: [\n // ... other loaders\n {\n loader: require.resolve('babel-loader'),\n options: {\n // ... other options\n // DO NOT apply the Babel plugin in production mode!\n plugins: [isDevelopment && require.resolve('react-refresh/babel')].filter(Boolean),\n },\n },\n ],\n },\n ],\n },\n};\n```\n\n**.babelrc.js** (if you choose to extract the config)\n\n```js\nmodule.exports = (api) => {\n // This caches the Babel config by environment.\n api.cache.using(() => process.env.NODE_ENV);\n return {\n // ... other options\n plugins: [\n // ... other plugins\n // Applies the react-refresh Babel plugin on non-production modes only\n !api.env('production') && 'react-refresh/babel',\n ].filter(Boolean),\n };\n};\n```\n\nMore sample projects for common Webpack development setups are available in the [examples](https://github.com/pmmmwh/react-refresh-webpack-plugin/tree/main/examples) directory.\n\n> Note 1: If you use `webpack.config.ts`, please also install `type-fest` as a peer dependency.\n\n> Note 2: If you are using TypeScript (instead of Babel) as a transpiler, you will still need to use `babel-loader` to process your source code.\n> Check out this [sample project](https://github.com/pmmmwh/react-refresh-webpack-plugin/tree/main/examples/typescript-without-babel) on how to set this up.\n\n### Caveats\n\n- Class components will be re-mounted on hot update.\n See [this comment](https://github.com/pmmmwh/react-refresh-webpack-plugin/issues/112#issuecomment-642491198) for more background on why this is the case.\n- Unnamed components will fallback to full refresh.\n See [this comment](https://github.com/pmmmwh/react-refresh-webpack-plugin/issues/82#issuecomment-624590282) for more info and why this is generally a bad idea.\n\n### Polyfill for Older Browsers\n\nIf you need to develop on IE11, you will need to polyfill the DOM URL API.\nThis can be done by adding the following before any of your code in the main entry (either one is fine):\n\n**Using `url-polyfill`**\n\n```js\nimport 'url-polyfill';\n```\n\n**Using `core-js`**\n\n```js\nimport 'core-js/features/url';\nimport 'core-js/features/url-search-params';\n```\n\n**Using `react-app-polyfill`**\n\n```js\nimport 'react-app-polyfill/ie11';\nimport 'react-app-polyfill/stable';\n```\n\n## Options\n\nThis plugin accepts a few options that are specifically targeted for advanced users.\n\n### `options.forceEnable`\n\nType: `boolean`\nDefault: `false`\n\nEnables the plugin forcefully.\nUseful if you want to use the plugin in production, or if you are using Webpack's `none` mode without `NODE_ENV`, for example.\n\n### `options.overlay`\n\nType: `boolean | ErrorOverlayOptions`\nDefault: `undefined`\n\nModifies how the error overlay integration works in the plugin.\n\n- If `options.overlay` is not provided or is `true`, the plugin will use the bundled error overlay interation.\n- If `options.overlay` is `false`, it will disable the error overlay integration.\n- If an `ErrorOverlayOptions` object is provided:\n (**NOTE**: This is an advanced option that exists mostly for tools like `create-react-app` or `Next.js`)\n\n - An optional `module` property could be defined.\n If it is not defined, the bundled error overlay will be used.\n If defined, it should reference a JS file that exports at least two functions with footprints as follows:\n\n ```ts\n function handleRuntimeError(error: Error) {}\n function clearRuntimeErrors() {}\n ```\n\n - An optional `entry` property could be defined, which should also reference a JS file that contains code needed to set up your custom error overlay integration.\n If it is not defined, the bundled error overlay entry will be used.\n It expects the `module` file to export two more functions:\n\n ```ts\n function showCompileError(webpackErrorMessage: string) {}\n function clearCompileErrors() {}\n ```\n\n Note that `webpackErrorMessage` is ANSI encoded, so you will need logic to parse it.\n\n - An example configuration:\n ```js\n const options = {\n overlay: {\n entry: 'some-webpack-entry-file',\n module: 'some-error-overlay-module',\n },\n };\n ```\n\n#### `options.overlay.sockHost`\n\nType: `string`\nDefault: `window.location.hostname`\n\nSet this if you are running webpack on a host other than `window.location.hostname`.\nThis will be used by the error overlay module, and is available for `webpack-dev-server` only.\n\n#### `options.overlay.sockIntegration`\n\nType: `wds`, `whm`, `wps` or `string`\nDefault: `wds`\n\nThis controls how the error overlay connects to the sockets provided by several Webpack hot reload integrations.\n\n- If you use `webpack-dev-server`, you don't need to set this as it defaults to `wds`.\n- If you use `webpack-hot-middleware`, you should set this to `whm`.\n- If you use `webpack-plugin-serve`, you should set this to `wps`.\n- If you use anything else, or if you want to customize the socket handling yourself, you will have to provide a path to a module that will accept a message handler function and initializes the socket connection.\n See the [`sockets`](https://github.com/pmmmwh/react-refresh-webpack-plugin/tree/main/sockets) directory for sample implementations.\n\n#### `options.overlay.sockPort`\n\nType: `number`\nDefault: `window.location.port`\n\nSet this if you are running webpack on a port other than `window.location.port`.\nThis will be used by the error overlay module, and is available for `webpack-dev-server` only.\n\n#### `options.overlay.sockPath`\n\nType: `string`\nDefault: `/sockjs-node`\n\nSet this if you are running webpack on a custom path.\nThis will be used by the error overlay module, and is available for `webpack-dev-server` only.\n\n### `options.useLegacyWDSSockets`\n\nType: `boolean`\nDefault: `false`\n\nSet this to true if you are using a `webpack-dev-server` version prior to 3.8 as it requires a custom SockJS implementation.\nIf you use this feature, you will also need to install `sockjs-client` as a peer dependency.\n\n## Related Work\n\n- [Initial Implementation by @maisano](https://gist.github.com/maisano/441a4bc6b2954205803d68deac04a716)\n", "readmeFilename": "README.md", "gitHead": "adebc226687a465576cc01214f0842dc99353ce0", "_id": "@pmmmwh/react-refresh-webpack-plugin@0.4.0-beta.8", "_nodeVersion": "14.4.0", "_npmVersion": "6.14.5", "dist": { "integrity": "sha512-MMdSFLGhWvPwNsOkPWUEaZwSZEgH+Ingl5sOxm1iv9WOb6AbVepAvSH79xArZosB3Pv6NWHj9ufU4dpwgluK/A==", "shasum": "a6b22928534650bec612e13886bab3083026c6b5", "tarball": "https://registry.npmjs.org/@pmmmwh/react-refresh-webpack-plugin/-/react-refresh-webpack-plugin-0.4.0-beta.8.tgz", "fileCount": 46, "unpackedSize": 100417, "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfC36LCRA9TVsSAnZWagAAdBsP/2a8HPKc2AL+sTZXq0d2\nNWDJtkMtlCYUGFkq+Xf7VMnbIYyJx/ulmFEmwuvdGO5ShgqFagyX3n00eHHQ\nOs0CE6ugUW7hW2V5VcRmF/Mgdy3ZgN6XDX23IDgKlImknlNuZeM9Dng9NY6j\nkFyr/J2y0faNaeqVGK+TR68y7dIWXNDCooo06PvlDp7uRTwH5w2agHNwgvp9\nHb6PnbDI5SM4gcU4u9sdcXNzYCqAeq/8UVDD/gH7RRzNOdsDuBuVWPrM8r6q\nYjv3ZZw7QYDcp34rzkNqQoI5n0SxGo7kTmpG2vaXnwYTi8MznQGfktlH2z6j\nnbkWEvJ9TXDY7strwP3YzAV2S5cqLuBQ2iTvDih4w8Ggh511uHsb3OdHokcg\nsBGPjl3yZZClsmNOW+hWdskcgNFb2eFX8gGDilZSQAtuEFKrcLck1hnRt0w/\n7AC5AnzZTYSiXKVYkrWUzK37HYLzveL9rBLXl95yrIbqXMvi56vmqmG38mYz\nP5U3wLng5t5Dm6NQTXABTePu981WM3ORitaYJFS8aBUEspWWvNMESrdOQYJl\nXKEIySqOuzcpUhJqRmqTpzS4jh2f1x5/JAldXlFYv3znpBtfQsWKg/sjjXNQ\nYcgD8GEmyV/SpE0bGkBoKs4a/DHIa7npxSYpCC51OxpsxnfntKgQbsCh+f/0\niKfi\r\n=HlM2\r\n-----END PGP SIGNATURE-----\r\n" }, "maintainers": [ { "name": "pmmmwh", "email": "pmmmwh@gmail.com" } ], "_npmUser": { "name": "pmmmwh", "email": "pmmmwh@gmail.com" }, "directories": {}, "_npmOperationalInternal": { "host": "s3://npm-registry-packages", "tmp": "tmp/react-refresh-webpack-plugin_0.4.0-beta.8_1594588811022_0.026775257285752474" }, "_hasShrinkwrap": false }, "0.4.0-beta.9": { "name": "@pmmmwh/react-refresh-webpack-plugin", "version": "0.4.0-beta.9", "description": "An **EXPERIMENTAL** Webpack plugin to enable \"Fast Refresh\" (also previously known as _Hot Reloading_) for React components.", "keywords": [ "react", "javascript", "webpack", "refresh", "hmr", "hotreload", "livereload", "live", "edit", "hot", "reload" ], "homepage": "https://github.com/pmmmwh/react-refresh-webpack-plugin#readme", "bugs": { "url": "https://github.com/pmmmwh/react-refresh-webpack-plugin/issues" }, "repository": { "type": "git", "url": "git+https://github.com/pmmmwh/react-refresh-webpack-plugin.git" }, "license": "MIT", "author": { "name": "Michael Mok" }, "main": "lib/index.js", "types": "types/index.d.ts", "scripts": { "pretest": "patch-package && yarn link && yarn link \"@pmmmwh/react-refresh-webpack-plugin\"", "posttest": "yarn unlink \"@pmmmwh/react-refresh-webpack-plugin\"", "test": "node scripts/test.js", "test:webpack-5": "WEBPACK_VERSION=5 yarn test", "lint": "eslint --report-unused-disable-directives --ext .js .", "lint:fix": "yarn lint --fix", "format": "prettier --write \"**/*.{js,jsx,ts,tsx,json,md}\"", "format:check": "prettier --check \"**/*.{js,jsx,ts,tsx,json,md}\"", "generate-types": "tsc -p tsconfig.json && rimraf \"types/{globals.*,runtime,utils}\" && yarn format", "prepublishOnly": "rimraf types && yarn generate-types" }, "dependencies": { "ansi-html": "^0.0.7", "error-stack-parser": "^2.0.6", "html-entities": "^1.2.1", "lodash.debounce": "^4.0.8", "native-url": "^0.2.6", "schema-utils": "^2.6.5", "source-map": "^0.7.3" }, "devDependencies": { "@babel/core": "^7.10.5", "@types/json-schema": "^7.0.5", "@types/node": "^14.0.24", "@types/puppeteer": "^3.0.1", "@types/webpack": "^4.41.21", "@webpack-cli/serve": "^1.0.1-alpha.5", "babel-loader": "^8.1.0", "cross-spawn": "^7.0.3", "eslint": "^7.5.0", "eslint-config-prettier": "^6.11.0", "eslint-plugin-prettier": "^3.1.4", "fs-extra": "^9.0.1", "get-port": "^5.1.1", "jest": "^26.1.0", "jest-circus": "^26.1.0", "jest-environment-node": "^26.1.0", "jest-junit": "^11.0.1", "jest-watch-typeahead": "^0.6.0", "memfs": "^3.2.0", "nanoid": "^3.1.10", "patch-package": "^6.2.2", "prettier": "^2.0.5", "puppeteer": "^5.2.1", "react-refresh": "^0.8.3", "rimraf": "^3.0.2", "sourcemap-validator": "^2.1.0", "type-fest": "^0.16.0", "typescript": "3.9.7", "webpack": "^4.43.0", "webpack.next": "npm:webpack@^5.0.0-beta.22", "webpack-cli": "^3.3.12", "webpack-cli.beta": "npm:webpack-cli@^4.0.0-beta.8", "webpack-dev-server": "^3.11.0", "webpack-hot-middleware": "^2.25.0", "webpack-plugin-serve": "^1.0.1", "yn": "^4.0.0" }, "peerDependencies": { "@types/webpack": "4.x", "react-refresh": "^0.8.3", "sockjs-client": "^1.4.0", "type-fest": "^0.13.1", "webpack": ">=4.43.0 <6.0.0", "webpack-dev-server": "3.x", "webpack-hot-middleware": "2.x", "webpack-plugin-serve": "0.x || 1.x" }, "peerDependenciesMeta": { "@types/webpack": { "optional": true }, "sockjs-client": { "optional": true }, "type-fest": { "optional": true }, "webpack-dev-server": { "optional": true }, "webpack-hot-middleware": { "optional": true }, "webpack-plugin-serve": { "optional": true } }, "engines": { "node": ">= 10.x" }, "readme": "# React Refresh Webpack Plugin\n\n[![Latest Version](https://img.shields.io/npm/v/@pmmmwh/react-refresh-webpack-plugin/latest)](https://www.npmjs.com/package/@pmmmwh/react-refresh-webpack-plugin/v/latest)\n[![Next Version](https://img.shields.io/npm/v/@pmmmwh/react-refresh-webpack-plugin/next)](https://www.npmjs.com/package/@pmmmwh/react-refresh-webpack-plugin/v/next)\n[![License](https://img.shields.io/github/license/pmmmwh/react-refresh-webpack-plugin)](./LICENSE)\n\nAn **EXPERIMENTAL** Webpack plugin to enable \"Fast Refresh\" (also previously known as _Hot Reloading_) for React components.\n\n## Installation\n\nFirst - this plugin is not 100% stable.\nIt works pretty reliably, and we have been testing it for some time, but there are still edge cases yet to be discovered.\nPlease **DO NOT** use it if you cannot afford to face breaking changes in the future.\n\n```sh\n# if you prefer npm\nnpm install -D @pmmmwh/react-refresh-webpack-plugin react-refresh\n\n# if you prefer yarn\nyarn add -D @pmmmwh/react-refresh-webpack-plugin react-refresh\n```\n\n## Usage\n\nFirst, apply the plugin in your Webpack configuration as follows:\n\n**webpack.config.js**\n\n```js\nconst ReactRefreshWebpackPlugin = require('@pmmmwh/react-refresh-webpack-plugin');\n// ... your other imports\n\n// You can tie this to whatever mechanisms you are using to detect a development environment.\n// For example, as shown here, is to tie that to `NODE_ENV` -\n// Then if you run `NODE_ENV=production webpack`, the constant will be set to false.\nconst isDevelopment = process.env.NODE_ENV !== 'production';\n\nmodule.exports = {\n // It is suggested to run the plugin in development mode only\n // If you are an advanced user and would like to setup Webpack yourselves,\n // you can also use the `none` mode,\n // but you will need to set `forceEnable: true` in the plugin options.\n mode: isDevelopment ? 'development' : 'production',\n // ... other configurations\n plugins: [\n // ... other plugins\n // You could also keep the plugin in your production config,\n // It will simply do nothing.\n isDevelopment && new ReactRefreshWebpackPlugin(),\n ].filter(Boolean),\n};\n```\n\nThen, update your Babel configuration.\nThis can either be done in your Webpack config (via options of `babel-loader`), or in the form of a `.babelrc`/`babel.config.js`.\n\n**webpack.config.js** (if you choose to inline the config)\n\n```js\nconst isDevelopment = process.env.NODE_ENV !== 'production';\n\nmodule.exports = {\n // DO NOT apply the plugin in production mode!\n mode: isDevelopment ? 'development' : 'production',\n module: {\n rules: [\n // ... other rules\n {\n // for TypeScript, change the following to \"\\.[jt]sx?\"\n test: /\\.jsx?$/,\n exclude: /node_modules/,\n use: [\n // ... other loaders\n {\n loader: require.resolve('babel-loader'),\n options: {\n // ... other options\n // DO NOT apply the Babel plugin in production mode!\n plugins: [isDevelopment && require.resolve('react-refresh/babel')].filter(Boolean),\n },\n },\n ],\n },\n ],\n },\n};\n```\n\n**.babelrc.js** (if you choose to extract the config)\n\n```js\nmodule.exports = (api) => {\n // This caches the Babel config by environment.\n api.cache.using(() => process.env.NODE_ENV);\n return {\n // ... other options\n plugins: [\n // ... other plugins\n // Applies the react-refresh Babel plugin on non-production modes only\n !api.env('production') && 'react-refresh/babel',\n ].filter(Boolean),\n };\n};\n```\n\nMore sample projects for common Webpack development setups are available in the [examples](https://github.com/pmmmwh/react-refresh-webpack-plugin/tree/main/examples) directory.\n\n> Note 1: If you use `webpack.config.ts`, please also install `type-fest` as a peer dependency.\n\n> Note 2: If you are using TypeScript (instead of Babel) as a transpiler, you will still need to use `babel-loader` to process your source code.\n> Check out this [sample project](https://github.com/pmmmwh/react-refresh-webpack-plugin/tree/main/examples/typescript-without-babel) on how to set this up.\n\n### Caveats\n\n- Class components will be re-mounted on hot update.\n See [this comment](https://github.com/pmmmwh/react-refresh-webpack-plugin/issues/112#issuecomment-642491198) for more background on why this is the case.\n- Unnamed components will fallback to full refresh.\n See [this comment](https://github.com/pmmmwh/react-refresh-webpack-plugin/issues/82#issuecomment-624590282) for more info and why this is generally a bad idea.\n\n### Polyfill for Older Browsers\n\nIf you need to develop on IE11, you will need to polyfill the DOM URL API.\nThis can be done by adding the following before any of your code in the main entry (either one is fine):\n\n**Using `url-polyfill`**\n\n```js\nimport 'url-polyfill';\n```\n\n**Using `core-js`**\n\n```js\nimport 'core-js/features/url';\nimport 'core-js/features/url-search-params';\n```\n\n**Using `react-app-polyfill`**\n\n```js\nimport 'react-app-polyfill/ie11';\nimport 'react-app-polyfill/stable';\n```\n\n## Options\n\nThis plugin accepts a few options that are specifically targeted for advanced users.\n\n### `options.forceEnable`\n\nType: `boolean`\nDefault: `false`\n\nEnables the plugin forcefully.\nUseful if you want to use the plugin in production, or if you are using Webpack's `none` mode without `NODE_ENV`, for example.\n\n### `options.overlay`\n\nType: `boolean | ErrorOverlayOptions`\nDefault: `undefined`\n\nModifies how the error overlay integration works in the plugin.\n\n- If `options.overlay` is not provided or is `true`, the plugin will use the bundled error overlay interation.\n- If `options.overlay` is `false`, it will disable the error overlay integration.\n- If an `ErrorOverlayOptions` object is provided:\n (**NOTE**: This is an advanced option that exists mostly for tools like `create-react-app` or `Next.js`)\n\n - An optional `module` property could be defined.\n If it is not defined, the bundled error overlay will be used.\n If it is `false`, it will disable the error overlay integration.\n If defined, it should reference a JS file that exports at least two functions with footprints as follows:\n\n ```ts\n function handleRuntimeError(error: Error) {}\n function clearRuntimeErrors() {}\n ```\n\n - An optional `entry` property could be defined, which should also reference a JS file that contains code needed to set up your custom error overlay integration.\n If it is not defined, the bundled error overlay entry will be used.\n If it is `false`, no error overlay entry will be injected.\n It expects the `module` file to export two more functions:\n\n ```ts\n function showCompileError(webpackErrorMessage: string) {}\n function clearCompileErrors() {}\n ```\n\n Note that `webpackErrorMessage` is ANSI encoded, so you will need logic to parse it.\n\n - An example configuration:\n ```js\n const options = {\n overlay: {\n entry: 'some-webpack-entry-file',\n module: 'some-error-overlay-module',\n },\n };\n ```\n\n#### `options.overlay.sockHost`\n\nType: `string`\nDefault: `window.location.hostname`\n\nSet this if you are running webpack on a host other than `window.location.hostname`.\nThis will be used by the error overlay module, and is available for `webpack-dev-server` only.\n\n#### `options.overlay.sockIntegration`\n\nType: `wds`, `whm`, `wps`, `false` or `string`\nDefault: `wds`\n\nThis controls how the error overlay connects to the sockets provided by several Webpack hot reload integrations.\n\n- If you use `webpack-dev-server`, you don't need to set this as it defaults to `wds`.\n- If you use `webpack-hot-middleware`, you should set this to `whm`.\n- If you use `webpack-plugin-serve`, you should set this to `wps`.\n- If you use anything else, or if you want to customize the socket handling yourself, you will have to provide a path to a module that will accept a message handler function and initializes the socket connection.\n See the [`sockets`](https://github.com/pmmmwh/react-refresh-webpack-plugin/tree/main/sockets) directory for sample implementations.\n\n#### `options.overlay.sockPort`\n\nType: `number`\nDefault: `window.location.port`\n\nSet this if you are running webpack on a port other than `window.location.port`.\nThis will be used by the error overlay module, and is available for `webpack-dev-server` only.\n\n#### `options.overlay.sockPath`\n\nType: `string`\nDefault: `/sockjs-node`\n\nSet this if you are running webpack on a custom path.\nThis will be used by the error overlay module, and is available for `webpack-dev-server` only.\n\n#### `options.overlay.useLegacyWDSSockets`\n\nType: `boolean`\nDefault: `false`\n\nSet this to true if you are using a `webpack-dev-server` version prior to 3.8 as it requires a custom SockJS implementation.\nIf you use this feature, you will also need to install `sockjs-client` as a peer dependency.\n\n## Related Work\n\n- [Initial Implementation by @maisano](https://gist.github.com/maisano/441a4bc6b2954205803d68deac04a716)\n", "readmeFilename": "README.md", "gitHead": "6c6e8a4392115424316a8b861cff3dbe96d0e472", "_id": "@pmmmwh/react-refresh-webpack-plugin@0.4.0-beta.9", "_nodeVersion": "14.4.0", "_npmVersion": "6.14.5", "dist": { "integrity": "sha512-lh/kj+4/RjDraVZKFNwYekliYNyIPERVdm4FzC7KI3QkvgiVW3DoPDMCN20roZXxpjZktNVtgki6ErAlomj0ng==", "shasum": "282d9cabd51da26ccc73a7bed648c3d6558ddcef", "tarball": "https://registry.npmjs.org/@pmmmwh/react-refresh-webpack-plugin/-/react-refresh-webpack-plugin-0.4.0-beta.9.tgz", "fileCount": 46, "unpackedSize": 101160, "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfGeH5CRA9TVsSAnZWagAA3DsP/RudBhpoRKNKUk/pPFph\nWVgrmjgCHv0gl0RFi8bMSmbt1mzuv10t2BEVJBflqVdDXZTMhBvOoSjzVGHg\n9iv7gJt9WxhsdccWJ2fF+8eE68PYDxrr1s+0Yr/X77EVpjHBe2NpRE3JOPzS\nooU42mh2+B75OnDzYj2+lScdYU+naAGT2NliZKEqjygCyxAQFZm0CI9s58CW\nq83mXgIw0OMhCIweH1QlgBopowKB2yZuTNS+GUwxruS9QMPdm0/gVUBYJmdV\ngIY0B4SX8CsbD4v5TDHRD/KfI5e+Ic9dMdKJaWTjS+INpUoNkjzJAgg6tYfa\nyFukasRPoPOpCYaJP5inA59bYkaWrQbHk36iD91DE+L6ixq+qFIotJNm/RV6\nSd5CaJs5lz4TUWEFG0xsRNMDhrymU2DwkCTuQuyiFOJ65lN29BtoK5Up7wWE\nMxF+Oww1ujmMSfm0lqnyDZw9ROtVE6D5IF5oCtz3rzBBBEAIPcCvUFsuaACN\nRes/Q6aFvKrPWDOCMvdHAPw5Kdn5CtjJ5RaLn+UFPEESYcIwK8VDtCHqVHiz\nZsucL6c/Og1nzAJST4MyrqrWej5WBzQMioPUQmjG1Q8dVYhIZmp7wDpImhln\nv1HClZbc0WPBfrPdFc7vIwkhu6IW88MgRXT/tfAewAUFr11vHNGswyJ48XYg\nix/6\r\n=twee\r\n-----END PGP SIGNATURE-----\r\n" }, "maintainers": [ { "name": "pmmmwh", "email": "pmmmwh@gmail.com" } ], "_npmUser": { "name": "pmmmwh", "email": "pmmmwh@gmail.com" }, "directories": {}, "_npmOperationalInternal": { "host": "s3://npm-registry-packages", "tmp": "tmp/react-refresh-webpack-plugin_0.4.0-beta.9_1595531768769_0.9123706306169388" }, "_hasShrinkwrap": false }, "0.4.0-beta.10": { "name": "@pmmmwh/react-refresh-webpack-plugin", "version": "0.4.0-beta.10", "description": "An **EXPERIMENTAL** Webpack plugin to enable \"Fast Refresh\" (also previously known as _Hot Reloading_) for React components.", "keywords": [ "react", "javascript", "webpack", "refresh", "hmr", "hotreload", "livereload", "live", "edit", "hot", "reload" ], "homepage": "https://github.com/pmmmwh/react-refresh-webpack-plugin#readme", "bugs": { "url": "https://github.com/pmmmwh/react-refresh-webpack-plugin/issues" }, "repository": { "type": "git", "url": "git+https://github.com/pmmmwh/react-refresh-webpack-plugin.git" }, "license": "MIT", "author": { "name": "Michael Mok" }, "main": "lib/index.js", "types": "types/index.d.ts", "scripts": { "pretest": "patch-package && yarn link && yarn link \"@pmmmwh/react-refresh-webpack-plugin\"", "posttest": "yarn unlink \"@pmmmwh/react-refresh-webpack-plugin\"", "test": "node scripts/test.js", "test:webpack-5": "WEBPACK_VERSION=5 yarn test", "lint": "eslint --report-unused-disable-directives --ext .js .", "lint:fix": "yarn lint --fix", "format": "prettier --write \"**/*.{js,jsx,ts,tsx,json,md}\"", "format:check": "prettier --check \"**/*.{js,jsx,ts,tsx,json,md}\"", "generate-types": "tsc -p tsconfig.json && rimraf \"types/{globals.*,runtime,utils}\" && yarn format", "prepublishOnly": "rimraf types && yarn generate-types" }, "dependencies": { "ansi-html": "^0.0.7", "error-stack-parser": "^2.0.6", "html-entities": "^1.2.1", "native-url": "^0.2.6", "schema-utils": "^2.6.5", "source-map": "^0.7.3" }, "devDependencies": { "@babel/core": "^7.10.5", "@types/json-schema": "^7.0.5", "@types/node": "^14.0.24", "@types/puppeteer": "^3.0.1", "@types/webpack": "^4.41.21", "@webpack-cli/serve": "^1.0.1-alpha.5", "babel-loader": "^8.1.0", "cross-spawn": "^7.0.3", "eslint": "^7.5.0", "eslint-config-prettier": "^6.11.0", "eslint-plugin-prettier": "^3.1.4", "fs-extra": "^9.0.1", "get-port": "^5.1.1", "jest": "^26.1.0", "jest-circus": "^26.1.0", "jest-environment-node": "^26.1.0", "jest-junit": "^11.0.1", "jest-watch-typeahead": "^0.6.0", "memfs": "^3.2.0", "nanoid": "^3.1.10", "patch-package": "^6.2.2", "prettier": "^2.0.5", "puppeteer": "^5.2.1", "react-refresh": "^0.8.3", "rimraf": "^3.0.2", "sourcemap-validator": "^2.1.0", "type-fest": "^0.16.0", "typescript": "3.9.7", "webpack": "^4.43.0", "webpack-cli": "^3.3.12", "webpack-cli.beta": "npm:webpack-cli@^4.0.0-beta.8", "webpack-dev-server": "^3.11.0", "webpack-hot-middleware": "^2.25.0", "webpack-plugin-serve": "^1.0.1", "webpack.next": "npm:webpack@^5.0.0-beta.22", "yn": "^4.0.0" }, "peerDependencies": { "@types/webpack": "4.x", "react-refresh": "^0.8.3", "sockjs-client": "^1.4.0", "type-fest": "^0.13.1", "webpack": ">=4.43.0 <6.0.0", "webpack-dev-server": "3.x", "webpack-hot-middleware": "2.x", "webpack-plugin-serve": "0.x || 1.x" }, "peerDependenciesMeta": { "@types/webpack": { "optional": true }, "sockjs-client": { "optional": true }, "type-fest": { "optional": true }, "webpack-dev-server": { "optional": true }, "webpack-hot-middleware": { "optional": true }, "webpack-plugin-serve": { "optional": true } }, "engines": { "node": ">= 10.x" }, "readme": "# React Refresh Webpack Plugin\n\n[![Latest Version](https://img.shields.io/npm/v/@pmmmwh/react-refresh-webpack-plugin/latest)](https://www.npmjs.com/package/@pmmmwh/react-refresh-webpack-plugin/v/latest)\n[![Next Version](https://img.shields.io/npm/v/@pmmmwh/react-refresh-webpack-plugin/next)](https://www.npmjs.com/package/@pmmmwh/react-refresh-webpack-plugin/v/next)\n[![License](https://img.shields.io/github/license/pmmmwh/react-refresh-webpack-plugin)](./LICENSE)\n\nAn **EXPERIMENTAL** Webpack plugin to enable \"Fast Refresh\" (also previously known as _Hot Reloading_) for React components.\n\n## Installation\n\nFirst - this plugin is not 100% stable.\nIt works pretty reliably, and we have been testing it for some time, but there are still edge cases yet to be discovered.\nPlease **DO NOT** use it if you cannot afford to face breaking changes in the future.\n\n```sh\n# if you prefer npm\nnpm install -D @pmmmwh/react-refresh-webpack-plugin react-refresh\n\n# if you prefer yarn\nyarn add -D @pmmmwh/react-refresh-webpack-plugin react-refresh\n```\n\n## Usage\n\nFirst, apply the plugin in your Webpack configuration as follows:\n\n**webpack.config.js**\n\n```js\nconst ReactRefreshWebpackPlugin = require('@pmmmwh/react-refresh-webpack-plugin');\n// ... your other imports\n\n// You can tie this to whatever mechanisms you are using to detect a development environment.\n// For example, as shown here, is to tie that to `NODE_ENV` -\n// Then if you run `NODE_ENV=production webpack`, the constant will be set to false.\nconst isDevelopment = process.env.NODE_ENV !== 'production';\n\nmodule.exports = {\n // It is suggested to run the plugin in development mode only\n // If you are an advanced user and would like to setup Webpack yourselves,\n // you can also use the `none` mode,\n // but you will need to set `forceEnable: true` in the plugin options.\n mode: isDevelopment ? 'development' : 'production',\n // ... other configurations\n plugins: [\n // ... other plugins\n // You could also keep the plugin in your production config,\n // It will simply do nothing.\n isDevelopment && new ReactRefreshWebpackPlugin(),\n ].filter(Boolean),\n};\n```\n\nThen, update your Babel configuration.\nThis can either be done in your Webpack config (via options of `babel-loader`), or in the form of a `.babelrc`/`babel.config.js`.\n\n**webpack.config.js** (if you choose to inline the config)\n\n```js\nconst isDevelopment = process.env.NODE_ENV !== 'production';\n\nmodule.exports = {\n // DO NOT apply the plugin in production mode!\n mode: isDevelopment ? 'development' : 'production',\n module: {\n rules: [\n // ... other rules\n {\n // for TypeScript, change the following to \"\\.[jt]sx?\"\n test: /\\.jsx?$/,\n exclude: /node_modules/,\n use: [\n // ... other loaders\n {\n loader: require.resolve('babel-loader'),\n options: {\n // ... other options\n // DO NOT apply the Babel plugin in production mode!\n plugins: [isDevelopment && require.resolve('react-refresh/babel')].filter(Boolean),\n },\n },\n ],\n },\n ],\n },\n};\n```\n\n**.babelrc.js** (if you choose to extract the config)\n\n```js\nmodule.exports = (api) => {\n // This caches the Babel config by environment.\n api.cache.using(() => process.env.NODE_ENV);\n return {\n // ... other options\n plugins: [\n // ... other plugins\n // Applies the react-refresh Babel plugin on non-production modes only\n !api.env('production') && 'react-refresh/babel',\n ].filter(Boolean),\n };\n};\n```\n\nMore sample projects for common Webpack development setups are available in the [examples](https://github.com/pmmmwh/react-refresh-webpack-plugin/tree/main/examples) directory.\n\n> Note 1: If you use `webpack.config.ts`, please also install `type-fest` as a peer dependency.\n\n> Note 2: If you are using TypeScript (instead of Babel) as a transpiler, you will still need to use `babel-loader` to process your source code.\n> Check out this [sample project](https://github.com/pmmmwh/react-refresh-webpack-plugin/tree/main/examples/typescript-without-babel) on how to set this up.\n\n### Caveats\n\n- Class components will be re-mounted on hot update.\n See [this comment](https://github.com/pmmmwh/react-refresh-webpack-plugin/issues/112#issuecomment-642491198) for more background on why this is the case.\n- Unnamed components will fallback to full refresh.\n See [this comment](https://github.com/pmmmwh/react-refresh-webpack-plugin/issues/82#issuecomment-624590282) for more info and why this is generally a bad idea.\n\n### Polyfill for Older Browsers\n\nIf you need to develop on IE11, you will need to polyfill the DOM URL API.\nThis can be done by adding the following before any of your code in the main entry (either one is fine):\n\n**Using `url-polyfill`**\n\n```js\nimport 'url-polyfill';\n```\n\n**Using `core-js`**\n\n```js\nimport 'core-js/features/url';\nimport 'core-js/features/url-search-params';\n```\n\n**Using `react-app-polyfill`**\n\n```js\nimport 'react-app-polyfill/ie11';\nimport 'react-app-polyfill/stable';\n```\n\n## Options\n\nThis plugin accepts a few options that are specifically targeted for advanced users.\n\n### `options.forceEnable`\n\nType: `boolean`\nDefault: `false`\n\nEnables the plugin forcefully.\nUseful if you want to use the plugin in production, or if you are using Webpack's `none` mode without `NODE_ENV`, for example.\n\n### `options.overlay`\n\nType: `boolean | ErrorOverlayOptions`\nDefault: `undefined`\n\nModifies how the error overlay integration works in the plugin.\n\n- If `options.overlay` is not provided or is `true`, the plugin will use the bundled error overlay interation.\n- If `options.overlay` is `false`, it will disable the error overlay integration.\n- If an `ErrorOverlayOptions` object is provided:\n (**NOTE**: This is an advanced option that exists mostly for tools like `create-react-app` or `Next.js`)\n\n - An optional `module` property could be defined.\n If it is not defined, the bundled error overlay will be used.\n If it is `false`, it will disable the error overlay integration.\n If defined, it should reference a JS file that exports at least two functions with footprints as follows:\n\n ```ts\n function handleRuntimeError(error: Error) {}\n function clearRuntimeErrors() {}\n ```\n\n - An optional `entry` property could be defined, which should also reference a JS file that contains code needed to set up your custom error overlay integration.\n If it is not defined, the bundled error overlay entry will be used.\n If it is `false`, no error overlay entry will be injected.\n It expects the `module` file to export two more functions:\n\n ```ts\n function showCompileError(webpackErrorMessage: string) {}\n function clearCompileErrors() {}\n ```\n\n Note that `webpackErrorMessage` is ANSI encoded, so you will need logic to parse it.\n\n - An example configuration:\n ```js\n const options = {\n overlay: {\n entry: 'some-webpack-entry-file',\n module: 'some-error-overlay-module',\n },\n };\n ```\n\n#### `options.overlay.sockHost`\n\nType: `string`\nDefault: `window.location.hostname`\n\nSet this if you are running webpack on a host other than `window.location.hostname`.\nThis will be used by the error overlay module, and is available for `webpack-dev-server` only.\n\n#### `options.overlay.sockIntegration`\n\nType: `wds`, `whm`, `wps`, `false` or `string`\nDefault: `wds`\n\nThis controls how the error overlay connects to the sockets provided by several Webpack hot reload integrations.\n\n- If you use `webpack-dev-server`, you don't need to set this as it defaults to `wds`.\n- If you use `webpack-hot-middleware`, you should set this to `whm`.\n- If you use `webpack-plugin-serve`, you should set this to `wps`.\n- If you use anything else, or if you want to customize the socket handling yourself, you will have to provide a path to a module that will accept a message handler function and initializes the socket connection.\n See the [`sockets`](https://github.com/pmmmwh/react-refresh-webpack-plugin/tree/main/sockets) directory for sample implementations.\n\n#### `options.overlay.sockPort`\n\nType: `number`\nDefault: `window.location.port`\n\nSet this if you are running webpack on a port other than `window.location.port`.\nThis will be used by the error overlay module, and is available for `webpack-dev-server` only.\n\n#### `options.overlay.sockPath`\n\nType: `string`\nDefault: `/sockjs-node`\n\nSet this if you are running webpack on a custom path.\nThis will be used by the error overlay module, and is available for `webpack-dev-server` only.\n\n#### `options.overlay.useLegacyWDSSockets`\n\nType: `boolean`\nDefault: `false`\n\nSet this to true if you are using a `webpack-dev-server` version prior to 3.8 as it requires a custom SockJS implementation.\nIf you use this feature, you will also need to install `sockjs-client` as a peer dependency.\n\n## Related Work\n\n- [Initial Implementation by @maisano](https://gist.github.com/maisano/441a4bc6b2954205803d68deac04a716)\n", "readmeFilename": "README.md", "gitHead": "c794e10777c84567371619de2d83320ad90e4873", "_id": "@pmmmwh/react-refresh-webpack-plugin@0.4.0-beta.10", "_nodeVersion": "14.4.0", "_npmVersion": "6.14.7", "dist": { "integrity": "sha512-yhshasySVdNNPJOLUd0CR+4dCQCIpdGDRNDipJSmD/ioJcEUln5ghSfTTpe1+PvpOuQc5w3bOOObo1hcQaoCkg==", "shasum": "7e904329afa9867d2b19617d83ef20edef58a619", "tarball": "https://registry.npmjs.org/@pmmmwh/react-refresh-webpack-plugin/-/react-refresh-webpack-plugin-0.4.0-beta.10.tgz", "fileCount": 48, "unpackedSize": 103479, "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfHc05CRA9TVsSAnZWagAAEv8P/jPIG3Jo8EG+BGPxNgg1\noiyy7Xm+EzmTw6cMTAvy3fN6yzzBdcIwwnizp1qNffDdPPF8j4Z4VbvT4Fqf\nAsj0iJnk9bd9CtvIOk6Ag1+AZ0hsSSGrcC+R6XnGCyBabIEzz7pKsJ/sXLWu\neVdGaRNynhPq84q/51Fepej79esk9jbzniV7vMZz1uVtrQ/3vqZqZ+Mt+ywo\nSkLsYDcOmUryBN5igJnshPoQTsKi/h1pYGPQlnOxvCfbd6lri6L1pvsUSi/5\nCsrSaaBr0Xx58FLj9CvyZTO3zjZqfVZmquOToBQq2t0F3WSB+DYFOiAUNqyE\nFbtUZeCszWeoFli8FdClGxeTlctr6VDrgUhQEfWjkuHS6TYAdMJCFWT1aH7U\nD2KLxiJN/7Zc9ahjGV3Aoi5TUVa9K17MeUiCzadww4ch1M12FCSU+8Wg8hhZ\nuV11uzerV2me+x2JOFk3bEd+gMurQWeUg1J7hEW0I8Q4tEF21Pzldu+kJWpB\nonjWVCy8S1L7hZvE5FcAJ4TQWti/8BJRMYck7ufQ9Qfl9f7FGyDWPRZydzI6\nux1uTWAML64TtA+QyoTPQVmAvBjlZaIAXXsE7SOryjfx5cwbo06LOhULe67D\nIbhyvuhRL+U1vE54fjRN5Mw6vNiFJzoQyWhaOSUgzSpO0jqqRiYbzK/LgXe9\nxpak\r\n=k0GV\r\n-----END PGP SIGNATURE-----\r\n" }, "maintainers": [ { "name": "pmmmwh", "email": "pmmmwh@gmail.com" } ], "_npmUser": { "name": "pmmmwh", "email": "pmmmwh@gmail.com" }, "directories": {}, "_npmOperationalInternal": { "host": "s3://npm-registry-packages", "tmp": "tmp/react-refresh-webpack-plugin_0.4.0-beta.10_1595788601045_0.8973978746046509" }, "_hasShrinkwrap": false }, "0.4.0": { "name": "@pmmmwh/react-refresh-webpack-plugin", "version": "0.4.0", "description": "An **EXPERIMENTAL** Webpack plugin to enable \"Fast Refresh\" (also previously known as _Hot Reloading_) for React components.", "keywords": [ "react", "javascript", "webpack", "refresh", "hmr", "hotreload", "livereload", "live", "edit", "hot", "reload" ], "homepage": "https://github.com/pmmmwh/react-refresh-webpack-plugin#readme", "bugs": { "url": "https://github.com/pmmmwh/react-refresh-webpack-plugin/issues" }, "repository": { "type": "git", "url": "git+https://github.com/pmmmwh/react-refresh-webpack-plugin.git" }, "license": "MIT", "author": { "name": "Michael Mok" }, "main": "lib/index.js", "types": "types/index.d.ts", "scripts": { "pretest": "patch-package && yarn link && yarn link \"@pmmmwh/react-refresh-webpack-plugin\"", "posttest": "yarn unlink \"@pmmmwh/react-refresh-webpack-plugin\"", "test": "node scripts/test.js", "test:webpack-5": "WEBPACK_VERSION=5 yarn test", "lint": "eslint --report-unused-disable-directives --ext .js .", "lint:fix": "yarn lint --fix", "format": "prettier --write \"**/*.{js,jsx,ts,tsx,json,md}\"", "format:check": "prettier --check \"**/*.{js,jsx,ts,tsx,json,md}\"", "generate-types": "tsc -p tsconfig.json && rimraf \"types/{globals.*,runtime,utils}\" && yarn format", "prepublishOnly": "rimraf types && yarn generate-types" }, "dependencies": { "ansi-html": "^0.0.7", "error-stack-parser": "^2.0.6", "html-entities": "^1.2.1", "native-url": "^0.2.6", "schema-utils": "^2.6.5", "source-map": "^0.7.3" }, "devDependencies": { "@babel/core": "^7.10.5", "@types/json-schema": "^7.0.5", "@types/node": "^14.0.24", "@types/puppeteer": "^3.0.1", "@types/webpack": "^4.41.21", "@webpack-cli/serve": "^1.0.1-alpha.5", "babel-loader": "^8.1.0", "cross-spawn": "^7.0.3", "eslint": "^7.5.0", "eslint-config-prettier": "^6.11.0", "eslint-plugin-prettier": "^3.1.4", "fs-extra": "^9.0.1", "get-port": "^5.1.1", "jest": "^26.1.0", "jest-circus": "^26.1.0", "jest-environment-node": "^26.1.0", "jest-junit": "^11.0.1", "jest-watch-typeahead": "^0.6.0", "memfs": "^3.2.0", "nanoid": "^3.1.10", "patch-package": "^6.2.2", "prettier": "^2.0.5", "puppeteer": "^5.2.1", "react-refresh": "^0.8.3", "rimraf": "^3.0.2", "sourcemap-validator": "^2.1.0", "type-fest": "^0.16.0", "typescript": "3.9.7", "webpack": "^4.43.0", "webpack-cli": "^3.3.12", "webpack-cli.beta": "npm:webpack-cli@^4.0.0-beta.8", "webpack-dev-server": "^3.11.0", "webpack-hot-middleware": "^2.25.0", "webpack-plugin-serve": "^1.0.1", "webpack.next": "npm:webpack@^5.0.0-beta.22", "yn": "^4.0.0" }, "peerDependencies": { "@types/webpack": "4.x", "react-refresh": "^0.8.3", "sockjs-client": "^1.4.0", "type-fest": "^0.13.1", "webpack": ">=4.43.0 <6.0.0", "webpack-dev-server": "3.x", "webpack-hot-middleware": "2.x", "webpack-plugin-serve": "0.x || 1.x" }, "peerDependenciesMeta": { "@types/webpack": { "optional": true }, "sockjs-client": { "optional": true }, "type-fest": { "optional": true }, "webpack-dev-server": { "optional": true }, "webpack-hot-middleware": { "optional": true }, "webpack-plugin-serve": { "optional": true } }, "engines": { "node": ">= 10.x" }, "gitHead": "a3725370a8b590b7d5a00edc97dd376c90d33159", "_id": "@pmmmwh/react-refresh-webpack-plugin@0.4.0", "_nodeVersion": "14.4.0", "_npmVersion": "6.14.7", "dist": { "integrity": "sha512-G1xkdDehUdnIk2SBxb6SvEj0/m9gK14ng9O9fBxTKqzs+zTi9dcLwH92fc8AwcqyNXsjHzYC2xqmkjkpe/kOgw==", "shasum": "10ebc4cafec2721cbcfafb496aeb1e017f857468", "tarball": "https://registry.npmjs.org/@pmmmwh/react-refresh-webpack-plugin/-/react-refresh-webpack-plugin-0.4.0.tgz", "fileCount": 48, "unpackedSize": 105658, "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfHyI7CRA9TVsSAnZWagAAXoIP/2gdcCwdJloeaqUxHgbQ\n7O9hQtFKZUQ6uMjxJuqbQAxyQ3dQ+ZuL0q8AW/AmmsRc9e1t09kPm0saa7+g\nt0u2Z44CobuuSfRKHKFhfc1E8ubiajbFUPZkWajwPose6O1MMp7PszS5m6Tu\nqkT3ul8Qb7GPskIiTNpcYbFAZi4pOW3VSd2IgbW6TTCNvmscoNTUIl4Og895\ncNgj8WAI7EQgVcCwrpDpCBwrjvkGGggXQnszp/TUGNDS0Dg5k8vd0LvwFn15\nhMN1mJQc/ODjtEX6JHAWPaAl8DJbMvCYoTSoRgLShVZ4agUp0XZQPw4XxomK\nm5LeOBjpOc8mZh3Z5hjE8xDnPHI3DXQArHrYpaIFb5QNFKwBi67+lh1Ale0s\nflc5vsxPSe5GslH4TmilrX1KFIaGWD0BPsADwKp6hMQm8n2RrCyb5gDdoxSO\nXb4pnFwUOpEFqA8ZO3q0gxJUnyqoIbrmsEzwd1RHB7IqJwFdIoHUrekZKtJ/\nl+ks4C/9XgHOWgmAFhzXU94UhEWCIvlvMbDoOoMHwwrB3CHaMpDV45u2BMoW\nBkuAiZURzQB6zHdJwOxdLnCBwGIYN/oVI6IgUWRIpTXL5iJ8xVoQT6M7GKXJ\nqClaBPVvK90/UtdV7S/iw5J3TTSPq1Ptx5o2PmuL1cUWTQZ8K++w/iYmiWf0\nJfcS\r\n=Yv4O\r\n-----END PGP SIGNATURE-----\r\n" }, "maintainers": [ { "name": "pmmmwh", "email": "pmmmwh@gmail.com" } ], "_npmUser": { "name": "pmmmwh", "email": "pmmmwh@gmail.com" }, "directories": {}, "_npmOperationalInternal": { "host": "s3://npm-registry-packages", "tmp": "tmp/react-refresh-webpack-plugin_0.4.0_1595875898635_0.6439050191998683" }, "_hasShrinkwrap": false }, "0.4.1": { "name": "@pmmmwh/react-refresh-webpack-plugin", "version": "0.4.1", "description": "An **EXPERIMENTAL** Webpack plugin to enable \"Fast Refresh\" (also previously known as _Hot Reloading_) for React components.", "keywords": [ "react", "javascript", "webpack", "refresh", "hmr", "hotreload", "livereload", "live", "edit", "hot", "reload" ], "homepage": "https://github.com/pmmmwh/react-refresh-webpack-plugin#readme", "bugs": { "url": "https://github.com/pmmmwh/react-refresh-webpack-plugin/issues" }, "repository": { "type": "git", "url": "git+https://github.com/pmmmwh/react-refresh-webpack-plugin.git" }, "license": "MIT", "author": { "name": "Michael Mok" }, "main": "lib/index.js", "types": "types/index.d.ts", "scripts": { "pretest": "patch-package && yarn link && yarn link \"@pmmmwh/react-refresh-webpack-plugin\"", "posttest": "yarn unlink \"@pmmmwh/react-refresh-webpack-plugin\"", "test": "node scripts/test.js", "test:webpack-5": "WEBPACK_VERSION=5 yarn test", "lint": "eslint --report-unused-disable-directives --ext .js .", "lint:fix": "yarn lint --fix", "format": "prettier --write \"**/*.{js,jsx,ts,tsx,json,md}\"", "format:check": "prettier --check \"**/*.{js,jsx,ts,tsx,json,md}\"", "generate-types": "tsc -p tsconfig.json && rimraf \"types/{globals.*,runtime,utils}\" && yarn format", "prepublishOnly": "rimraf types && yarn generate-types" }, "dependencies": { "ansi-html": "^0.0.7", "error-stack-parser": "^2.0.6", "html-entities": "^1.2.1", "native-url": "^0.2.6", "schema-utils": "^2.6.5", "source-map": "^0.7.3" }, "devDependencies": { "@babel/core": "^7.10.5", "@types/json-schema": "^7.0.5", "@types/node": "^14.0.26", "@types/puppeteer": "^3.0.1", "@types/webpack": "^4.41.21", "@webpack-cli/serve": "^1.0.1-alpha.5", "babel-loader": "^8.1.0", "cross-spawn": "^7.0.3", "eslint": "^7.5.0", "eslint-config-prettier": "^6.11.0", "eslint-plugin-prettier": "^3.1.4", "fs-extra": "^9.0.1", "get-port": "^5.1.1", "jest": "^26.1.0", "jest-circus": "^26.1.0", "jest-environment-node": "^26.1.0", "jest-junit": "^11.1.0", "jest-watch-typeahead": "^0.6.0", "memfs": "^3.2.0", "nanoid": "^3.1.11", "patch-package": "^6.2.2", "prettier": "^2.0.5", "puppeteer": "^5.2.1", "react-refresh": "^0.8.3", "rimraf": "^3.0.2", "sourcemap-validator": "^2.1.0", "type-fest": "^0.16.0", "typescript": "3.9.7", "webpack": "^4.44.0", "webpack-cli": "^3.3.12", "webpack-cli.beta": "npm:webpack-cli@^4.0.0-beta.8", "webpack-dev-server": "^3.11.0", "webpack-hot-middleware": "^2.25.0", "webpack-plugin-serve": "^1.0.1", "webpack.next": "npm:webpack@^5.0.0-beta.22", "yn": "^4.0.0" }, "peerDependencies": { "@types/webpack": "4.x", "react-refresh": "^0.8.3", "sockjs-client": "^1.4.0", "type-fest": "^0.13.1", "webpack": ">=4.43.0 <6.0.0", "webpack-dev-server": "3.x", "webpack-hot-middleware": "2.x", "webpack-plugin-serve": "0.x || 1.x" }, "peerDependenciesMeta": { "@types/webpack": { "optional": true }, "sockjs-client": { "optional": true }, "type-fest": { "optional": true }, "webpack-dev-server": { "optional": true }, "webpack-hot-middleware": { "optional": true }, "webpack-plugin-serve": { "optional": true } }, "engines": { "node": ">= 10.x" }, "gitHead": "c3dfe9c6fc50b7d3f8d03bb3758c0001162bac15", "_id": "@pmmmwh/react-refresh-webpack-plugin@0.4.1", "_nodeVersion": "14.4.0", "_npmVersion": "6.14.7", "dist": { "integrity": "sha512-MzM87WdX2r2KRFfhEho7oGyK1XRE/J9WwjB3v6oLQHN0dzBypBZxSWjnoYx+RWneRCsg8Sin1myf+EjX1fqIbQ==", "shasum": "a4db0ed8e58c2f8566161c9a8cdf1d095c9a891b", "tarball": "https://registry.npmjs.org/@pmmmwh/react-refresh-webpack-plugin/-/react-refresh-webpack-plugin-0.4.1.tgz", "fileCount": 48, "unpackedSize": 105777, "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfH6XnCRA9TVsSAnZWagAAOu8P/Axhb5hJlipaDSm1efXx\ngfG+n2NnJnkTJD852TYwLX+O8AaVu+HQVkmi0aPJwrhWaN1YpgnmkNvKm58g\nrLBMkWsazkiJcRpG5n5inzj/+MBnTMw+UaZZF99+aJd3ZcLLio/YGlG37I2t\nvsA8ElEwXsh0RJBLeefmthii3BGBctXh6hJrp9cP1mlgD2lNlC/TKMbVH9tb\nB9jKiDCHZwZD89Bos6FpJbquvXF7jWpRQ4ScGKCcgbEJgGiwZ3tCEAu0CiIm\n7z8ZdXoYaHyVD+0MjKC3jg/pd3iirQkojnuEra8Ki6CXXAa4IdjXpnL4Ia+t\nKuTDj2A1ygSzEiYBlTRe1Xe+o/tYTuyKf5pgrztCYKbvsyZeKLVPbyvV8aCv\nMtvdQb1LQQbY1vzkbWRK08/aO1u9L9cvYVdJhAOItUaZAegUjORQACmFJKty\n9bZulfrqJ0vXY3S7MOIZrVSNhxFQfrNE7jxZiq8Ebn983P36J0w4fpS8w9fe\n4h6Y41TqdB52gta0wf16P0jz0/ONwOAIPWq2QsIGQppRQnfMxHQwcN+Hfz32\nuYq6Wf225I6bng3Fyf7LQcgZFX7PJtqpKWRtrE62Gn3vbFmn1IuvGq8ume6P\nijd0SOZk68bcxW6btRRQna8pzg4n4dHflBw9fUB/8xvqEKSP7S6aIPiVkk+p\ns7Kk\r\n=Hby3\r\n-----END PGP SIGNATURE-----\r\n" }, "maintainers": [ { "name": "pmmmwh", "email": "pmmmwh@gmail.com" } ], "_npmUser": { "name": "pmmmwh", "email": "pmmmwh@gmail.com" }, "directories": {}, "_npmOperationalInternal": { "host": "s3://npm-registry-packages", "tmp": "tmp/react-refresh-webpack-plugin_0.4.1_1595909606531_0.7469832843007294" }, "_hasShrinkwrap": false }, "0.4.2": { "name": "@pmmmwh/react-refresh-webpack-plugin", "version": "0.4.2", "description": "An **EXPERIMENTAL** Webpack plugin to enable \"Fast Refresh\" (also previously known as _Hot Reloading_) for React components.", "keywords": [ "react", "javascript", "webpack", "refresh", "hmr", "hotreload", "livereload", "live", "edit", "hot", "reload" ], "homepage": "https://github.com/pmmmwh/react-refresh-webpack-plugin#readme", "bugs": { "url": "https://github.com/pmmmwh/react-refresh-webpack-plugin/issues" }, "repository": { "type": "git", "url": "git+https://github.com/pmmmwh/react-refresh-webpack-plugin.git" }, "license": "MIT", "author": { "name": "Michael Mok" }, "main": "lib/index.js", "types": "types/index.d.ts", "scripts": { "pretest": "yarn link && yarn link \"@pmmmwh/react-refresh-webpack-plugin\"", "posttest": "yarn unlink \"@pmmmwh/react-refresh-webpack-plugin\"", "test": "node scripts/test.js", "test:webpack-5": "WEBPACK_VERSION=5 yarn test", "lint": "eslint --report-unused-disable-directives --ext .js .", "lint:fix": "yarn lint --fix", "format": "prettier --write \"**/*.{js,jsx,ts,tsx,json,md}\"", "format:check": "prettier --check \"**/*.{js,jsx,ts,tsx,json,md}\"", "generate-types": "tsc -p tsconfig.json && rimraf \"types/{globals.*,runtime,utils}\" && yarn format", "prepublishOnly": "rimraf types && yarn generate-types" }, "dependencies": { "ansi-html": "^0.0.7", "error-stack-parser": "^2.0.6", "html-entities": "^1.2.1", "native-url": "^0.2.6", "schema-utils": "^2.6.5", "source-map": "^0.7.3" }, "devDependencies": { "@babel/core": "^7.11.0", "@types/json-schema": "^7.0.5", "@types/node": "^14.0.27", "@types/puppeteer": "^3.0.1", "@types/webpack": "^4.41.21", "@webpack-cli/serve": "^1.0.1-alpha.5", "babel-loader": "^8.1.0", "cross-spawn": "^7.0.3", "eslint": "^7.6.0", "eslint-config-prettier": "^6.11.0", "eslint-plugin-prettier": "^3.1.4", "fs-extra": "^9.0.1", "get-port": "^5.1.1", "jest": "^26.2.2", "jest-circus": "^26.2.2", "jest-environment-node": "^26.2.0", "jest-junit": "^11.1.0", "jest-watch-typeahead": "^0.6.0", "memfs": "^3.2.0", "nanoid": "^3.1.12", "prettier": "^2.0.5", "puppeteer": "^5.2.1", "react-refresh": "^0.8.3", "rimraf": "^3.0.2", "sourcemap-validator": "^2.1.0", "type-fest": "^0.16.0", "typescript": "3.9.7", "webpack": "^4.44.1", "webpack-cli": "^3.3.12", "webpack-cli.beta": "npm:webpack-cli@^4.0.0-beta.8", "webpack-dev-server": "^3.11.0", "webpack-hot-middleware": "^2.25.0", "webpack-plugin-serve": "^1.0.1", "webpack.next": "npm:webpack@^5.0.0-beta.22", "yn": "^4.0.0" }, "peerDependencies": { "@types/webpack": "4.x", "react-refresh": "^0.8.3", "sockjs-client": "^1.4.0", "type-fest": "^0.13.1", "webpack": ">=4.43.0 <6.0.0", "webpack-dev-server": "3.x", "webpack-hot-middleware": "2.x", "webpack-plugin-serve": "0.x || 1.x" }, "peerDependenciesMeta": { "@types/webpack": { "optional": true }, "sockjs-client": { "optional": true }, "type-fest": { "optional": true }, "webpack-dev-server": { "optional": true }, "webpack-hot-middleware": { "optional": true }, "webpack-plugin-serve": { "optional": true } }, "engines": { "node": ">= 10.x" }, "gitHead": "55028c6355b31e697e21bf3e9a48613a7b94bee7", "_id": "@pmmmwh/react-refresh-webpack-plugin@0.4.2", "_nodeVersion": "14.4.0", "_npmVersion": "6.14.7", "dist": { "integrity": "sha512-Loc4UDGutcZ+Bd56hBInkm6JyjyCwWy4t2wcDXzN8EDPANgVRj0VP8Nxn0Zq2pc+WKauZwEivQgbDGg4xZO20A==", "shasum": "1f9741e0bde9790a0e13272082ed7272a083620d", "tarball": "https://registry.npmjs.org/@pmmmwh/react-refresh-webpack-plugin/-/react-refresh-webpack-plugin-0.4.2.tgz", "fileCount": 48, "unpackedSize": 104177, "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfUJ3hCRA9TVsSAnZWagAAzUIP/iadI40EbSAq4WzaSMuW\ncwdM6jdZmDodMo166bPYCH4+Yv8sEAgxLZ/uVaWYX+fCH5eqJqI73Mo3KxX+\nEOOEvlsHDDrgKKYFtwkJRgS1HVdOJ4nRsK3KNebdPmvTO8s3iNjkC2xtAIT8\nsRMWRWfUphLaabSzIgJscqfcVERCLHLrxbKxY1xkznyBzQMGu1qhFn5M1LTc\nRWuZiTrzh8MjQczu5qLzCSo5Y8VkfeP4gOPR8gxBUXYUxAYaXmQGP7Fny8QC\nqKmNpgF2DGYm6hSdoc963WPfL4oY+ATHgM+tq1Tbo3/dYBy9u6IbR4C9hHYb\n3Wnv/MjrObZrEE150h6dk9YoYchUCFiZW0GrFm9Qdqew7P/sP7FVYJiZ2Eg5\nXkkaIgMdMuXDy/5gCpabJe+yuss4HdtVfHqvOt7SDSZc4V1Sa7zAGBq2GMEl\ng0vQjuAUU9RfjVu6AaljxKOSkajI5TLzXJjDi6+EaJWtez14JcyfdGDJVcW/\n6me5lJwNPmdvaVb9/riaXMPVMx7up63Pmgs2hyWr7BPRSA0+rn/b5jK1fo/I\n8+c4QzxA7+aNi5HSkG8lmGqWTdtNstzcovxsGx4bn0MWbrAkWNSPwS4TPRzZ\nq3or5abU+rfHxLVQDU734SpkXnZk7KCVRdTFB5OTOuIPm7XMS+dHxGvmnCL0\nP0ae\r\n=HSi6\r\n-----END PGP SIGNATURE-----\r\n" }, "maintainers": [ { "name": "pmmmwh", "email": "pmmmwh@gmail.com" } ], "_npmUser": { "name": "pmmmwh", "email": "pmmmwh@gmail.com" }, "directories": {}, "_npmOperationalInternal": { "host": "s3://npm-registry-packages", "tmp": "tmp/react-refresh-webpack-plugin_0.4.2_1599118817019_0.9958269973528926" }, "_hasShrinkwrap": false }, "0.4.3": { "name": "@pmmmwh/react-refresh-webpack-plugin", "version": "0.4.3", "description": "An **EXPERIMENTAL** Webpack plugin to enable \"Fast Refresh\" (also previously known as _Hot Reloading_) for React components.", "keywords": [ "react", "javascript", "webpack", "refresh", "hmr", "hotreload", "livereload", "live", "edit", "hot", "reload" ], "homepage": "https://github.com/pmmmwh/react-refresh-webpack-plugin#readme", "bugs": { "url": "https://github.com/pmmmwh/react-refresh-webpack-plugin/issues" }, "repository": { "type": "git", "url": "git+https://github.com/pmmmwh/react-refresh-webpack-plugin.git" }, "license": "MIT", "author": { "name": "Michael Mok" }, "main": "lib/index.js", "types": "types/index.d.ts", "scripts": { "pretest": "yarn link && yarn link \"@pmmmwh/react-refresh-webpack-plugin\"", "posttest": "yarn unlink \"@pmmmwh/react-refresh-webpack-plugin\"", "test": "node scripts/test.js", "test:webpack-5": "WEBPACK_VERSION=5 yarn test", "lint": "eslint --report-unused-disable-directives --ext .js .", "lint:fix": "yarn lint --fix", "format": "prettier --write \"**/*.{js,jsx,ts,tsx,json,md}\"", "format:check": "prettier --check \"**/*.{js,jsx,ts,tsx,json,md}\"", "generate-types": "tsc -p tsconfig.json && rimraf \"types/{globals.*,runtime,utils}\" && yarn format", "prepublishOnly": "rimraf types && yarn generate-types" }, "dependencies": { "ansi-html": "^0.0.7", "error-stack-parser": "^2.0.6", "html-entities": "^1.2.1", "native-url": "^0.2.6", "schema-utils": "^2.6.5", "source-map": "^0.7.3" }, "devDependencies": { "@babel/core": "^7.11.6", "@types/json-schema": "^7.0.6", "@types/node": "^14.11.1", "@types/puppeteer": "^3.0.2", "@types/webpack": "^4.41.22", "@webpack-cli/serve": "^1.0.1-alpha.5", "babel-loader": "^8.1.0", "cross-spawn": "^7.0.3", "eslint": "^7.9.0", "eslint-config-prettier": "^6.11.0", "eslint-plugin-prettier": "^3.1.4", "fs-extra": "^9.0.1", "get-port": "^5.1.1", "jest": "^26.4.2", "jest-circus": "^26.4.2", "jest-environment-node": "^26.3.0", "jest-junit": "^11.1.0", "jest-watch-typeahead": "^0.6.1", "memfs": "^3.2.0", "nanoid": "^3.1.12", "prettier": "^2.1.2", "puppeteer": "^5.3.0", "react-refresh": "^0.8.3", "rimraf": "^3.0.2", "sourcemap-validator": "^2.1.0", "type-fest": "^0.16.0", "typescript": "4.0.3", "webpack": "^4.44.2", "webpack-cli": "^3.3.12", "webpack-cli.beta": "npm:webpack-cli@^4.0.0-beta.8", "webpack-dev-server": "^3.11.0", "webpack-hot-middleware": "^2.25.0", "webpack-plugin-serve": "^1.0.1", "webpack.next": "npm:webpack@^5.0.0-beta.23", "yn": "^4.0.0" }, "peerDependencies": { "@types/webpack": "4.x", "react-refresh": ">=0.8.3 <0.10.0", "sockjs-client": "^1.4.0", "type-fest": "^0.13.1", "webpack": ">=4.43.0 <6.0.0", "webpack-dev-server": "3.x", "webpack-hot-middleware": "2.x", "webpack-plugin-serve": "0.x || 1.x" }, "peerDependenciesMeta": { "@types/webpack": { "optional": true }, "sockjs-client": { "optional": true }, "type-fest": { "optional": true }, "webpack-dev-server": { "optional": true }, "webpack-hot-middleware": { "optional": true }, "webpack-plugin-serve": { "optional": true } }, "engines": { "node": ">= 10.x" }, "gitHead": "9d30b6a8e7f800fe4516865987977fc30d8114fb", "_id": "@pmmmwh/react-refresh-webpack-plugin@0.4.3", "_nodeVersion": "12.18.3", "_npmVersion": "6.14.6", "dist": { "integrity": "sha512-br5Qwvh8D2OQqSXpd1g/xqXKnK0r+Jz6qVKBbWmpUcrbGOxUrf39V5oZ1876084CGn18uMdR5uvPqBv9UqtBjQ==", "shasum": "1eec460596d200c0236bf195b078a5d1df89b766", "tarball": "https://registry.npmjs.org/@pmmmwh/react-refresh-webpack-plugin/-/react-refresh-webpack-plugin-0.4.3.tgz", "fileCount": 48, "unpackedSize": 105012, "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfn0J4CRA9TVsSAnZWagAA5TUP/jIKoBMXdEHNdXM+3yAA\nhmlF7Z646l0wUnagD8uO/XNx4xgd0N9QtLwLY5S1omGhDoRMr16pw58Ah8cr\nQ5gbGNMFrvx0XoKLAR6wj6h86DlzceXkCoClBwB7XUmmUUmj2vqVkIFNXPjY\nPZmr5obnyD3YutgpyGxm3gBwqewO0QPZX6Gd3/79VL0IDVKAs/gYv8pGGlHQ\nppb07RZO9ozAaZTwY0wfbZvnZosBFFPp6QHN++FlElz350+D2blOysLjfAaS\nAMw/5v9vSZJhIN+zYIFr59vfhRDubmM0WvqXP0SVNqEo8UIPiMv/gpJNr2bi\nCAXXZQq8hsGph4xNZQDb61nsbIezLhuZUzwHEHD7P1DK7n+WI26vd//op2Kt\nUf4//+Sup28cXwwlRya2J+1o9iMvaPvftnE2aJvl6S9fHY0GEvag9eQOKJH7\nKV8orDDg8S7i0fwqbtVISWtw5OLnEedQTzlEcUBWGUuHX2ylyXubk7+8FmKU\n46vNTA2+6HgH8QqyEuuIS6MZrNm/qy3r1YhCuF6gLba/nIZlIdHpKPl/TqQl\nWpwJd3p+x9gcI2/2QxhSkz8G/+rxbYSGKxIGeWoz1QzjrP0AAC3yiimsoSaB\npxXBZjxHghXsjBF3Ec1ze6TzafSLmEAZW/5tSymuAgxsKwj7aDIqOHrjEbzf\nydqP\r\n=Q6To\r\n-----END PGP SIGNATURE-----\r\n" }, "maintainers": [ { "name": "pmmmwh", "email": "pmmmwh@gmail.com" } ], "_npmUser": { "name": "pmmmwh", "email": "pmmmwh@gmail.com" }, "directories": {}, "_npmOperationalInternal": { "host": "s3://npm-registry-packages", "tmp": "tmp/react-refresh-webpack-plugin_0.4.3_1604272760392_0.40004934419932825" }, "_hasShrinkwrap": false } }, "time": { "created": "2019-12-06T17:17:42.812Z", "0.1.0": "2019-12-06T17:17:43.007Z", "modified": "2020-11-01T23:20:03.778Z", "0.1.1": "2019-12-13T11:03:59.945Z", "0.1.2": "2019-12-17T18:46:28.384Z", "0.1.3": "2019-12-19T04:38:30.577Z", "0.2.0": "2020-03-02T18:44:38.975Z", "0.3.0-beta.0": "2020-03-27T19:45:12.768Z", "0.3.0-beta.1": "2020-04-01T22:53:36.248Z", "0.3.0-beta.2": "2020-04-07T21:17:00.754Z", "0.3.0-beta.3": "2020-04-09T21:42:57.398Z", "0.3.0-beta.4": "2020-04-20T03:26:03.553Z", "0.3.0-beta.5": "2020-04-23T19:23:13.087Z", "0.3.0-beta.6": "2020-05-07T09:45:08.160Z", "0.3.0": "2020-05-09T18:55:34.586Z", "0.3.1": "2020-05-10T18:42:43.340Z", "0.4.0-beta.0": "2020-05-18T12:36:17.995Z", "0.4.0-beta.1": "2020-05-20T00:38:06.919Z", "0.3.2": "2020-05-21T17:29:17.669Z", "0.4.0-beta.2": "2020-05-29T09:48:29.853Z", "0.3.3": "2020-05-29T15:29:34.649Z", "0.4.0-beta.3": "2020-06-08T06:36:09.957Z", "0.4.0-beta.4": "2020-06-08T07:14:17.148Z", "0.4.0-beta.5": "2020-06-15T17:53:54.062Z", "0.4.0-beta.6": "2020-06-24T18:43:08.675Z", "0.4.0-beta.7": "2020-07-08T08:48:10.169Z", "0.4.0-beta.8": "2020-07-12T21:20:11.132Z", "0.4.0-beta.9": "2020-07-23T19:16:08.943Z", "0.4.0-beta.10": "2020-07-26T18:36:41.167Z", "0.4.0": "2020-07-27T18:51:38.801Z", "0.4.1": "2020-07-28T04:13:26.679Z", "0.4.2": "2020-09-03T07:40:17.259Z", "0.4.3": "2020-11-01T23:19:20.529Z" }, "maintainers": [ { "name": "pmmmwh", "email": "pmmmwh@gmail.com" } ], "description": "An **EXPERIMENTAL** Webpack plugin to enable \"Fast Refresh\" (also previously known as _Hot Reloading_) for React components.", "homepage": "https://github.com/pmmmwh/react-refresh-webpack-plugin#readme", "keywords": [ "react", "javascript", "webpack", "refresh", "hmr", "hotreload", "livereload", "live", "edit", "hot", "reload" ], "repository": { "type": "git", "url": "git+https://github.com/pmmmwh/react-refresh-webpack-plugin.git" }, "author": { "name": "Michael Mok" }, "bugs": { "url": "https://github.com/pmmmwh/react-refresh-webpack-plugin/issues" }, "license": "MIT", "readme": "# React Refresh Webpack Plugin\n\n[![Latest Version](https://img.shields.io/npm/v/@pmmmwh/react-refresh-webpack-plugin/latest)](https://www.npmjs.com/package/@pmmmwh/react-refresh-webpack-plugin/v/latest)\n[![Next Version](https://img.shields.io/npm/v/@pmmmwh/react-refresh-webpack-plugin/next)](https://www.npmjs.com/package/@pmmmwh/react-refresh-webpack-plugin/v/next)\n[![CircleCI](https://img.shields.io/circleci/project/github/pmmmwh/react-refresh-webpack-plugin/main)](https://app.circleci.com/pipelines/github/pmmmwh/react-refresh-webpack-plugin)\n[![License](https://img.shields.io/github/license/pmmmwh/react-refresh-webpack-plugin)](./LICENSE)\n\nAn **EXPERIMENTAL** Webpack plugin to enable \"Fast Refresh\" (also previously known as _Hot Reloading_) for React components.\n\n## Prerequisites\n\nFirst and foremost, this plugin is not 100% stable.\nWe're working towards a stable v1 release, and we've been testing the plugin quite extensively;\nbut since it is still pretty young, there might still be some unknown edge cases.\n\nThere are no breaking changes planned for the v1 release,\nbut they might still happen if we hit some significant road blockers.\n\nAlso, ensure that you are using the minimum supported versions of the plugin's peer dependencies -\nolder versions unfortunately do not contain code to orchestrate \"Fast Refresh\",\nand thus cannot be made compatible.\n\n| Dependency | Minimum | Best |\n| ------------------ | -------------------------------------------------- | ---------- |\n| `react` | `16.9.0` | `16.13.0`+ |\n| `react-dom` | `16.9.0` | `16.13.0`+ |\n| `react-reconciler` | `0.22.0` | `0.25.0`+ |\n| `webpack` | `4.0.0` (for `0.3.x`)
`4.43.0` (for `0.4.x`+) | `4.43.0`+ |\n\n> You only need `react-dom` if you're rendering to the DOM.\n\n> You only need to check for `react-reconciler` if you use custom reconcilers like `react-three-fiber`.\n> You should check their `package.json` to make sure they use a compatible version instead of installing `react-reconciler` yourself.\n> If the reconcilers are not compatible, please create an issue at their repository.\n\n## Installation\n\nWith all prerequisites met, you can install the plugin with one of the commands below:\n\n```sh\n# if you prefer npm\nnpm install -D @pmmmwh/react-refresh-webpack-plugin react-refresh\n\n# if you prefer yarn\nyarn add -D @pmmmwh/react-refresh-webpack-plugin react-refresh\n\n# if you prefer pnpm\npnpm add -D @pmmmwh/react-refresh-webpack-plugin react-refresh\n```\n\nThe plugin depends on a package from the React team - `react-refresh`,\nso you will have to install and configure it separately as demonstrated in the [Usage](#usage) section, too.\n\n### TypeScript\n\nTypeScript support is available out-of-the-box for those who use `webpack.config.ts` :tada:!\n\nFor that you will have to install `type-fest` as a development peer dependency with one of the commands below:\n\n```sh\n# if you prefer npm\nnpm install -D type-fest\n\n# if you prefer yarn\nyarn add -D type-fest\n\n# if you prefer pnpm\npnpm add -D type-fest\n```\n\n## Usage\n\nThe most basic setup to enable \"Fast Refresh\" is to update your `webpack.config.js` (or `.ts`) as follows:\n\n```js\nconst ReactRefreshWebpackPlugin = require('@pmmmwh/react-refresh-webpack-plugin');\nconst webpack = require('webpack');\n// ... your other imports\n\nconst isDevelopment = process.env.NODE_ENV !== 'production';\n\nmodule.exports = {\n // It is suggested to run both `react-refresh/babel` and the plugin in the `development` mode only,\n // even though both of them have optimisations in place to do nothing in the `production` mode.\n // If you would like to override Webpack's defaults for modes, you can also use the `none` mode -\n // you then will need to set `forceEnable: true` in the plugin's options.\n mode: isDevelopment ? 'development' : 'production',\n module: {\n rules: [\n // ... other rules\n {\n test: /\\.[jt]sx?$/,\n exclude: /node_modules/,\n use: [\n // ... other loaders\n {\n loader: require.resolve('babel-loader'),\n options: {\n // ... other options\n plugins: [\n // ... other plugins\n isDevelopment && require.resolve('react-refresh/babel'),\n ].filter(Boolean),\n },\n },\n ],\n },\n ],\n },\n plugins: [\n // ... other plugins\n isDevelopment && new webpack.HotModuleReplacementPlugin(),\n isDevelopment && new ReactRefreshWebpackPlugin(),\n ].filter(Boolean),\n // ... other configuration options\n};\n```\n\nYou might want to further tweak the configuration to accommodate your setup:\n\n- `isDevelopment`\n\n In this example we've shown the simple way of splitting up `development` and `production` builds with the `NODE_ENV` environment variable.\n It will default to `true` (i.e. `development` mode) when `NODE_ENV` is not available from the environment.\n\n In practice though, you might want to wire this up differently,\n like [using a function config](https://webpack.js.org/configuration/configuration-types/#exporting-a-function) or using multiple configuration files.\n\n- `webpack.HotModuleReplacementPlugin`\n\n If you use `webpack-dev-server` or `webpack-plugin-serve`,\n you can set `devServer.hot`/`devServer.hotOnly` and `hmr` to `true` respectively,\n instead of adding the HMR plugin to your plugin list.\n\n> Note: If you are using TypeScript (instead of Babel) as a transpiler, you will still need to use `babel-loader` to process your source code.\n> Check out this [sample project](https://github.com/pmmmwh/react-refresh-webpack-plugin/tree/main/examples/typescript-without-babel) on how to set this up.\n\n### Integration Support for Overlay\n\nOfficially, `webpack-dev-server`, `webpack-hot-middleware` and `webpack-plugin-serve` are supported out of the box -\nyou just have to set the [`overlay.sockIntegration`](docs/API.md#sockintegration) option to match what you're using.\n\nFor each of the integrations listed above,\nyou can also take a look at the corresponding [sample projects](https://github.com/pmmmwh/react-refresh-webpack-plugin/tree/main/examples) for a better understanding of how things should be wired up.\n\n## API\n\nPlease refer to [the API docs](docs/API.md) for all available options.\n\n## FAQs and Troubleshooting\n\nPlease refer to [the Troubleshooting guide](docs/TROUBLESHOOTING.md) for FAQs and resolutions to common issues.\n\n## License\n\nThis project is licensed under the terms of the [MIT License](/LICENSE).\n\n## Related Work\n\n- [Initial Implementation by @maisano](https://gist.github.com/maisano/441a4bc6b2954205803d68deac04a716)\n", "readmeFilename": "README.md" }