{"_id":"@dwatts3624/vue-keep-alive-dev","_rev":"1-8805bc8432a2cacfbfb8f98a4416efa9","name":"@dwatts3624/vue-keep-alive-dev","dist-tags":{"latest":"0.0.1"},"versions":{"0.0.1":{"name":"@dwatts3624/vue-keep-alive-dev","version":"0.0.1","description":"A plugin to resolve HMR issues with the core keep-alive plugin","main":"dist/plugin.js","scripts":{"build":"cross-env NODE_ENV=production webpack --config webpack.config.js"},"repository":{"type":"git","url":"git+https://github.com/dwatts3624/vue-keep-alive-dev.git"},"keywords":["vue","keep-alive"],"author":{"name":"Danny Watts","email":"dwatts3624@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/dwatts3624/vue-keep-alive-dev/issues"},"homepage":"https://github.com/dwatts3624/vue-keep-alive-dev#readme","devDependencies":{"@babel/core":"^7.5.5","@babel/plugin-proposal-optional-chaining":"^7.10.4","@babel/preset-env":"^7.5.5","babel-loader":"^8.0.6","cross-env":"^5.2.0","vue":"^2.6.10","webpack":"^4.39.1","webpack-cli":"^3.3.6"},"peerDependencies":{"vue":"^2.6.10"},"dependencies":{},"gitHead":"c189f273be5136d934fdc3fe8150cb5218f87644","_id":"@dwatts3624/vue-keep-alive-dev@0.0.1","_nodeVersion":"13.3.0","_npmVersion":"6.13.1","dist":{"integrity":"sha512-Fp7XWjyw0MPdO2wLz1bMu3JXl3Dmt8FILokxT2p/y9zBEYUYabOFZsfHoson0HsMdfRr4hrPN8yIjtavzOCnOw==","shasum":"b6f816f47a359b741039b1e61ef0972f27d04a6a","tarball":"https://registry.npmjs.org/@dwatts3624/vue-keep-alive-dev/-/vue-keep-alive-dev-0.0.1.tgz","fileCount":5,"unpackedSize":9259,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfCebICRA9TVsSAnZWagAACb0P/2Phw7Op1dOSF7Fk0q2X\ne0vcb7VL/kFsHkKdTVRIEbbnMULeatitxjmn0xAlVFrlnzXiEeH9PAG89vJq\nu91jQ/CIA9GWpfr+gMq3ghaM6y7/f+RSzn0c34JnE5VMNWDaqpTONilOGM9d\n9+GCE/q96c/WDnQfqdTm5LXeav95UKVxo4LdH75r+gdT4GYjWUr/DpWHQ54J\nCpyQKDaQR2YhwqGlmHfKyE9AlLhLUZzYclAnZtuvNtgg4/g6AdaafyulUfbq\nr41bIXWOoiYI85nWWQdIZiWUWxyeAlMzcFM1Y7zM0oarzcePYg6CIp13xYNN\nYQp41tAodgmmUoJSsoXc7B/CLOIHResssTecC37X7kl0kAPxfQdHeKPoUPVt\nzDupMCBkHGgXQHxny7i+ToYKlJAhPpuFwxpr7qdOcwsA4pqtfWd2sGpkN17M\nyVB+jr88ivzAFBR2SuWt4CXczpUHs+o8EeXvD3EsGUmPnduV1yrRixAlTat8\nKKULCHja2fEsd2pD720kZSOa6Pawk8NkoOKhPd6l4OVwSZ3p+zmBRWaG8LZp\nJaumlToZSd7ZHbvG74/UyV6xo7+OYYZCDlHm8FcH6mAo5XFprhGJfsFwy4nE\nv0RunfPgTT/bBHpSW4KAI/1t5Ka5mRj5hpiwv2r3p8shKmAB9VBSJV/07dEY\nQsB7\r\n=T7NQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCjSYSdRhxbXLHMEBLip/5iISC4GKw10pq/0tfFBcEjZwIgYyaXnfzlYJL33e68YLgAgCfJ0lp+x77LDU+Q98Dyu+k="}]},"maintainers":[{"name":"dwatts3624","email":"dwatts3624@gmail.com"}],"_npmUser":{"name":"dwatts3624","email":"dwatts3624@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vue-keep-alive-dev_0.0.1_1594484423857_0.264898805385839"},"_hasShrinkwrap":false}},"time":{"created":"2020-07-11T16:20:23.808Z","0.0.1":"2020-07-11T16:20:23.981Z","modified":"2022-04-05T06:11:11.807Z"},"maintainers":[{"name":"dwatts3624","email":"dwatts3624@gmail.com"}],"description":"A plugin to resolve HMR issues with the core keep-alive plugin","homepage":"https://github.com/dwatts3624/vue-keep-alive-dev#readme","keywords":["vue","keep-alive"],"repository":{"type":"git","url":"git+https://github.com/dwatts3624/vue-keep-alive-dev.git"},"author":{"name":"Danny Watts","email":"dwatts3624@gmail.com"},"bugs":{"url":"https://github.com/dwatts3624/vue-keep-alive-dev/issues"},"license":"MIT","readme":"# VueKeepAliveDev\nThis plugin resolves an issue where webpack's Hot Module Replacement (MHR) doesn't work for `keep-alive` components (e.g. `router-view`, etc).\n\n## Credit\nFull credit to nailfar & ericwu-wish in https://github.com/vuejs/vue-loader/issues/1332 for this *entire* solution.  I just packaged it up to make this easier as I was struggling to deal with the suggested workarounds that just disable `keep-alive` in development with exclude patterns or a dynamic component.  I quickly noticed that this creates a completely different hook flow where the created/activated/deactived/destroyed hooks would have be tuned based on local vs production and it was getting ugly!\n\n## Installation\n\n### 1. Install\n```sh\nyarn add vue-keep-alive-dev\n# or\nnpm i vue-keep-alive-dev --save\n```\n\n### 2. Activate\n```js\nimport VueKeepAliveDev from 'vue-keep-alive-dev'\n\nVue.use(VueKeepAliveDev, {\n  environment: 'development' // Your environment when HMR is in use\n});\n```\n\n### 3. Run\n\nIn your package.json ensure that the `NODE_ENV` lines up with whatever you're setting when compiling Vue.\n\nExample:\n```json\n{\n  \"scripts\": {\n    \"dev\": \"cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --progress --inline --hot --config=webpack.config.js\"\n  }\n}\n```\n\n## Configuration\n\n* `environment` - The `NODE_ENV` when HMR is in use.  Defaults to `development`.\n\n## License\nMIT","readmeFilename":"README.md"}