{"_id":"@ice/stark-module","_rev":"79-0e4b236792b252d60cc137ff6c77f1ed","name":"@ice/stark-module","dist-tags":{"latest":"1.5.0","beta":"1.5.1-7","alpha":"1.5.1-10"},"versions":{"0.1.0":{"name":"@ice/stark-module","version":"0.1.0","keywords":["ice","module","micro-frontends","microfrontends"],"license":"MIT","_id":"@ice/stark-module@0.1.0","maintainers":[{"name":"yuanyan","email":"yuanyan.cao@gmail.com"},{"name":"oraaange","email":"oraaangecolin@gmail.com"},{"name":"temper357","email":"temper357@gmail.com"},{"name":"yundong","email":"yundong.me@gmail.com"},{"name":"clarkxia","email":"xiawenwu41@163.com"},{"name":"lip966","email":"wddpwzz36@gmail.com"},{"name":"alvinhui","email":"alvinxwt@gmail.com"},{"name":"boiawang","email":"zhengwang2314@gmail.com"},{"name":"sobear","email":"sobear.me@gmail.com"}],"homepage":"https://github.com/ice-lab/icestark","bugs":{"url":"https://github.com/ice-lab/icestark/issues"},"dist":{"shasum":"746ffc1c161d61c993105b30594cf71f6488eee3","tarball":"https://registry.npmjs.org/@ice/stark-module/-/stark-module-0.1.0.tgz","fileCount":8,"integrity":"sha512-sj/ffmP9NY5DLzFbrUY+9DHNbnZ3UmjHOYykw2wGJqt7iAbEdDRViWzOvzExEifMr9KEcC2Bgmus+WwcZO6whg==","signatures":[{"sig":"MEQCIDAFo/EC9hKwsNU/xcWI0Nwo6M52kFs2Im7OPP2SAFb8AiAotwkIxrYgq0nnqhcGXX1V41xG+5b/kR09wr5tAmQc5A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":35290,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeHG4zCRA9TVsSAnZWagAAGEEQAJR36v9Wvm5eJ2ZPf10P\ncJYPRhjDdS3fdnpI9oPtP9kx2bPWhAU7dlxcx5Vawu0zlEQuFCrw36mUSgtJ\nGul0dCkdowC5CrLCg5iVyMMrk5KloWaIlvU5/AlLHrWvIEr/9GodRUHSkOLp\nQztfFdyxhZWVHCN06zGk66HwBsa7dvescUpT+HzP0b9OIeTIasBjEDmYchNC\n/fqf81svW1Yvmrqa0XY1aI71MS1vSkdJZQdbzLzfRpyRcOY/2DmW2bpIYLNZ\n/Uwew4wtYuT+vYajNIzcOuM8OB+MXKk0DVRdhhzXHUErcWJbiYBr6z9Ze0Rp\neUdRoPqw/6CoU0+3I1rSQ6AMw6M8Oo1tjA3ajoAm8+g5n8Vd7sa6qD9NFQGi\n2Wqpp+U3aZwkgA/s2mJUNpe0mKAyicj17UDA4crCaADISZGhFfdAS9IGU+du\neqCCNHJDZ3BK/O/8PrY6O3RbDPbKw69Tn8ex0ryNa4WxY6GzVP8ifAcjS7DC\nXw6nJnqTn8vPNrQ75RdCNNR0hSvVnoMRrPihq0dOOrvTKddxfjf5a7loq7Cj\nrNwVemsp8ODgsFGBCCX0vYXNm7FjakipT77nSluus/r5gMZsx+EJC5jvbRMw\n3Tejt77fBFTKfSl5XH8Cb5u/O4qqUgBy+T06jVMCA1Ca45kB+S+P/GIelyog\nxQdn\r\n=OpbE\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"preset":"ts-jest","automock":false,"setupFiles":["./setupJest.ts"],"collectCoverage":true,"coverageDirectory":"./coverage/"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS"}},"types":"lib/index.d.ts","scripts":{"lint":"eslint --cache --ext .ts ./","build":"rm -rf lib && tsc","watch":"tsc -w","coverage":"codecov","prepublishOnly":"npm run build"},"_npmUser":{"name":"lip966","email":"wddpwzz36@gmail.com"},"repository":{"url":"git+https://github.com/ice-lab/icestark.git","type":"git"},"_npmVersion":"6.4.1","description":"icestark-module is a JavaScript library for loading module.","directories":{},"_nodeVersion":"10.15.3","_hasShrinkwrap":false,"devDependencies":{"jest":"^24.7.1","husky":"^2.2.0","eslint":"^5.16.0","codecov":"^3.4.0","ts-jest":"^24.0.2","@ice/spec":"^0.1.4","stylelint":"^10.1.0","typescript":"^3.4.4","@types/jest":"^24.0.12","@types/node":"^12.0.0","@commitlint/cli":"^7.5.2","jest-fetch-mock":"^2.1.2","@commitlint/config-conventional":"^7.5.0"},"_npmOperationalInternal":{"tmp":"tmp/stark-module_0.1.0_1578921522653_0.9927699534112875","host":"s3://npm-registry-packages"}},"0.1.1":{"name":"@ice/stark-module","version":"0.1.1","keywords":["ice","module","micro-frontends","microfrontends"],"license":"MIT","_id":"@ice/stark-module@0.1.1","maintainers":[{"name":"alvinhui","email":"alvinxwt@gmail.com"},{"name":"boiawang","email":"zhengwang2314@gmail.com"},{"name":"clarkxia","email":"xiawenwu41@163.com"},{"name":"lip966","email":"wddpwzz36@gmail.com"},{"name":"oraaange","email":"oraaangecolin@gmail.com"},{"name":"sobear","email":"sobear.me@gmail.com"},{"name":"temper357","email":"temper357@gmail.com"},{"name":"yuanyan","email":"yuanyan.cao@gmail.com"},{"name":"yundong","email":"yundong.me@gmail.com"}],"homepage":"https://github.com/ice-lab/icestark","bugs":{"url":"https://github.com/ice-lab/icestark/issues"},"dist":{"shasum":"c30ae6510f0730a00be70ac9b60ed29ff3b63842","tarball":"https://registry.npmjs.org/@ice/stark-module/-/stark-module-0.1.1.tgz","fileCount":12,"integrity":"sha512-iYKvoZQnr8cGDnJy38oPZ39SHHYwuNG17y5AgvjrOf2t0w5GkGRemFPCZik7KNv/GdIIbIESgG7X76aXG5CVaA==","signatures":[{"sig":"MEUCIQCpRti57oMgtt8zyZbM3B5mEIYptzcSWii4UaDPcUJxSgIgWiruT8aRXuTGETLt6azEcVlJvF9UO7+566wDDW6tB6M=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":61488,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeHufHCRA9TVsSAnZWagAAEQsP/3TUpJLw7ddJB47kBNua\nqO99FZzHXJn/X9xDYmIOwN/SM1iOKu3vn71r0Z95vsdoB8qErCQtD18JUZtv\npVObqJmWpMtBtJ6C4CCBhy50AjlowxPZk++L9ajnrJ80Y3VR4pppFqVCA9jO\nM5yDf0CzQT2j9KwP1Hvnu4LO9lqtjqIwdu0Z/6ftcs5kjUELkoVpijcS68C2\nxom23XKMiCghcTzvNxbzmFtlSe9CdQgNiKG1hb8KyUTi4Twr5C7aIUC80tQF\nYiZZKIs5LLVNUcQtTEPrwOFR+GmELtsjRHmOzmeMPuRUygO0/SYF5Y2oLiVb\nYPkykqSOPFo7QRNECtSz/HWYRIEgzzEC6/Z5k67NhCFfnbKemOj2vyueOhDC\nRrHuc8QyN2H0aTaTXMX32BXu5sIdStKjvLFrEUZa0v0ffXpgsmAFNBbpQuj1\nu3f9v1qrvJiykso0+7Bq9M3BdBViCtRFjVWI2vyYPoRTFOpBFSBjwt5yCjBW\nIMN8Urozz2RTUZ2aBSgJJbs+f1YNE6m9elqqRIC/bhG49VcZN+dcvGAPYwi8\nKF6fPl35u1PcHnoTTGia74uX8DY54liZjLwmrQG6tRfBkmmWb1Rk/7w5oL1A\nMD2VcP2S2TUuqRs5QPok9m15biFCL+U5gMFvPB2R+fnpg8N/LokLQfgGNAim\n6DxA\r\n=zBN+\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"preset":"ts-jest","automock":false,"setupFiles":["./setupJest.ts"],"collectCoverage":true,"coverageDirectory":"./coverage/"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS"}},"types":"lib/index.d.ts","scripts":{"lib":"rm -rf lib && tsc","umd":"rm -rf umd && webpack --config webpack.config.js","lint":"eslint --cache --ext .ts ./","build":"npm run lib && npm run umd","watch":"tsc -w","coverage":"codecov","watch:umd":"webpack --config webpack.dev.js","prepublishOnly":"npm run build"},"_npmUser":{"name":"lip966","email":"wddpwzz36@gmail.com"},"repository":{"url":"git+https://github.com/ice-lab/icestark.git","type":"git"},"_npmVersion":"6.4.1","description":"icestark-module is a JavaScript library for loading module.","directories":{},"_nodeVersion":"10.15.3","_hasShrinkwrap":false,"devDependencies":{"jest":"^24.7.1","husky":"^2.2.0","eslint":"^5.16.0","codecov":"^3.4.0","ts-jest":"^24.0.2","webpack":"^4.41.5","@ice/spec":"^0.1.4","stylelint":"^10.1.0","ts-loader":"^6.2.1","typescript":"^3.4.4","@types/jest":"^24.0.12","@types/node":"^12.0.0","webpack-cli":"^3.3.10","@commitlint/cli":"^7.5.2","jest-fetch-mock":"^2.1.2","@commitlint/config-conventional":"^7.5.0"},"_npmOperationalInternal":{"tmp":"tmp/stark-module_0.1.1_1579083718895_0.28979353913427897","host":"s3://npm-registry-packages"}},"1.0.0-0":{"name":"@ice/stark-module","version":"1.0.0-0","keywords":["modules","icestark"],"author":"","license":"MIT","_id":"@ice/stark-module@1.0.0-0","maintainers":[{"name":"alvinhui","email":"alvinxwt@gmail.com"},{"name":"boiawang","email":"zhengwang2314@gmail.com"},{"name":"clarkxia","email":"xiawenwu41@163.com"},{"name":"lip966","email":"wddpwzz36@gmail.com"},{"name":"oraaange","email":"oraaangecolin@gmail.com"},{"name":"sobear","email":"sobear.me@gmail.com"},{"name":"temper357","email":"temper357@gmail.com"},{"name":"yuanyan","email":"yuanyan.cao@gmail.com"},{"name":"yundong","email":"yundong.me@gmail.com"}],"homepage":"https://github.com/ice-lab/icestark#readme","bugs":{"url":"https://github.com/ice-lab/icestark/issues"},"dist":{"shasum":"88c9baccfe3538278073c153174cbcd922edbe78","tarball":"https://registry.npmjs.org/@ice/stark-module/-/stark-module-1.0.0-0.tgz","fileCount":13,"integrity":"sha512-revcM1/q/9tZ9Baawrwe7vzS7H19AQHN2N5XUV0OKnAh76iiuYgfzSTmsvYztDnMZsaODUkT3fQYgyeGzWKvmg==","signatures":[{"sig":"MEYCIQCTybxFhbTIWOQhGRZkMJRwL7tQSj6U1zKeS1AL0H16jQIhAN4zH+VuPDZZuIADgaJXCjaUJdFORxgace84mZVXW6Hr","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24713,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJenVLhCRA9TVsSAnZWagAAgf4QAJvfbzibg3QXg9f6zh0D\n3cRWqE74IJo9aFOx3HvyecVX7/+yDAnL6/rvtyyqqiJCWP3PwnnPFXrJ5zGU\nsXJVDaK82F4uAWljZ2kZKN6evpkSL4njI3ac/OvjjDPoE7NN/pWvTzOTaa0L\nZpbmZVfudulkv97AHGn/LxM+2NMgjXIsoyrf1cSFlFTmlwWBNGPA1ejFJSQn\nQplcWoEMzciCTiheFRRMvjTOrh17Mj+VcY1n2cobQFIY6NjGIkBNYXH0dG+5\njr9kI5k5Zpvooe8/vgaIBfz7JhzpTkIYto+QSCANByq1TpZj3W9INIOKuHYh\nErvxe/6TDvRs42qGmgkfOIYOlDnGOiqe4FHIRaKllrGnd13my0vZnqK3QoSH\nsIdbQ4d+7SkUWTHQ08pbF19vvYpXus7Ydck7Nq+0eiLXqMKhUDkOATxqkIW1\nLT/yX43ZFRrEbCHKsm1Hj6AsV1CLYnbrY3gRxE8Ac/VRj2bsrePGII2CZDI1\nXMi0+iNx07tw8wzsbY7adDPOyGIawfPqYF2Q4nG8ux+E62UpgnA0oHFaHNEu\nfmXcnZOA2WpzGZH20PtWnScGKUEy1nup8AKCu/uO11qiLULHNYsTzOml+kJX\nwP1zeW68rcGaIdPSFdl18xgoX+GrlItStwsl5BFzYdIUk5bvI/dRd92wOUZ8\nBWyv\r\n=1G9R\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"preset":"ts-jest","collectCoverage":true,"coverageDirectory":"./coverage/"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS"}},"readme":"ERROR: No README data found!","scripts":{"test":"NODE_ENV=unittest jest","build":"rm -rf lib && tsc","watch":"tsc -w","coverage":"codecov","prepublishOnly":"npm run test && npm run build"},"_npmUser":{"name":"clarkxia","email":"xiawenwu41@gmail.com"},"repository":{"url":"git+https://github.com/ice-lab/icestark.git","type":"git"},"_npmVersion":"6.9.0","description":"toolkit for load standard micro-module","directories":{},"_nodeVersion":"10.16.0","publishConfig":{"registry":"http://registry.npmjs.com/"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^25.2.7","react":"^16.13.1","codecov":"^3.4.0","ts-jest":"^25.3.1","react-dom":"^16.13.1","typescript":"^3.8.3"},"peerDependencies":{"react":">=15.0.0","react-dom":">=15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/stark-module_1.0.0-0_1587368673146_0.14378036991379917","host":"s3://npm-registry-packages"}},"1.0.0-1":{"name":"@ice/stark-module","version":"1.0.0-1","keywords":["modules","icestark"],"author":"","license":"MIT","_id":"@ice/stark-module@1.0.0-1","maintainers":[{"name":"alvinhui","email":"alvinxwt@gmail.com"},{"name":"boiawang","email":"zhengwang2314@gmail.com"},{"name":"clarkxia","email":"xiawenwu41@163.com"},{"name":"lip966","email":"wddpwzz36@gmail.com"},{"name":"oraaange","email":"oraaangecolin@gmail.com"},{"name":"sobear","email":"sobear.me@gmail.com"},{"name":"temper357","email":"temper357@gmail.com"},{"name":"yuanyan","email":"yuanyan.cao@gmail.com"},{"name":"yundong","email":"yundong.me@gmail.com"}],"homepage":"https://github.com/ice-lab/icestark#readme","bugs":{"url":"https://github.com/ice-lab/icestark/issues"},"dist":{"shasum":"3345e44e9b616a30bc87bdc96ab445b90d5aa9d6","tarball":"https://registry.npmjs.org/@ice/stark-module/-/stark-module-1.0.0-1.tgz","fileCount":13,"integrity":"sha512-2gxDX9VwJjcErTkNnGsiPFeFCnKLTfGEj+j8A7z6Vt9wdR28Dt3AGWOSoP0Bi5+mzYHETxbGAsu0AoSFm9no9A==","signatures":[{"sig":"MEQCIFFoigA1sliMk8gZgBCNYz1QHxiGrfUGifFl3/4uvzx6AiBS/xMgJDxqCriRunKa4FWOr0j/Te1mlklBrYTWT/eRFw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":25439,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJen+aMCRA9TVsSAnZWagAASxAP/3iAoi3hZKvFvDbTe5Dz\nIihtgjACLTQ0T5RcGABaQqR4l7fAN9su0MsmIoGcgkPYnl80I68nWRvAqTPi\nqH2Kp1Acg+JEqjxF4MPVip4Fud2vt6Fi8833vr+0s5n3UpuVkc8shBTy7r6d\n27BkCaTOEvFzVUNPCkBioJ1wp3UHH2iJsND4FGUoxN1LbrqlIOl0K3YL+GEU\nUHhO57/nEMXb7/S1mH0XftM+NCFcZXA37MYLx3qFOghF+WSxVOTdCYB6SWx0\nMGiRXFUPzVtHorrivysVYuUthxyUNe9Gh/YruzuU/d+Eg/hMLnLVFqpfIhby\nsbPGKKVTWQWwsV5fxmn71i0MOozr/6grHCRynRNWSuuklfZQZ58OocVsYDSU\nCHZGGTbhdiMAQ2gpMXgVQIGUXc74GuBGjy8ayLtPipDYgEuRNFBDhv3FPGus\nHREvk+6tLh+oRf3yT/nqAs7EW9+7EN/wyMtWDgZUMRpwO4lNFIj2owQ8XbOe\neNNPN8d6qSjS+1AuQZrAfnlIEJxPV32fpvFNFCqhZ2YLGYpUZQCLOAaT9FI3\nWpZYdBJ9LfeiBUHAcWYMV6BV8XmikMrVYWD1f2baal4j0/bC8BUBUkBkFwLi\nuV+WpVSdYXbUKW+wFgma1M4ca/IgTfiZ4ovkUCZmlWVk49DvOuYCiFyocUec\n/THw\r\n=BFFf\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"preset":"ts-jest","collectCoverage":true,"coverageDirectory":"./coverage/"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS"}},"readme":"ERROR: No README data found!","scripts":{"test":"NODE_ENV=unittest jest","build":"rm -rf lib && tsc","watch":"tsc -w","coverage":"codecov","prepublishOnly":"npm run test && npm run build"},"_npmUser":{"name":"clarkxia","email":"xiawenwu41@gmail.com"},"repository":{"url":"git+https://github.com/ice-lab/icestark.git","type":"git"},"_npmVersion":"6.9.0","description":"toolkit for load standard micro-module","directories":{},"_nodeVersion":"10.16.0","dependencies":{"@ice/sandbox":"^1.0.3-2"},"publishConfig":{"registry":"http://registry.npmjs.com/"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^25.2.7","react":"^16.13.1","codecov":"^3.4.0","ts-jest":"^25.3.1","react-dom":"^16.13.1","typescript":"^3.8.3","@testing-library/react":"^10.0.3","@testing-library/jest-dom":"^5.5.0"},"peerDependencies":{"react":">=15.0.0","react-dom":">=15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/stark-module_1.0.0-1_1587537548316_0.18629548088165637","host":"s3://npm-registry-packages"}},"1.0.0-2":{"name":"@ice/stark-module","version":"1.0.0-2","keywords":["modules","icestark"],"author":"","license":"MIT","_id":"@ice/stark-module@1.0.0-2","maintainers":[{"name":"alvinhui","email":"alvinxwt@gmail.com"},{"name":"boiawang","email":"zhengwang2314@gmail.com"},{"name":"clarkxia","email":"xiawenwu41@163.com"},{"name":"lip966","email":"wddpwzz36@gmail.com"},{"name":"oraaange","email":"oraaangecolin@gmail.com"},{"name":"sobear","email":"sobear.me@gmail.com"},{"name":"temper357","email":"temper357@gmail.com"},{"name":"yuanyan","email":"yuanyan.cao@gmail.com"},{"name":"yundong","email":"yundong.me@gmail.com"}],"homepage":"https://github.com/ice-lab/icestark#readme","bugs":{"url":"https://github.com/ice-lab/icestark/issues"},"dist":{"shasum":"4e5d0a0b847f0977748f46dc40bf1761c7d4c5f0","tarball":"https://registry.npmjs.org/@ice/stark-module/-/stark-module-1.0.0-2.tgz","fileCount":13,"integrity":"sha512-/kK/KYjISnXaDs4/RV4TvbxV6biJ9qp0d2EoagDROwWMBFFo1BS1MCjmgQ3+G7F7fvuBPFYp6t3TSxdN206yGA==","signatures":[{"sig":"MEUCIHA3nRwv1GZwyOJnBctyUO1LlxYV3Fg2e48ZlicRYa6uAiEA4Tunwd7DZ9WGXvS23eEmWRhbtgtfx+pfmCo4D9blPN8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26623,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeqOL3CRA9TVsSAnZWagAA+t0P/jJX7IcCVYkD513wb0L4\n83Q8hz7TdlcSa9J0qzuZRhRh4hWIJnbD19h07Q3VNqD2VYSLFvzGmvUz4b1B\nFeiyy5KcMB3eRyhAdIuBccGbsIUQ5GUTONQnudfS8ejnbB9N7J0JZYMsq6ms\ntf8iIJnE+uaESxnTZy5NpTLKugLuEzlUl54BSlPuu4r32Y080UHktTGhWkq8\nSvfFKKRM0zU5z4vbtNovS6WcDwMwyJq6uia8+k3P05IkeBx/0Lhc4l0Cd1+1\nefeSTDu2/wqrFfm3+bXXw6i2Ag51iuOkXtM9iQUpZjqA0Hh9k8pO8cI2owLj\nK3rWYCmDrctVIrUQAUVYZJb/n3kdPZQOH35htxTOVFZwyZHtgoX38UtSgTcu\nJjtAdvRf3GdIHOEhYJ1UW1TvNKU9lC+FwlRqhNmexScgEV6IP/Lho5EwgHX7\n7fAHhkr1jNqjNPfbEYLkZ+75z66a1dqz7UxiUKus+IT1ESfMJY3pQri3OSQA\newUJCMQ6Ks/nB9+tlOGLqOCPXjKjO2Jz5yhWT7i56tGGPC4NN3ke27GlyAvW\n6AooRZKTbTRncHb25ye5XOvPwg0WXS3MiYvQzbYl6dmGtcJe1GTB7vMJjpYX\nSW9nKf5iRVjzb7+IKzgSpsDgbczc5InhmW/zrQ1HDn3Ux41NwmKd5Lfpv/Bs\nxUQI\r\n=RHWI\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"preset":"ts-jest","collectCoverage":true,"coverageDirectory":"./coverage/"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS"}},"readme":"ERROR: No README data found!","scripts":{"test":"NODE_ENV=unittest jest","build":"rm -rf lib && tsc","watch":"tsc -w","coverage":"codecov","prepublishOnly":"npm run test && npm run build"},"_npmUser":{"name":"clarkxia","email":"xiawenwu41@gmail.com"},"repository":{"url":"git+https://github.com/ice-lab/icestark.git","type":"git"},"_npmVersion":"6.7.0","description":"toolkit for load standard micro-module","directories":{},"_nodeVersion":"11.10.1","dependencies":{"@ice/sandbox":"^1.0.3-2"},"publishConfig":{"registry":"http://registry.npmjs.com/"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^25.2.7","react":"^16.13.1","codecov":"^3.4.0","ts-jest":"^25.3.1","react-dom":"^16.13.1","typescript":"^3.8.3","@testing-library/react":"^10.0.3","@testing-library/jest-dom":"^5.5.0"},"peerDependencies":{"react":">=15.0.0","react-dom":">=15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/stark-module_1.0.0-2_1588126455555_0.11552430710595396","host":"s3://npm-registry-packages"}},"1.0.0-3":{"name":"@ice/stark-module","version":"1.0.0-3","keywords":["modules","icestark"],"author":"","license":"MIT","_id":"@ice/stark-module@1.0.0-3","maintainers":[{"name":"alvinhui","email":"alvinxwt@gmail.com"},{"name":"boiawang","email":"zhengwang2314@gmail.com"},{"name":"clarkxia","email":"xiawenwu41@163.com"},{"name":"lip966","email":"wddpwzz36@gmail.com"},{"name":"oraaange","email":"oraaangecolin@gmail.com"},{"name":"sobear","email":"sobear.me@gmail.com"},{"name":"temper357","email":"temper357@gmail.com"},{"name":"yuanyan","email":"yuanyan.cao@gmail.com"},{"name":"yundong","email":"yundong.me@gmail.com"}],"homepage":"https://github.com/ice-lab/icestark#readme","bugs":{"url":"https://github.com/ice-lab/icestark/issues"},"dist":{"shasum":"6ebee5b6b7252e17b4451d68719ac52a53a5295f","tarball":"https://registry.npmjs.org/@ice/stark-module/-/stark-module-1.0.0-3.tgz","fileCount":14,"integrity":"sha512-byIz+uYt5rRrphtkSdtpYsTVTFkkKKpCtK/l4jVCpcn5OlZt/iGXOLd2GNj3d5nHT6h4vd11Sj7v5LOf4SK+Ig==","signatures":[{"sig":"MEUCIQCK+v95zM4POGR9bnaBNIxKVT8zXr8CGhx4PHlR+zxHrAIgetLsUCg5Jev5hs6KaV+W4GYnhjvQCI8HqXeDrKNwm4E=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":30521,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeqPe5CRA9TVsSAnZWagAApWoP/R6/XZia+PihO9e28nd3\nHqyWkBI0Ycd43cXAnE5H+HqJ0ABAw0saMCyCoeMEf3dOnbOYdIPTA/f7dirC\nrt3ylcZzaP4/pmtWVnCIKe2bnlOtBLdyGdRi5tO7rEOOX0e20eQT1cxNjRGu\nh7qziuQS6KbHu9icDKw/sH+qToGlfioKf/vWgz0y2VMuWT0ODKQsXDivHyQt\n5xhTsaz2cshvOlcE6HS++NYXxXUW/G/EG4Vn/pm7Ua8Ml93PVJEMs86zIHU5\nKotx86y4jVebhR7KgpKtWnLOU6q98QLrXyu5wFsa37x7FSptJGSQ/gD5VKzh\n7FtogmNH5ACwqXIRgv4wA1ijmT3wwB0H92v23+jZVKVuuBPNfyemT74+ryG/\nDTSWfJ1fC679ytgf+RsyklzGq3kJzJYQ7+dvpn46vB2r8LHBwApGjepp+nJ5\nBcprfPgPjwO7Eff+5H6gRq8fztkp6G1vohgnHMUK7SkKuNdWZzAOeDwlg6Mj\nwY82e5Hqn8lxG3YG5Rp5E1LZEmWaAIgLa+EdGBJMi54bH9TKQkdJguSRaQlD\n/4xDLscoY9IZOnm01NlyeqXcqE4sqCSm+s5Af7Sw68YJgKJv6K4roZAZhnT3\ntpID905aq1X47ngOBxIpB7g6LBRhj4UZ3XPfBQECBcoZmsec3tMU4Ga02vGb\n54yn\r\n=CvGw\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"preset":"ts-jest","collectCoverage":true,"coverageDirectory":"./coverage/"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS"}},"readme":"# @ice/stark-module\n\n[![NPM version](https://img.shields.io/npm/v/@ice/stark-module.svg?style=flat)](https://npmjs.org/package/@ice/stark-module) [![Package Quality](https://npm.packagequality.com/shield/@ice%2Fstark-module.svg)](https://packagequality.com/#?package=@ice%2Fstark-module) [![build status](https://img.shields.io/travis/ice-lab/icestark.svg?style=flat-square)](https://travis-ci.org/ice-lab/icestark) [![Test coverage](https://img.shields.io/codecov/c/github/ice-lab/icestark.svg?style=flat-square)](https://codecov.io/gh/ice-lab/icestark) [![NPM downloads](http://img.shields.io/npm/dm/@ice/stark-module.svg?style=flat)](https://npmjs.org/package/@ice/stark-module) [![David deps](https://img.shields.io/david/ice-lab/icestark.svg?style=flat-square)](https://david-dm.org/ice-lab/icestark)\n\n## Installation\n\n```bash\n$ npm install @ice/stark-module --save\n```\n\n## Module LifeCycle\n\nspecify module lifeCycle when pack code as a micro module\n\n```js\nconst SampleComponent = () => {\n  return <div>Sample</div>;\n}\n\n// mount function will be trigger when mount micro module\nexport function mount(ModuleComponent, targetNode, props) {\n  ReactDOM.render(<ModuleComponent {...props} />, targetNode);\n}\n\n// unmount function will be trigger when unmount micro module\nexport function unmount(targetNode) {\n  ReactDOM.unmountComponentAtNode(targetNode);\n}\n\nexport default SampleComponent;\n```\n\n> pack module with module spec UMD\n\n## Usage\n\n### Basic Usage\n\n```jsx\nimport { MicroModule } from '@ice/stark-module';\n\nconst App = () => {\n  const moduleProps = {\n    name: 'moduleName',\n    url: 'https://localhost/module.js',\n  }\n  return <MicroModule {...moduleProps} />;\n}\n```\n\n### Register Modules\n\n```jsx\nimport { MicroModule, registerModules, getModules } from '@ice/stark-module';\n\nregisterModules([\n  {\n    url: 'https://localhost/module-a.js',\n    name: 'module-a',\n  },\n  {\n    url: 'https://localhost/module-b.js',\n    name: 'module-b',\n  },\n]);\n\n// get module info registered by API registerModules\nconst moduleInfo = getModules();\n\nconst App = () => {\n  // after registerMdoules, use micro module by specify module name\n  return (\n    <div>\n      <MicroModule name=\"module-a\" />\n      <MicroModule name=\"module-b\" />\n    </div>\n  );\n}\n```\n\n### Clear Modules\n\n```js\nimport { registerModules, getModules } from '@ice/stark-module';\n\nregisterModules([\n  {\n    url: 'https://localhost/module-a.js',\n    name: 'module-a',\n  },\n]);\n// clear module information registered by API registerModules including content cache\nclearModules();\n```\n\n### Custom Lifecyle\n\n```jsx\nimport { MicroModule } from '@ice/stark-module';\n\nconst App = () => {\n  const moduleProps = {\n    name: 'moduleName',\n    url: 'https://localhost/module.js',\n    mount: (ModuleComponent, mountNode) => {\n      console.log('custom mount');\n      ReactDOM.render(<ModuleComponent />, mountNode);\n    },\n  }\n  return <MicroModule {...moduleProps} />;\n}\n```\n\n### Custom mount component\n\n```jsx\nimport { mountModule, unmoutModule } from '@ice/stark-module';\n\nconst moduleInfo = {\n  name: 'moduleName',\n  url: 'https://localhost/module.js',\n};\n\nconst ModuleComponent = () => {\n  const renderNode = useRef(null);\n  useEffect(() => {\n    mountModule(moduleInfo, renderNode, {});\n    return unmoutModule(moduleInfo, renderNode);\n  }, []);\n  return (<div ref={renderNode}></div>);\n};\n```\n\n## Contributors\n\nFeel free to report any questions as an [issue](https://github.com/ice-lab/icestark/issues/new), we'd love to have your helping hand on `icestark`.\n\nIf you're interested in `icestark`, see [CONTRIBUTING.md](https://github.com/alibaba/ice/blob/master/.github/CONTRIBUTING.md) for more information to learn how to get started.\n\n## License\n\n[MIT](LICENSE)","scripts":{"test":"NODE_ENV=unittest jest","build":"rm -rf lib && tsc","watch":"tsc -w","coverage":"codecov","prepublishOnly":"npm run test && npm run build"},"_npmUser":{"name":"clarkxia","email":"xiawenwu41@gmail.com"},"repository":{"url":"git+https://github.com/ice-lab/icestark.git","type":"git"},"_npmVersion":"6.7.0","description":"toolkit for load standard micro-module","directories":{},"_nodeVersion":"11.10.1","dependencies":{"@ice/sandbox":"^1.0.3-2"},"publishConfig":{"registry":"http://registry.npmjs.com/"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.2.7","react":"^16.13.1","codecov":"^3.4.0","ts-jest":"^25.3.1","react-dom":"^16.13.1","typescript":"^3.8.3","@testing-library/react":"^10.0.3","@testing-library/jest-dom":"^5.5.0"},"peerDependencies":{"react":">=15.0.0","react-dom":">=15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/stark-module_1.0.0-3_1588131769042_0.6938141761553753","host":"s3://npm-registry-packages"}},"1.0.0-4":{"name":"@ice/stark-module","version":"1.0.0-4","keywords":["modules","icestark"],"author":"","license":"MIT","_id":"@ice/stark-module@1.0.0-4","maintainers":[{"name":"alvinhui","email":"alvinxwt@gmail.com"},{"name":"boiawang","email":"zhengwang2314@gmail.com"},{"name":"clarkxia","email":"xiawenwu41@163.com"},{"name":"lip966","email":"wddpwzz36@gmail.com"},{"name":"oraaange","email":"oraaangecolin@gmail.com"},{"name":"sobear","email":"sobear.me@gmail.com"},{"name":"temper357","email":"temper357@gmail.com"},{"name":"yuanyan","email":"yuanyan.cao@gmail.com"},{"name":"yundong","email":"yundong.me@gmail.com"}],"homepage":"https://github.com/ice-lab/icestark#readme","bugs":{"url":"https://github.com/ice-lab/icestark/issues"},"dist":{"shasum":"24ad8ec859c8f6eeb8de347d0293478be2ba4ac2","tarball":"https://registry.npmjs.org/@ice/stark-module/-/stark-module-1.0.0-4.tgz","fileCount":14,"integrity":"sha512-yB8Fs14bVApETSlQfcypjOPe031wFvmKkWSORiTSnD1UFN8+U4WKIsAhdYF7Um5cjE8of35YFctW334JH9IHMw==","signatures":[{"sig":"MEUCIDvvIJRkYTo4+6FQwdV9fFlr0UXIYQWr7ekAG35tmINdAiEAz7jG36Z37OSEPNXvRhyeapY9rMoAI+mX6JdWE0KPty8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":30645,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeqQ0kCRA9TVsSAnZWagAAAFYP/iaCYOdTISOrjUjwC0Ec\nECjQFgZD0czpLhlx5TGGRgRVX8vDRBaD7Mq2fNwHyxi7qWN6LZC2Opi02jmG\netfOarP0y2ELNnG5D8Q74Hc2VK+iXufZJx390DHRXaAqnQpQoE3aerpFPzDi\na6LbQBbWfvblUql1vV/9VQgr4K3xgwNqvQp77HQt/2TR+iElkeNEkpNk7R9L\n3HSiLT34JULu4uoAw0XD3LjCoSZNvgxuBQEbp0GZp5C44QhICCyNrbwdFHqm\npf9fx9wdP8xxBrj0xOcPnpNTzBeNTeOlkIZ2IQYU+uMu6fo54OEia0HDyTj2\nTyCeK1w5PHiXYW2AwUtOKQ/BA7G6swzf09zQ/cbzALJ9RANJ0AkCMAnV3LAn\nkoQiMfA72Aqnc+yf7H4EZbwzdWRM6AIHDuPtem9sEynn4rK2kqM/E4w6WrXU\nQrFT9nvSw3Od3USq0v8CnPTkdbko8J4AhtWlG0cXdMsk4ybU0SLTw66BAOaR\nayEh2I7cIdnBeIGjHnRJf/E88v0TbVH9yseuPBsCGNk30KMbAG0WcSEwprcx\n0X+mxzgIjBv6QM+c33jlcM2gmCBCQimg1x2QMssgQSdRkksehj3Sw+LbIgM6\nWffnMwO3Ktp3o9kbvWf0DWnd+qwHi9JkbYH1yImEKQPkfqt+okBwxYTJ4wZv\nF3Ot\r\n=2HCw\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"preset":"ts-jest","collectCoverage":true,"coverageDirectory":"./coverage/"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS"}},"scripts":{"test":"NODE_ENV=unittest jest","build":"rm -rf lib && tsc","watch":"tsc -w","coverage":"codecov","prepublishOnly":"npm run test && npm run build"},"_npmUser":{"name":"clarkxia","email":"xiawenwu41@gmail.com"},"repository":{"url":"git+https://github.com/ice-lab/icestark.git","type":"git"},"_npmVersion":"6.7.0","description":"toolkit for load standard micro-module","directories":{},"_nodeVersion":"11.10.1","dependencies":{"@ice/sandbox":"^1.0.3-2"},"publishConfig":{"registry":"http://registry.npmjs.com/"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^25.2.7","react":"^16.13.1","codecov":"^3.4.0","ts-jest":"^25.3.1","react-dom":"^16.13.1","typescript":"^3.8.3","@testing-library/react":"^10.0.3","@testing-library/jest-dom":"^5.5.0"},"peerDependencies":{"react":">=15.0.0","react-dom":">=15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/stark-module_1.0.0-4_1588137251883_0.22122184415891222","host":"s3://npm-registry-packages"}},"1.0.0":{"name":"@ice/stark-module","version":"1.0.0","keywords":["modules","icestark"],"author":"","license":"MIT","_id":"@ice/stark-module@1.0.0","maintainers":[{"name":"alvinhui","email":"alvinxwt@gmail.com"},{"name":"boiawang","email":"zhengwang2314@gmail.com"},{"name":"clarkxia","email":"xiawenwu41@163.com"},{"name":"lip966","email":"wddpwzz36@gmail.com"},{"name":"oraaange","email":"oraaangecolin@gmail.com"},{"name":"sobear","email":"sobear.me@gmail.com"},{"name":"temper357","email":"temper357@gmail.com"},{"name":"yuanyan","email":"yuanyan.cao@gmail.com"},{"name":"yundong","email":"yundong.me@gmail.com"}],"homepage":"https://github.com/ice-lab/icestark#readme","bugs":{"url":"https://github.com/ice-lab/icestark/issues"},"dist":{"shasum":"e0f8f3373caad587081e855ef19da8f9ce47daa2","tarball":"https://registry.npmjs.org/@ice/stark-module/-/stark-module-1.0.0.tgz","fileCount":14,"integrity":"sha512-nQvkFzZMqRUfK1Wb/eAydqnP2NJnhsIup3rIwyCNTz0auaegjcir/20vm9WJVr6d50p6rk06c3BE8lPBAaewpA==","signatures":[{"sig":"MEQCIA7hWLsO87l85V9YJ7dCYbyDlSzIsHC7qeQXEWniuhDUAiBoaTkfsKrStkthQ7xM2vjXgKVd7Ww/71ubPL1Ar2ECVQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":30617,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeqRGwCRA9TVsSAnZWagAAeRMP/jnzefZ00xpF+zCYB3Ce\nAfjbA9ZKpkXYqAx7jEKsP8dCB4s1I4pny6YDdCfAXn+agPJ4xvMMnPzfBom3\nHsKK6saQYVvshCO4RkGfN7jGHV5Mx/KlGJP6l2ALwptmbVsZ8nF9+8BynPpq\nfYtWs6CEtsu/GW9CPWMNl6ijXVyx4bgDHLHhWv7/rtAI05ipHlO8vTnpBe/X\nfoynn9z2GSOZhYUaoGWPZYDFziLB2QWVZkx6ANw1ByEz1UD41PIhxavLxh1x\n3vgbyiPXCBFMdywRX+J41CSjjnx4ZIW+zvbxIwTmhfe9ineNaLssuIcfFYIC\ni8LA1sGm0V+PsQdTKNcAqZcjuDEdS6YhGI5PoqB2EpeeaA24rCKp8NxXuwR7\n6M2sv9MJg3z8QEFwKe9HxHk1TpYgeAWM1dNg0chc60p5wILIaucplrNd9QWa\no5h4KiWJsguSgKkVEchedMxQ9emZ105V3lFA5sGg4dBsR7UTt6thv7xFkUsR\nFq9VsYNITPMxpRihiBFVICXbYqlQyKEz3ayuzY9oRDphN9EpXiyGSfLJc7u7\nWUiyswrh5dybI26yMvHv86CE++5fGbVOSFtUv/3LYSzXnItc4qstx3F5aiRx\niWyImtyPUFSl8PumN+7Gg6tyI02ax8kYQNx9m9jK5g1HnSdrf9PzyQc4IKw/\nMQwl\r\n=U5es\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"preset":"ts-jest","collectCoverage":true,"coverageDirectory":"./coverage/"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS"}},"scripts":{"test":"NODE_ENV=unittest jest","build":"rm -rf lib && tsc","watch":"tsc -w","coverage":"codecov","prepublishOnly":"npm run test && npm run build"},"_npmUser":{"name":"clarkxia","email":"xiawenwu41@gmail.com"},"repository":{"url":"git+https://github.com/ice-lab/icestark.git","type":"git"},"_npmVersion":"6.7.0","description":"toolkit for load standard micro-module","directories":{},"_nodeVersion":"11.10.1","dependencies":{"@ice/sandbox":"^1.0.3-2"},"publishConfig":{"registry":"http://registry.npmjs.com/"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^25.2.7","react":"^16.13.1","codecov":"^3.4.0","ts-jest":"^25.3.1","react-dom":"^16.13.1","typescript":"^3.8.3","@testing-library/react":"^10.0.3","@testing-library/jest-dom":"^5.5.0"},"peerDependencies":{"react":">=15.0.0","react-dom":">=15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/stark-module_1.0.0_1588138415593_0.532588472804282","host":"s3://npm-registry-packages"}},"1.0.1":{"name":"@ice/stark-module","version":"1.0.1","keywords":["modules","icestark"],"author":"","license":"MIT","_id":"@ice/stark-module@1.0.1","maintainers":[{"name":"alvinhui","email":"alvinxwt@gmail.com"},{"name":"boiawang","email":"zhengwang2314@gmail.com"},{"name":"clarkxia","email":"xiawenwu41@163.com"},{"name":"lip966","email":"wddpwzz36@gmail.com"},{"name":"oraaange","email":"oraaangecolin@gmail.com"},{"name":"sobear","email":"sobear.me@gmail.com"},{"name":"temper357","email":"temper357@gmail.com"},{"name":"yuanyan","email":"yuanyan.cao@gmail.com"},{"name":"yundong","email":"yundong.me@gmail.com"}],"homepage":"https://github.com/ice-lab/icestark#readme","bugs":{"url":"https://github.com/ice-lab/icestark/issues"},"dist":{"shasum":"c4ab4260945b0056900c9aadbfa6e5afbd77dc26","tarball":"https://registry.npmjs.org/@ice/stark-module/-/stark-module-1.0.1.tgz","fileCount":14,"integrity":"sha512-z4PLyLSv0jlQadM3i6V/tHQ1JcVXi66OigXTU8IkLZbietb+PvVIylGlZLQ1545F24ZqZnivzkbWA5EkMlLvwg==","signatures":[{"sig":"MEYCIQCd6ERbgYJxb8hL5bXr1Kf+W9vSSiyCeOghmoF0hnKkJQIhAPX8o/DMUaJToM+wpEIII32E43wOxHdIXJdoQSKBvpJM","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":30615,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeqRNuCRA9TVsSAnZWagAAifUP/issuRk/zKTiSj+/IoCm\not1f8arEng1j5Jks3q+qREOuh2sa9PjjrZtpHIrMdoRKDyI1RFLtGvWizpcM\n0LXEEAot4dfqVWmWcZ5cXnbojFk8eF01FOwZLzUvfwII9qRrO+eGvR0vkC8f\n6lJXdAX3HRT4vntjc/Iwh7m3Z/bW66WrSlsdS3/juGSJwoBH0sPChuExpVyV\nNA/WlJYg/Va/ENYOzv0oA49QOM3NVtvOSAx/nfAUHpJDsoY186nwd5t7Ka0M\nJTe2vEDmmnThS9vybM7irGnEt2EwfyPuCkB+JzaYelGvmQK3owwVrJlI7KSS\nkWqrBI6CqrvVUrEU8EFCjOvngDsooacpid0pbvuD5Z7RFnRuLxtiJUisGIvy\nRRVoLxpZDG9drR5PEB3ZRBp43kkyg0I83blrgJVi+YeDUrdxnNa9ZBSMbwqA\noHxr+yrSdTSpGtQFZYcePIqpu7tJuklxQ+GVbAe8Fq10uBy/G4OPmbUN6Xf5\nLe4qoPXCaTH1LwZNFxv+goJu8XcWJyyKbblFSIG6xQArTLRuhAS2rYu5lmHr\nl/umIOO+Mtb6g7gpaQ5FIJNjcswTAKu43ELKShE8mwpsY3j4sD8NN2MvU3ml\n5Yo94XCzpIs3C+LUA9zFN/B8KEqK62za+u6poTb7O57fC81N7xKBPNolz8ZE\nat6V\r\n=u3uC\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"preset":"ts-jest","collectCoverage":true,"coverageDirectory":"./coverage/"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS"}},"scripts":{"test":"NODE_ENV=unittest jest","build":"rm -rf lib && tsc","watch":"tsc -w","coverage":"codecov","prepublishOnly":"npm run test && npm run build"},"_npmUser":{"name":"clarkxia","email":"xiawenwu41@gmail.com"},"repository":{"url":"git+https://github.com/ice-lab/icestark.git","type":"git"},"_npmVersion":"6.7.0","description":"toolkit for load standard micro-module","directories":{},"_nodeVersion":"11.10.1","dependencies":{"@ice/sandbox":"^1.0.3"},"publishConfig":{"registry":"http://registry.npmjs.com/"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^25.2.7","react":"^16.13.1","codecov":"^3.4.0","ts-jest":"^25.3.1","react-dom":"^16.13.1","typescript":"^3.8.3","@testing-library/react":"^10.0.3","@testing-library/jest-dom":"^5.5.0"},"peerDependencies":{"react":">=15.0.0","react-dom":">=15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/stark-module_1.0.1_1588138862202_0.6300733738657289","host":"s3://npm-registry-packages"}},"1.0.2-0":{"name":"@ice/stark-module","version":"1.0.2-0","keywords":["modules","icestark"],"author":"","license":"MIT","_id":"@ice/stark-module@1.0.2-0","maintainers":[{"name":"alvinhui","email":"alvinxwt@gmail.com"},{"name":"boiawang","email":"zhengwang2314@gmail.com"},{"name":"clarkxia","email":"xiawenwu41@163.com"},{"name":"lip966","email":"wddpwzz36@gmail.com"},{"name":"oraaange","email":"oraaangecolin@gmail.com"},{"name":"sobear","email":"sobear.me@gmail.com"},{"name":"temper357","email":"temper357@gmail.com"},{"name":"yuanyan","email":"yuanyan.cao@gmail.com"},{"name":"yundong","email":"yundong.me@gmail.com"}],"homepage":"https://github.com/ice-lab/icestark#readme","bugs":{"url":"https://github.com/ice-lab/icestark/issues"},"dist":{"shasum":"74b3975b75f8332e3235266ac82e1a9e802f15cb","tarball":"https://registry.npmjs.org/@ice/stark-module/-/stark-module-1.0.2-0.tgz","fileCount":14,"integrity":"sha512-ZtOuBgaqHH1+/s15kWO3uc+5D3/ab0SwY0EnbwWl2UFhWEDb/x87oiGbmFvJHzyfwp8u9rvI4wkU0S12zmFzKg==","signatures":[{"sig":"MEUCIQCs6S8DdVp7SQWVOj2D9A1UZQlVtpwPK+l4U90/7Ko4iAIgfZjiFeDZRNRS6IxBdho7VNX4t308Ylp8heHOTLjGou4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":36548,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJes37oCRA9TVsSAnZWagAAZs8P/ikwxh4DDdHFiKJjlwOX\ne0GEu4ghVTBLrN+IiDqWPN4XaZqVhEECff8GnayMHS1oXF78vXp+6tJOligO\nsyI0zIIzocj/kB8Xd9Tj5TMGGvSORFy7E9ck1bru1XuGfJnU90j9q3Ll4vvE\nqaLlbbuLo90T4EVdQQAXet8DA9Q4G+npn1mlWPX6ArcSF5bUqboroRuISd1a\npvOkI9miceU7y95bjqIE9GZU2scF0um0iEVEL/ShZjU/IPFec7gEaiXxRIUV\nu/YVPV0jE/qqDM+kk0bl3Pi/aOmek48pqJeiPqVF9ToETY/9m4nMrXdPMtxG\nJLF1fq5fgvYGv0S6FA9fEQHa4lBXAjNyULYUM8r5jx+Spwqz73ExS714pAu4\nnEELNkhOuip/6FSSmtVzLm/6B23cDN0t51RRgiiTm88aoDa5URckJiluJ7T2\n4V0lfaUp6PSWDX3JWZ9JBH7kuh92+yasfYdNCquEf6LSGddjTNSJlxbtQPt9\ndIZSL8BV5/r7VGPvfswIYaCh5BYOcs1WanyoUOq0+HmC+F+cMTHgD3WO4TUN\n+lkrIyhsSe6WJ+5+elqvMH72cQwYvH9LHoWtSeAgJoWxjmU2LDxkZH2mPpGI\nFpwCp6sN5HV6OhrCq24EmDylRTBNh3teypJJSRcVn7XP/PowL3ff6HYbc/Uo\n5iAn\r\n=5bgw\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"preset":"ts-jest","collectCoverage":true,"coverageDirectory":"./coverage/"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS"}},"readme":"# @ice/stark-module\n\n[![NPM version](https://img.shields.io/npm/v/@ice/stark-module.svg?style=flat)](https://npmjs.org/package/@ice/stark-module) [![Package Quality](https://npm.packagequality.com/shield/@ice%2Fstark-module.svg)](https://packagequality.com/#?package=@ice%2Fstark-module) [![build status](https://img.shields.io/travis/ice-lab/icestark.svg?style=flat-square)](https://travis-ci.org/ice-lab/icestark) [![Test coverage](https://img.shields.io/codecov/c/github/ice-lab/icestark.svg?style=flat-square)](https://codecov.io/gh/ice-lab/icestark) [![NPM downloads](http://img.shields.io/npm/dm/@ice/stark-module.svg?style=flat)](https://npmjs.org/package/@ice/stark-module) [![David deps](https://img.shields.io/david/ice-lab/icestark.svg?style=flat-square)](https://david-dm.org/ice-lab/icestark)\n\n## Installation\n\n```bash\n$ npm install @ice/stark-module --save\n```\n\n## Module LifeCycle\n\nspecify module lifeCycle when pack code as a micro module\n\n```js\nconst SampleComponent = () => {\n  return <div>Sample</div>;\n}\n\n// mount function will be trigger when mount micro module\nexport function mount(ModuleComponent, targetNode, props) {\n  ReactDOM.render(<ModuleComponent {...props} />, targetNode);\n}\n\n// unmount function will be trigger when unmount micro module\nexport function unmount(targetNode) {\n  ReactDOM.unmountComponentAtNode(targetNode);\n}\n\nexport default SampleComponent;\n```\n\n> pack module with module spec UMD\n\n## Usage\n\n### Basic Usage\n\n```jsx\nimport { MicroModule } from '@ice/stark-module';\n\nconst App = () => {\n  const moduleInfo = {\n    name: 'moduleName',\n    url: 'https://localhost/module.js',\n  }\n  return <MicroModule moduleInfo={moduleInfo} />;\n}\n```\n\n### Register Modules\n\n```jsx\nimport { MicroModule, registerModules, getModules } from '@ice/stark-module';\n\nregisterModules([\n  {\n    url: 'https://localhost/module-a.js',\n    name: 'module-a',\n  },\n  {\n    url: 'https://localhost/module-b.js',\n    name: 'module-b',\n  },\n]);\n\n// get module info registered by API registerModules\nconst moduleInfo = getModules();\n\nconst App = () => {\n  // after registerMdoules, use micro module by specify module name\n  return (\n    <div>\n      <MicroModule moduleName=\"module-a\" />\n      <MicroModule moduleName=\"module-b\" />\n    </div>\n  );\n}\n```\n\n### Clear Modules\n\n```js\nimport { registerModules, getModules } from '@ice/stark-module';\n\nregisterModules([\n  {\n    url: 'https://localhost/module-a.js',\n    name: 'module-a',\n  },\n]);\n// clear module information registered by API registerModules including content cache\nclearModules();\n```\n\n### Custom Lifecyle\n\n```jsx\nimport { MicroModule } from '@ice/stark-module';\n\nconst App = () => {\n  const moduleInfo = {\n    name: 'moduleName',\n    url: 'https://localhost/module.js',\n    mount: (ModuleComponent, mountNode) => {\n      console.log('custom mount');\n      ReactDOM.render(<ModuleComponent />, mountNode);\n    },\n  }\n  return <MicroModule moduleInfo={moduleInfo} />;\n}\n```\n\n### Custom mount component\n\n```jsx\nimport { mountModule, unmoutModule } from '@ice/stark-module';\n\nconst moduleInfo = {\n  name: 'moduleName',\n  url: 'https://localhost/module.js',\n};\n\nconst ModuleComponent = () => {\n  const renderNode = useRef(null);\n  useEffect(() => {\n    mountModule(moduleInfo, renderNode, {});\n    return unmoutModule(moduleInfo, renderNode);\n  }, []);\n  return (<div ref={renderNode}></div>);\n};\n```\n\n## Contributors\n\nFeel free to report any questions as an [issue](https://github.com/ice-lab/icestark/issues/new), we'd love to have your helping hand on `icestark`.\n\nIf you're interested in `icestark`, see [CONTRIBUTING.md](https://github.com/alibaba/ice/blob/master/.github/CONTRIBUTING.md) for more information to learn how to get started.\n\n## License\n\n[MIT](LICENSE)","scripts":{"test":"NODE_ENV=unittest jest","build":"rm -rf lib && tsc","watch":"tsc -w","coverage":"codecov","prepublishOnly":"npm run test && npm run build"},"_npmUser":{"name":"clarkxia","email":"xiawenwu41@gmail.com"},"repository":{"url":"git+https://github.com/ice-lab/icestark.git","type":"git"},"_npmVersion":"6.7.0","description":"toolkit for load standard micro-module","directories":{},"_nodeVersion":"11.10.1","dependencies":{"@ice/sandbox":"^1.0.3"},"publishConfig":{"registry":"http://registry.npmjs.com/"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.2.7","react":"^16.13.1","codecov":"^3.4.0","ts-jest":"^25.3.1","react-dom":"^16.13.1","typescript":"^3.8.3","@testing-library/react":"^10.0.3","@testing-library/jest-dom":"^5.5.0"},"peerDependencies":{"react":">=15.0.0","react-dom":">=15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/stark-module_1.0.2-0_1588821735865_0.8504618500191381","host":"s3://npm-registry-packages"}},"1.0.2-1":{"name":"@ice/stark-module","version":"1.0.2-1","keywords":["modules","icestark"],"author":"","license":"MIT","_id":"@ice/stark-module@1.0.2-1","maintainers":[{"name":"alvinhui","email":"alvinxwt@gmail.com"},{"name":"boiawang","email":"zhengwang2314@gmail.com"},{"name":"clarkxia","email":"xiawenwu41@163.com"},{"name":"lip966","email":"wddpwzz36@gmail.com"},{"name":"oraaange","email":"oraaangecolin@gmail.com"},{"name":"sobear","email":"sobear.me@gmail.com"},{"name":"temper357","email":"temper357@gmail.com"},{"name":"yuanyan","email":"yuanyan.cao@gmail.com"},{"name":"yundong","email":"yundong.me@gmail.com"}],"homepage":"https://github.com/ice-lab/icestark#readme","bugs":{"url":"https://github.com/ice-lab/icestark/issues"},"dist":{"shasum":"d4389b10e7eff57e0dcfcc2ee5ee4d6c8a522b8e","tarball":"https://registry.npmjs.org/@ice/stark-module/-/stark-module-1.0.2-1.tgz","fileCount":14,"integrity":"sha512-hI7nXYQuIxS0pSEcU4aMkTY3sYl7nRdx0v6YciLlZpQe3RTmO9BE0Uhevgk6YmOBMEtukr1Mr77M69Zq1V0LHA==","signatures":[{"sig":"MEQCIDmw3itlTvTxiMuaPg/laiBd9WTrHTzVCTTi9qj5riD0AiAIZrrpu9zTu+ZuwHjBginbfmCohrtK40Yh0gLKc+asXQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":36982,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJetP7iCRA9TVsSAnZWagAA5qUP+waX2k76mTOuww72k2Fi\nA5wyETicy/A7c6BxREvbT90jsIjeACCkTMf32WzYNiaRHBYtw4xv706+wHE0\ncLF54bQ8FHF/OoSj/F1wt+0oAqAz75UHl2TxaH3ZmZtKkdevIl/I84JkPuc3\nqppQ43Uy2VL1yaetxhq1aPwyqRdMXuBctpbSmbxglxe1XEmLeNoBoE+Pm+h3\n6mFxKLnbidwgphhqxynZA2FupHwN0oPrO6xwNwiumUwfif06x6Vx0KEAkNRr\n5Jxqv/yYOlj4d6A9RjBQ6+AGKVcC+UWb5c2fOHJYFcjnU6Y5VyO0obBYtfeR\nG5zj4no1+ql6jZRwvsO+bbBiv3H3urLwA4L7/wRWSe/usKuc90QFxWTYiyS6\n269zMz7rmDvO2M5Sk8w8n51KrNZCJs54ZdfZjtcUSr90rBQLmnDDCBDxDzJX\nd24tEnDZDo+CTydCmH12uEjbK/bTWzgCSXu4neoLsSGb0Aazo6ResEQ0MMgo\ngrGWl3tsJ5ogh/KmTasf2SbZ/nABggRni/iS1U/VSNgDIQ+aE1ftMuKJQCTV\nbEyNyFxzYE9WgSgmC1V9RB7F/S86ELyDPGk1DrUX2X5FDG2ChAz2jnvhTerZ\nmHSdFHi4wIyYIAuK+N8uAfegTp0JfR7tKZrRT4KB+jDi9Ks2Uc2DLXEvWJGu\nO5s2\r\n=XQ2U\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"preset":"ts-jest","collectCoverage":true,"coverageDirectory":"./coverage/"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS"}},"readme":"# @ice/stark-module\n\n[![NPM version](https://img.shields.io/npm/v/@ice/stark-module.svg?style=flat)](https://npmjs.org/package/@ice/stark-module) [![Package Quality](https://npm.packagequality.com/shield/@ice%2Fstark-module.svg)](https://packagequality.com/#?package=@ice%2Fstark-module) [![build status](https://img.shields.io/travis/ice-lab/icestark.svg?style=flat-square)](https://travis-ci.org/ice-lab/icestark) [![Test coverage](https://img.shields.io/codecov/c/github/ice-lab/icestark.svg?style=flat-square)](https://codecov.io/gh/ice-lab/icestark) [![NPM downloads](http://img.shields.io/npm/dm/@ice/stark-module.svg?style=flat)](https://npmjs.org/package/@ice/stark-module) [![David deps](https://img.shields.io/david/ice-lab/icestark.svg?style=flat-square)](https://david-dm.org/ice-lab/icestark)\n\n## Installation\n\n```bash\n$ npm install @ice/stark-module --save\n```\n\n## Module LifeCycle\n\nspecify module lifeCycle when pack code as a micro module\n\n```js\nconst SampleComponent = () => {\n  return <div>Sample</div>;\n}\n\n// mount function will be trigger when mount micro module\nexport function mount(ModuleComponent, targetNode, props) {\n  ReactDOM.render(<ModuleComponent {...props} />, targetNode);\n}\n\n// unmount function will be trigger when unmount micro module\nexport function unmount(targetNode) {\n  ReactDOM.unmountComponentAtNode(targetNode);\n}\n\nexport default SampleComponent;\n```\n\n> pack module with module spec UMD\n\n## Usage\n\n### Basic Usage\n\n```jsx\nimport { MicroModule } from '@ice/stark-module';\n\nconst App = () => {\n  const moduleInfo = {\n    name: 'moduleName',\n    url: 'https://localhost/module.js',\n  }\n  return <MicroModule moduleInfo={moduleInfo} />;\n}\n```\n\n### Register Modules\n\n```jsx\nimport { MicroModule, registerModules, getModules } from '@ice/stark-module';\n\nregisterModules([\n  {\n    url: 'https://localhost/module-a.js',\n    name: 'module-a',\n  },\n  {\n    url: 'https://localhost/module-b.js',\n    name: 'module-b',\n  },\n]);\n\n// get module info registered by API registerModules\nconst moduleInfo = getModules();\n\nconst App = () => {\n  // after registerMdoules, use micro module by specify module name\n  return (\n    <div>\n      <MicroModule moduleName=\"module-a\" />\n      <MicroModule moduleName=\"module-b\" />\n    </div>\n  );\n}\n```\n\n### Clear Modules\n\n```js\nimport { registerModules, getModules } from '@ice/stark-module';\n\nregisterModules([\n  {\n    url: 'https://localhost/module-a.js',\n    name: 'module-a',\n  },\n]);\n// clear module information registered by API registerModules including content cache\nclearModules();\n```\n\n### Custom Lifecyle\n\n```jsx\nimport { MicroModule } from '@ice/stark-module';\n\nconst App = () => {\n  const moduleInfo = {\n    name: 'moduleName',\n    url: 'https://localhost/module.js',\n    mount: (ModuleComponent, mountNode) => {\n      console.log('custom mount');\n      ReactDOM.render(<ModuleComponent />, mountNode);\n    },\n  }\n  return <MicroModule moduleInfo={moduleInfo} />;\n}\n```\n\n### Custom mount component\n\n```jsx\nimport { mountModule, unmoutModule } from '@ice/stark-module';\n\nconst moduleInfo = {\n  name: 'moduleName',\n  url: 'https://localhost/module.js',\n};\n\nconst ModuleComponent = () => {\n  const renderNode = useRef(null);\n  useEffect(() => {\n    mountModule(moduleInfo, renderNode, {});\n    return unmoutModule(moduleInfo, renderNode);\n  }, []);\n  return (<div ref={renderNode}></div>);\n};\n```\n\n## Contributors\n\nFeel free to report any questions as an [issue](https://github.com/ice-lab/icestark/issues/new), we'd love to have your helping hand on `icestark`.\n\nIf you're interested in `icestark`, see [CONTRIBUTING.md](https://github.com/alibaba/ice/blob/master/.github/CONTRIBUTING.md) for more information to learn how to get started.\n\n## License\n\n[MIT](LICENSE)","scripts":{"test":"NODE_ENV=unittest jest","build":"rm -rf lib && tsc","watch":"tsc -w","coverage":"codecov","prepublishOnly":"npm run test && npm run build"},"_npmUser":{"name":"clarkxia","email":"xiawenwu41@gmail.com"},"repository":{"url":"git+https://github.com/ice-lab/icestark.git","type":"git"},"_npmVersion":"6.7.0","description":"toolkit for load standard micro-module","directories":{},"_nodeVersion":"11.10.1","dependencies":{"@ice/sandbox":"^1.0.4-0"},"publishConfig":{"registry":"http://registry.npmjs.com/"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.2.7","react":"^16.13.1","codecov":"^3.4.0","ts-jest":"^25.3.1","react-dom":"^16.13.1","typescript":"^3.8.3","@testing-library/react":"^10.0.3","@testing-library/jest-dom":"^5.5.0"},"peerDependencies":{"react":">=15.0.0","react-dom":">=15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/stark-module_1.0.2-1_1588920033959_0.3222970335888833","host":"s3://npm-registry-packages"}},"1.1.0-0":{"name":"@ice/stark-module","version":"1.1.0-0","keywords":["modules","icestark"],"author":"","license":"MIT","_id":"@ice/stark-module@1.1.0-0","maintainers":[{"name":"alvinhui","email":"alvinxwt@gmail.com"},{"name":"boiawang","email":"zhengwang2314@gmail.com"},{"name":"clarkxia","email":"xiawenwu41@163.com"},{"name":"lip966","email":"wddpwzz36@gmail.com"},{"name":"oraaange","email":"oraaangecolin@gmail.com"},{"name":"sobear","email":"sobear.me@gmail.com"},{"name":"temper357","email":"temper357@gmail.com"},{"name":"yuanyan","email":"yuanyan.cao@gmail.com"},{"name":"yundong","email":"yundong.me@gmail.com"}],"homepage":"https://github.com/ice-lab/icestark#readme","bugs":{"url":"https://github.com/ice-lab/icestark/issues"},"dist":{"shasum":"1e6b63df32a24dec3a31202a0e060fc928d470ad","tarball":"https://registry.npmjs.org/@ice/stark-module/-/stark-module-1.1.0-0.tgz","fileCount":14,"integrity":"sha512-nbOUcQRFaxeYTs4IQIXQLebi2XrACqTnsrXABiUL17bqcUvaDi7ycc13uBFIDkgFnlx0tqDF7Ed8RK8ao6ngpA==","signatures":[{"sig":"MEYCIQDZCstR72nigEm2grL1/G3w3YvaKTudhbAzd81jk/NIygIhAPxmw5gULLhbmiHnKJ5wvhu6Yy/1s21CwXKTuLPiNn5w","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":39909,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJevNb1CRA9TVsSAnZWagAA+zwP/0BlxusPcY6nwtSs4Lbp\nAo0LQiSv2R4Xd2Ih5AaLQ+6Q6lbHsc1tD7pi27ApXrJ9rklxLyjEgOPOXv/6\ncJj5GknWAJLcb8f5GALkbqryImd1C9ZwKNOr36lVlmLC1QWQsnVGHglHCf5K\nHe95NveT4ShQKBGBXiEZp9m87pZXhIy2atdDmLQBDvAnFpFE+zMEAp0bwVlX\nkCIafnMyPeXme5zMQ5dcZ8ODnr9/s0Yc2Z6/QUH10mTz7uKTBePQSjbDf/vS\nJP2q7DdDCyAphzKLgPrv99bDByy+q9DzkEeYOzDmIPtVXeF2i5oEqbSwzqmW\nbwNUwz4bMR5XX8YeSh5r1vJbz3bElVmS1s5RnVIJvXq9wATjcBpTsDK+fW0f\nczkCKNltYM4E8UD3ZRxqu5uloeRC82aX/LbFQNR8pFPL59iaTif6hQcI3D+7\nJqyWIxbYSlnEh89U4zA93LknfwrO0IlaiRAan39tbZnxk7LqvJ2S7bC32Kr9\nshTfA/IBJZbEnZ0cKlWwu9MPqg/bLF2E0YqGRK9jNS0dFTQamAN3nqlYb55E\naHgVgR2Aqyuu9065MPlgSG9xzA4Ix9CnU0HL+7pr6jDQ4sysrhTlvGCzh3Ru\ns+E4kdDaouQvnZ1UtBez0WLt/7grCiqz5d/7/2BmC1epDV/+izwSNZ7ZZQLy\nD11f\r\n=UktV\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"preset":"ts-jest","collectCoverage":true,"coverageDirectory":"./coverage/"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS"}},"readme":"# @ice/stark-module\n\n[![NPM version](https://img.shields.io/npm/v/@ice/stark-module.svg?style=flat)](https://npmjs.org/package/@ice/stark-module) [![Package Quality](https://npm.packagequality.com/shield/@ice%2Fstark-module.svg)](https://packagequality.com/#?package=@ice%2Fstark-module) [![build status](https://img.shields.io/travis/ice-lab/icestark.svg?style=flat-square)](https://travis-ci.org/ice-lab/icestark) [![Test coverage](https://img.shields.io/codecov/c/github/ice-lab/icestark.svg?style=flat-square)](https://codecov.io/gh/ice-lab/icestark) [![NPM downloads](http://img.shields.io/npm/dm/@ice/stark-module.svg?style=flat)](https://npmjs.org/package/@ice/stark-module) [![David deps](https://img.shields.io/david/ice-lab/icestark.svg?style=flat-square)](https://david-dm.org/ice-lab/icestark)\n\n## Installation\n\n```bash\n$ npm install @ice/stark-module --save\n```\n\n## Module LifeCycle\n\nspecify module lifeCycle when pack code as a micro module\n\n```js\nconst SampleComponent = () => {\n  return <div>Sample</div>;\n}\n\n// mount function will be trigger when mount micro module\nexport function mount(ModuleComponent, targetNode, props) {\n  ReactDOM.render(<ModuleComponent {...props} />, targetNode);\n}\n\n// unmount function will be trigger when unmount micro module\nexport function unmount(targetNode) {\n  ReactDOM.unmountComponentAtNode(targetNode);\n}\n\nexport default SampleComponent;\n```\n\n> pack module with module spec UMD\n\n## Usage\n\n### Basic Usage\n\n```jsx\nimport { MicroModule } from '@ice/stark-module';\n\nconst App = () => {\n  const moduleInfo = {\n    name: 'moduleName',\n    url: 'https://localhost/module.js',\n  }\n  return <MicroModule moduleInfo={moduleInfo} />;\n}\n```\n\n### Register Modules\n\n```jsx\nimport { MicroModule, registerModules, getModules } from '@ice/stark-module';\n\nregisterModules([\n  {\n    url: 'https://localhost/module-a.js',\n    name: 'module-a',\n  },\n  {\n    url: 'https://localhost/module-b.js',\n    name: 'module-b',\n  },\n]);\n\n// get module info registered by API registerModules\nconst moduleInfo = getModules();\n\nconst App = () => {\n  // after registerMdoules, use micro module by specify module name\n  return (\n    <div>\n      <MicroModule moduleName=\"module-a\" />\n      <MicroModule moduleName=\"module-b\" />\n    </div>\n  );\n}\n```\n\n### Clear Modules\n\n```js\nimport { registerModules, getModules } from '@ice/stark-module';\n\nregisterModules([\n  {\n    url: 'https://localhost/module-a.js',\n    name: 'module-a',\n  },\n]);\n// clear module information registered by API registerModules including content cache\nclearModules();\n```\n\n### Custom Lifecyle\n\n```jsx\nimport { MicroModule } from '@ice/stark-module';\n\nconst App = () => {\n  const moduleInfo = {\n    name: 'moduleName',\n    url: 'https://localhost/module.js',\n    mount: (ModuleComponent, mountNode) => {\n      console.log('custom mount');\n      ReactDOM.render(<ModuleComponent />, mountNode);\n    },\n  }\n  return <MicroModule moduleInfo={moduleInfo} />;\n}\n```\n\n### Custom mount component\n\n```jsx\nimport { mountModule, unmoutModule } from '@ice/stark-module';\n\nconst moduleInfo = {\n  name: 'moduleName',\n  url: 'https://localhost/module.js',\n};\n\nconst ModuleComponent = () => {\n  const renderNode = useRef(null);\n  useEffect(() => {\n    mountModule(moduleInfo, renderNode, {});\n    return unmoutModule(moduleInfo, renderNode);\n  }, []);\n  return (<div ref={renderNode}></div>);\n};\n```\n\n## Contributors\n\nFeel free to report any questions as an [issue](https://github.com/ice-lab/icestark/issues/new), we'd love to have your helping hand on `icestark`.\n\nIf you're interested in `icestark`, see [CONTRIBUTING.md](https://github.com/alibaba/ice/blob/master/.github/CONTRIBUTING.md) for more information to learn how to get started.\n\n## License\n\n[MIT](LICENSE)","scripts":{"test":"NODE_ENV=unittest jest","build":"rm -rf lib && tsc","watch":"tsc -w","coverage":"codecov","prepublishOnly":"npm run test && npm run build"},"_npmUser":{"name":"clarkxia","email":"xiawenwu41@gmail.com"},"repository":{"url":"git+https://github.com/ice-lab/icestark.git","type":"git"},"_npmVersion":"6.7.0","description":"toolkit for load standard micro-module","directories":{},"_nodeVersion":"11.10.1","dependencies":{"@ice/sandbox":"^1.0.4-0"},"publishConfig":{"registry":"http://registry.npmjs.com/"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.2.7","react":"^16.13.1","codecov":"^3.4.0","ts-jest":"^25.3.1","react-dom":"^16.13.1","typescript":"^3.8.3","@testing-library/react":"^10.0.3","@testing-library/jest-dom":"^5.5.0"},"peerDependencies":{"react":">=15.0.0","react-dom":">=15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/stark-module_1.1.0-0_1589434101448_0.6218279666024433","host":"s3://npm-registry-packages"}},"1.1.0-1":{"name":"@ice/stark-module","version":"1.1.0-1","keywords":["modules","icestark"],"author":"","license":"MIT","_id":"@ice/stark-module@1.1.0-1","maintainers":[{"name":"alvinhui","email":"alvinxwt@gmail.com"},{"name":"boiawang","email":"zhengwang2314@gmail.com"},{"name":"clarkxia","email":"xiawenwu41@163.com"},{"name":"lip966","email":"wddpwzz36@gmail.com"},{"name":"oraaange","email":"oraaangecolin@gmail.com"},{"name":"sobear","email":"sobear.me@gmail.com"},{"name":"temper357","email":"temper357@gmail.com"},{"name":"yuanyan","email":"yuanyan.cao@gmail.com"},{"name":"yundong","email":"yundong.me@gmail.com"}],"homepage":"https://github.com/ice-lab/icestark#readme","bugs":{"url":"https://github.com/ice-lab/icestark/issues"},"dist":{"shasum":"a4957a7376e61f588149c9dda8525d7e330c12b9","tarball":"https://registry.npmjs.org/@ice/stark-module/-/stark-module-1.1.0-1.tgz","fileCount":14,"integrity":"sha512-4JTIk/bfBJtw4lB66LWR+CHi+rb1CKJBvFD2zhIHu1QNt/kRqnxhXF+8G8b1cAuzKCgJel/GEYLS/2qhBwLJjA==","signatures":[{"sig":"MEQCIBQ9vieKIUoLb/3HVrpWkTIeoAfir+g/sAfqYQxZBd0RAiAjVv7EEgJMN6adSiGCwTe45ST/FIYQVOwXX1fbBvICCQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":39909,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJevNpYCRA9TVsSAnZWagAAFKYP/34ioCW+tvsI1s/w5Jnn\nNMJr17qgHCQSf/BDbu34vy/s2oklK00M1ePCnv2A898BfQ+KpQMgH3RuB5O0\nN3NjcxmNesUI/D7MS54o8h2KSVUiz8wI/xwChKhJz5uNlQOE/2pa0NW3IsgX\nuY6xexnQUcnI6j8LEvT5jiSaljCtW2sFK3sNQGIwIsixo8dxSvH7U7lUl/lV\nyFx4DTCagx8yCF4X/QGG1rBeI2hvspKns5FZSb9X0LDM4LjPVJPCqcI8RqKp\nVK4JLmiyUj1usH8t1HHA8b52GC4p4sXIw9A9tK85MqW4GEyRSi5g5nI9Vqu6\nHca/9mswHfuWgAOUHRMa5Gs44nQ24k+Al8HXf87Rg9t+8wII8Ka7VNz6K7kw\nbCWqFd+Yd+9tCrrhJFIvVqQVHZKHdHJ6qWNH+yCDhos3gnn13jd1kUk21FUT\njdD8l0E9CXrASRA49P53agjH2jIfiFROcKcnber45suRwj55/1ZAFc5OayIV\nybaYmovE/+/fcIR3ITwm6kmSHk+lwQVeqkoffzJ335079gjDbu0eiBN/njeX\nNXUHIooI+3zoWU9gST6XwZFv9RrqY2mURVLqzW3laZpSB2LfmbDsZAgjYOKb\npzgMh0k2blsK2U5sQ5Rxrb6iMRwKXlHRQTrAAl4tZ7qxZ+o76DMgyL+Mi8lQ\njtIC\r\n=JVk7\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"preset":"ts-jest","collectCoverage":true,"coverageDirectory":"./coverage/"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS"}},"readme":"# @ice/stark-module\n\n[![NPM version](https://img.shields.io/npm/v/@ice/stark-module.svg?style=flat)](https://npmjs.org/package/@ice/stark-module) [![Package Quality](https://npm.packagequality.com/shield/@ice%2Fstark-module.svg)](https://packagequality.com/#?package=@ice%2Fstark-module) [![build status](https://img.shields.io/travis/ice-lab/icestark.svg?style=flat-square)](https://travis-ci.org/ice-lab/icestark) [![Test coverage](https://img.shields.io/codecov/c/github/ice-lab/icestark.svg?style=flat-square)](https://codecov.io/gh/ice-lab/icestark) [![NPM downloads](http://img.shields.io/npm/dm/@ice/stark-module.svg?style=flat)](https://npmjs.org/package/@ice/stark-module) [![David deps](https://img.shields.io/david/ice-lab/icestark.svg?style=flat-square)](https://david-dm.org/ice-lab/icestark)\n\n## Installation\n\n```bash\n$ npm install @ice/stark-module --save\n```\n\n## Module LifeCycle\n\nspecify module lifeCycle when pack code as a micro module\n\n```js\nconst SampleComponent = () => {\n  return <div>Sample</div>;\n}\n\n// mount function will be trigger when mount micro module\nexport function mount(ModuleComponent, targetNode, props) {\n  ReactDOM.render(<ModuleComponent {...props} />, targetNode);\n}\n\n// unmount function will be trigger when unmount micro module\nexport function unmount(targetNode) {\n  ReactDOM.unmountComponentAtNode(targetNode);\n}\n\nexport default SampleComponent;\n```\n\n> pack module with module spec UMD\n\n## Usage\n\n### Basic Usage\n\n```jsx\nimport { MicroModule } from '@ice/stark-module';\n\nconst App = () => {\n  const moduleInfo = {\n    name: 'moduleName',\n    url: 'https://localhost/module.js',\n  }\n  return <MicroModule moduleInfo={moduleInfo} />;\n}\n```\n\n### Register Modules\n\n```jsx\nimport { MicroModule, registerModules, getModules } from '@ice/stark-module';\n\nregisterModules([\n  {\n    url: 'https://localhost/module-a.js',\n    name: 'module-a',\n  },\n  {\n    url: 'https://localhost/module-b.js',\n    name: 'module-b',\n  },\n]);\n\n// get module info registered by API registerModules\nconst moduleInfo = getModules();\n\nconst App = () => {\n  // after registerMdoules, use micro module by specify module name\n  return (\n    <div>\n      <MicroModule moduleName=\"module-a\" />\n      <MicroModule moduleName=\"module-b\" />\n    </div>\n  );\n}\n```\n\n### Clear Modules\n\n```js\nimport { registerModules, getModules } from '@ice/stark-module';\n\nregisterModules([\n  {\n    url: 'https://localhost/module-a.js',\n    name: 'module-a',\n  },\n]);\n// clear module information registered by API registerModules including content cache\nclearModules();\n```\n\n### Custom Lifecyle\n\n```jsx\nimport { MicroModule } from '@ice/stark-module';\n\nconst App = () => {\n  const moduleInfo = {\n    name: 'moduleName',\n    url: 'https://localhost/module.js',\n    mount: (ModuleComponent, mountNode) => {\n      console.log('custom mount');\n      ReactDOM.render(<ModuleComponent />, mountNode);\n    },\n  }\n  return <MicroModule moduleInfo={moduleInfo} />;\n}\n```\n\n### Custom mount component\n\n```jsx\nimport { mountModule, unmoutModule } from '@ice/stark-module';\n\nconst moduleInfo = {\n  name: 'moduleName',\n  url: 'https://localhost/module.js',\n};\n\nconst ModuleComponent = () => {\n  const renderNode = useRef(null);\n  useEffect(() => {\n    mountModule(moduleInfo, renderNode, {});\n    return unmoutModule(moduleInfo, renderNode);\n  }, []);\n  return (<div ref={renderNode}></div>);\n};\n```\n\n## Contributors\n\nFeel free to report any questions as an [issue](https://github.com/ice-lab/icestark/issues/new), we'd love to have your helping hand on `icestark`.\n\nIf you're interested in `icestark`, see [CONTRIBUTING.md](https://github.com/alibaba/ice/blob/master/.github/CONTRIBUTING.md) for more information to learn how to get started.\n\n## License\n\n[MIT](LICENSE)","scripts":{"test":"NODE_ENV=unittest jest","build":"rm -rf lib && tsc","watch":"tsc -w","coverage":"codecov","prepublishOnly":"npm run test && npm run build"},"_npmUser":{"name":"clarkxia","email":"xiawenwu41@gmail.com"},"repository":{"url":"git+https://github.com/ice-lab/icestark.git","type":"git"},"_npmVersion":"6.7.0","description":"toolkit for load standard micro-module","directories":{},"_nodeVersion":"11.10.1","dependencies":{"@ice/sandbox":"^1.0.4-0"},"publishConfig":{"registry":"http://registry.npmjs.com/"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.2.7","react":"^16.13.1","codecov":"^3.4.0","ts-jest":"^25.3.1","react-dom":"^16.13.1","typescript":"^3.8.3","@testing-library/react":"^10.0.3","@testing-library/jest-dom":"^5.5.0"},"peerDependencies":{"react":">=15.0.0","react-dom":">=15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/stark-module_1.1.0-1_1589434968290_0.5974758809845584","host":"s3://npm-registry-packages"}},"1.1.0":{"name":"@ice/stark-module","version":"1.1.0","keywords":["modules","icestark"],"author":"","license":"MIT","_id":"@ice/stark-module@1.1.0","maintainers":[{"name":"alvinhui","email":"alvinxwt@gmail.com"},{"name":"boiawang","email":"zhengwang2314@gmail.com"},{"name":"clarkxia","email":"xiawenwu41@163.com"},{"name":"lip966","email":"wddpwzz36@gmail.com"},{"name":"oraaange","email":"oraaangecolin@gmail.com"},{"name":"sobear","email":"sobear.me@gmail.com"},{"name":"temper357","email":"temper357@gmail.com"},{"name":"yuanyan","email":"yuanyan.cao@gmail.com"},{"name":"yundong","email":"yundong.me@gmail.com"}],"homepage":"https://github.com/ice-lab/icestark#readme","bugs":{"url":"https://github.com/ice-lab/icestark/issues"},"dist":{"shasum":"6d2d7d3ff1bdc62b543712f7e1da8b2020514eee","tarball":"https://registry.npmjs.org/@ice/stark-module/-/stark-module-1.1.0.tgz","fileCount":14,"integrity":"sha512-1UEydD8XdIOfkaGPuEQh4NQaPVhRO7YIeLO/BMMKQHKwaeS2VE5HvRI6ObNV0jdf5XEAwUJnPMpDPzEo0fcTnw==","signatures":[{"sig":"MEUCIQD8BaHEnlLhNEb2nSu+gYWZkzynKNZkiLmr8xnpFSl2JAIgFUit5QmSFbFu+cr5FbRIclpxm9EyXvth36I6dMKxVBg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":39905,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJevN3BCRA9TVsSAnZWagAA384P/0fvr+uIY+q4mtWuJibz\nmuUyQ43F2QRD4stEBN+iIvErgBEoW+Cceri2Hcf4J06SFvTIfHMkpXgaA78A\nUs/TwWJmEKpycCAnZuy0WdS0T9QZMmvxcvVuhMkOBIT87j6u/tjzMAZMMVBD\ncvLDjN4ZlQrjjs6WG0iEYsaOAsi2RXfnpu3qIUGJ45+OxfMKfJ/p8qdhFofg\ny41pNZGVcTHXDPPxSuQK0alzGBIZxHktAopfI72wPLPSsdagIw+1awZemyRV\noec707r5KuQnQjrkl5OPjVLS1DcqEXoHhCfTWqKY9aVPrSG1dx8biSRXGZds\nhUQiibyiiSL6VgEYVsTcNCMud8McQTfzzqAaIULXdg4poBrhwROlrl43GUJY\nz47tNZqz1xTF5sBJMJnXxt/VPzFDdjgIaIbE6+ZP8dUk+RbBgi7SK7Dku6ht\nxRi0t4341Na1JHwQmtiHZwvQT9fx4AYchyPy4A5LVwV+k3atnEHXVkCN0b/i\nuj5OT95rXfwBW1xz434ikaoQG9VRNg0pndb1HSCkOFOl7/IjtvmCYBRrpElj\n7hFzyPd806BdgM6IoD97+WgjLPl3r6L5AyXw+b/SSi1zy9VTngGtHk65BhTO\nwi0YZ0uWjESm45PxxVo70FH2gLUDga0oWDwB1NrkGOk6HE1ZgAMSFZ7D6iFs\nTBDR\r\n=sFNc\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"preset":"ts-jest","collectCoverage":true,"coverageDirectory":"./coverage/"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS"}},"scripts":{"test":"NODE_ENV=unittest jest","build":"rm -rf lib && tsc","watch":"tsc -w","coverage":"codecov","prepublishOnly":"npm run test && npm run build"},"_npmUser":{"name":"clarkxia","email":"xiawenwu41@gmail.com"},"repository":{"url":"git+https://github.com/ice-lab/icestark.git","type":"git"},"_npmVersion":"6.7.0","description":"toolkit for load standard micro-module","directories":{},"_nodeVersion":"11.10.1","dependencies":{"@ice/sandbox":"^1.0.3"},"publishConfig":{"registry":"http://registry.npmjs.com/"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^25.2.7","react":"^16.13.1","codecov":"^3.4.0","ts-jest":"^25.3.1","react-dom":"^16.13.1","typescript":"^3.8.3","@testing-library/react":"^10.0.3","@testing-library/jest-dom":"^5.5.0"},"peerDependencies":{"react":">=15.0.0","react-dom":">=15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/stark-module_1.1.0_1589435841102_0.44152413009804214","host":"s3://npm-registry-packages"}},"1.1.1-0":{"name":"@ice/stark-module","version":"1.1.1-0","keywords":["modules","icestark"],"author":"","license":"MIT","_id":"@ice/stark-module@1.1.1-0","maintainers":[{"name":"alvinhui","email":"alvinxwt@gmail.com"},{"name":"boiawang","email":"zhengwang2314@gmail.com"},{"name":"clarkxia","email":"xiawenwu41@163.com"},{"name":"lip966","email":"wddpwzz36@gmail.com"},{"name":"oraaange","email":"oraaangecolin@gmail.com"},{"name":"sobear","email":"sobear.me@gmail.com"},{"name":"temper357","email":"temper357@gmail.com"},{"name":"yuanyan","email":"yuanyan.cao@gmail.com"},{"name":"yundong","email":"yundong.me@gmail.com"}],"homepage":"https://github.com/ice-lab/icestark#readme","bugs":{"url":"https://github.com/ice-lab/icestark/issues"},"dist":{"shasum":"fc9464982e0cd226513841f8b7ff67f60984e515","tarball":"https://registry.npmjs.org/@ice/stark-module/-/stark-module-1.1.1-0.tgz","fileCount":14,"integrity":"sha512-toYb4bThay8tg1ZLVWQIy2V6MdxAVBmTa9Jez0/34oVYadMWL9NoXaL0dX7pVANba9Oif0OkxsqD8huFmRiaYQ==","signatures":[{"sig":"MEYCIQDU9wEXFlzmuJt0THlOvfXMNh1XWoK4YdnKCPNTB5ljawIhALPuq8fRgEQsieGYyCKLduYOs9B738q4zgbUnX/CHQ7U","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":40187,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJew505CRA9TVsSAnZWagAAEuoP/jpgdGOgkfxAvO2L+p1O\nbt7TRyWXc5/B6sdnVVXSKX7RjUjz/N+dRbjECcWai6QMrji1TLJ6MtEc2oxh\n1jyeH4U6b8GjdKPyQ5z0nQ9RfGcvrS8lEEw0r+b8HPzYlr8FJf5rJSFHJu5N\nBSLhkngh3oWSGWDdjfrkU/fnGDlyrBKtCDdNn4Y5P1jDNHojSmRdfxi73yBx\ndDCWj9NNMhRbHY8oCZLOJzC3VM4jiSkT133+ad9zekfpbkUQgtXGYNn/B3OU\nyh+UFvzunMaBoOTw607mkg01EoMWGes9SRPVat7+oj3rqWC4JCC2XS4bzb3A\naxKaRfv0dSMBvTosGu8Rz2u8PCbI/0yTdLkkkIJvnPNXYrE7fRvwtdatQHxW\nvXk9JcI3tFeUrxjyeTTTwWzSZmdDSu67N5zJKWaX0DDdwaV6xwQ7CXCawVRX\nJER1AJzBQYDfHBLQSg6glftybbXnYNR44QbXffXAaUmh7NGajsLl0BbGrC2s\nRyTFZ80NevaOgvBguRKE/0ep8zuUxD6kVK9Kr5lM++6InlJ1FxqRAbZaD3Ua\nSGKKTn/ZX+KNHKpF7ViBtD0703OIb8IOK24asQEksA3p1KCALIEplnor1Pgr\nnwgOgr2sTtZv6lOaIYDnT5T4YW+UMNwpYrsVGplfxwd10zlmnjBR/7xd9VVu\nfsG5\r\n=mFxN\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"preset":"ts-jest","collectCoverage":true,"coverageDirectory":"./coverage/"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS"}},"readme":"# @ice/stark-module\n\n[![NPM version](https://img.shields.io/npm/v/@ice/stark-module.svg?style=flat)](https://npmjs.org/package/@ice/stark-module) [![Package Quality](https://npm.packagequality.com/shield/@ice%2Fstark-module.svg)](https://packagequality.com/#?package=@ice%2Fstark-module) [![build status](https://img.shields.io/travis/ice-lab/icestark.svg?style=flat-square)](https://travis-ci.org/ice-lab/icestark) [![Test coverage](https://img.shields.io/codecov/c/github/ice-lab/icestark.svg?style=flat-square)](https://codecov.io/gh/ice-lab/icestark) [![NPM downloads](http://img.shields.io/npm/dm/@ice/stark-module.svg?style=flat)](https://npmjs.org/package/@ice/stark-module) [![David deps](https://img.shields.io/david/ice-lab/icestark.svg?style=flat-square)](https://david-dm.org/ice-lab/icestark)\n\n## Installation\n\n```bash\n$ npm install @ice/stark-module --save\n```\n\n## Module LifeCycle\n\nspecify module lifeCycle when pack code as a micro module\n\n```js\nconst SampleComponent = () => {\n  return <div>Sample</div>;\n}\n\n// mount function will be trigger when mount micro module\nexport function mount(ModuleComponent, targetNode, props) {\n  ReactDOM.render(<ModuleComponent {...props} />, targetNode);\n}\n\n// unmount function will be trigger when unmount micro module\nexport function unmount(targetNode) {\n  ReactDOM.unmountComponentAtNode(targetNode);\n}\n\nexport default SampleComponent;\n```\n\n> pack module with module spec UMD\n\n## Usage\n\n### Basic Usage\n\n```jsx\nimport { MicroModule } from '@ice/stark-module';\n\nconst App = () => {\n  const moduleInfo = {\n    name: 'moduleName',\n    url: 'https://localhost/module.js',\n  }\n  return <MicroModule moduleInfo={moduleInfo} />;\n}\n```\n\n### Register Modules\n\n```jsx\nimport { MicroModule, registerModules, getModules } from '@ice/stark-module';\n\nregisterModules([\n  {\n    url: 'https://localhost/module-a.js',\n    name: 'module-a',\n  },\n  {\n    url: 'https://localhost/module-b.js',\n    name: 'module-b',\n  },\n]);\n\n// get module info registered by API registerModules\nconst moduleInfo = getModules();\n\nconst App = () => {\n  // after registerMdoules, use micro module by specify module name\n  return (\n    <div>\n      <MicroModule moduleName=\"module-a\" />\n      <MicroModule moduleName=\"module-b\" />\n    </div>\n  );\n}\n```\n\n### Clear Modules\n\n```js\nimport { registerModules, getModules } from '@ice/stark-module';\n\nregisterModules([\n  {\n    url: 'https://localhost/module-a.js',\n    name: 'module-a',\n  },\n]);\n// clear module information registered by API registerModules including content cache\nclearModules();\n```\n\n### Custom Lifecyle\n\n```jsx\nimport { MicroModule } from '@ice/stark-module';\n\nconst App = () => {\n  const moduleInfo = {\n    name: 'moduleName',\n    url: 'https://localhost/module.js',\n    mount: (ModuleComponent, mountNode) => {\n      console.log('custom mount');\n      ReactDOM.render(<ModuleComponent />, mountNode);\n    },\n  }\n  return <MicroModule moduleInfo={moduleInfo} />;\n}\n```\n\n### Custom mount component\n\n```jsx\nimport { mountModule, unmoutModule } from '@ice/stark-module';\n\nconst moduleInfo = {\n  name: 'moduleName',\n  url: 'https://localhost/module.js',\n};\n\nconst ModuleComponent = () => {\n  const renderNode = useRef(null);\n  useEffect(() => {\n    mountModule(moduleInfo, renderNode, {});\n    return unmoutModule(moduleInfo, renderNode);\n  }, []);\n  return (<div ref={renderNode}></div>);\n};\n```\n\n## Contributors\n\nFeel free to report any questions as an [issue](https://github.com/ice-lab/icestark/issues/new), we'd love to have your helping hand on `icestark`.\n\nIf you're interested in `icestark`, see [CONTRIBUTING.md](https://github.com/alibaba/ice/blob/master/.github/CONTRIBUTING.md) for more information to learn how to get started.\n\n## License\n\n[MIT](LICENSE)","scripts":{"test":"NODE_ENV=unittest jest","build":"rm -rf lib && tsc","watch":"tsc -w","coverage":"codecov","prepublishOnly":"npm run test && npm run build"},"_npmUser":{"name":"clarkxia","email":"xiawenwu41@gmail.com"},"repository":{"url":"git+https://github.com/ice-lab/icestark.git","type":"git"},"_npmVersion":"6.7.0","description":"toolkit for load standard micro-module","directories":{},"_nodeVersion":"11.10.1","dependencies":{"@ice/sandbox":"^1.0.3"},"publishConfig":{"registry":"http://registry.npmjs.com/"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.2.7","react":"^16.13.1","codecov":"^3.4.0","ts-jest":"^25.3.1","react-dom":"^16.13.1","typescript":"^3.8.3","@testing-library/react":"^10.0.3","@testing-library/jest-dom":"^5.5.0"},"peerDependencies":{"react":">=15.0.0","react-dom":">=15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/stark-module_1.1.1-0_1589878072907_0.40963668252351404","host":"s3://npm-registry-packages"}},"1.1.1":{"name":"@ice/stark-module","version":"1.1.1","keywords":["modules","icestark"],"author":"","license":"MIT","_id":"@ice/stark-module@1.1.1","maintainers":[{"name":"alvinhui","email":"alvin.hui@qq.com"},{"name":"boiawang","email":"zhengwang2314@gmail.com"},{"name":"clarkxia","email":"xiawenwu41@gmail.com"},{"name":"oraaange","email":"oraaangecolin@gmail.com"},{"name":"sobear","email":"sobear.me@gmail.com"},{"name":"yuanyan","email":"yuanyan.cao@gmail.com"}],"homepage":"https://github.com/ice-lab/icestark#readme","bugs":{"url":"https://github.com/ice-lab/icestark/issues"},"dist":{"shasum":"ed9b0419bfb012b985bbb8b5bdce4dc85a0a9676","tarball":"https://registry.npmjs.org/@ice/stark-module/-/stark-module-1.1.1.tgz","fileCount":14,"integrity":"sha512-+7PUig5VJSWMYsyR0K751oXDJu4+uWEvpssMCfWRvGy7NhozgAfSgHOrkZGpToECnBHT6KIoX8A2WrnD2ndcMA==","signatures":[{"sig":"MEQCIFqNo6ySFEkDPZIjzGm4M4gf8TVA7jw/m8EYIIN157tmAiBayJ/E7Z3xpBzJV4dJKz9CZFfD9Ub7u4f9SBA62WHkqg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":40185,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe30qcCRA9TVsSAnZWagAAn/wP+gK/iVwSfi7WuCcKpSo/\nMknTYTthVM0bOP7RxFRQZYigvQdVgAH9O3xLLKNJivNdGYZLknv3TtA7U4PO\nb14bll93o6t3P6Lf7Wh1WG6PS1BG66vrH1A9A/Es6jYBX/djYVf8Evqhw/Ju\no3T6ZAHkz5LjWLC+m1hQmAAFefjH2ISX4mSGmOBXt24Y5Hb4avy3w8oeKuRF\nDlcukWcAWVHukTgSoNEXx0LF8VavpzudNUZNmbQxVQkiOx9P8AKtUhbc0qU0\n+Wb4XMqcbPrYrW58r2FLVz79NVoRVt/EatbQnRF3SdxspGJeX9HVC+bu4e0K\nhr8rUm+fWvOjfu9eUgsr7c2SXsPL0QcgnFADDxs+sksFiD/VpQ8Ja6tmPNnI\npcRTSxyNPQ419cph6QdD1D+peYCnSVNRqf5UeY6HvyMotauY6DxtQ1/GJ4Sy\ngWDA8PAENceLNuA8KHl0+YaSOPhnhvg3zER5SCpRjvJF5FWHx0WYOKIPTz4u\n/yV6EXwU2SxBW2/V/ATLXBZ/ouvsNssNd1q9C53kqtpDer53BBTtnEsVEC68\nX5m9Knx6yrFvahEjmyGbC1EF0OlWB53w4vWl3/mwDOZIyFN9V6+rR3jSBqi0\nqv3/eIFJlaIUW8bsSHV/AhQqbZrCleX8uzSZrTyPcZA9zSI3d/7qlVQPTFZM\n+Bxl\r\n=czJJ\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"preset":"ts-jest","collectCoverage":true,"coverageDirectory":"./coverage/"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS"}},"scripts":{"test":"NODE_ENV=unittest jest","build":"rm -rf lib && tsc","watch":"tsc -w","coverage":"codecov","prepublishOnly":"npm run test && npm run build"},"_npmUser":{"name":"clarkxia","email":"xiawenwu41@gmail.com"},"repository":{"url":"git+https://github.com/ice-lab/icestark.git","type":"git"},"_npmVersion":"6.7.0","description":"toolkit for load standard micro-module","directories":{},"_nodeVersion":"11.10.1","dependencies":{"@ice/sandbox":"^1.0.3"},"publishConfig":{"registry":"http://registry.npmjs.com/"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^25.2.7","react":"^16.13.1","codecov":"^3.4.0","ts-jest":"^25.3.1","react-dom":"^16.13.1","typescript":"^3.8.3","@testing-library/react":"^10.0.3","@testing-library/jest-dom":"^5.5.0"},"peerDependencies":{"react":">=15.0.0","react-dom":">=15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/stark-module_1.1.1_1591691932048_0.48908630983786217","host":"s3://npm-registry-packages"}},"1.1.2-0":{"name":"@ice/stark-module","version":"1.1.2-0","keywords":["modules","icestark"],"author":"","license":"MIT","_id":"@ice/stark-module@1.1.2-0","maintainers":[{"name":"alvinhui","email":"alvin.hui@qq.com"},{"name":"boiawang","email":"zhengwang2314@gmail.com"},{"name":"chenbin93","email":"chenbinad@gmail.com"},{"name":"clarkxia","email":"xiawenwu41@gmail.com"},{"name":"rax-publisher","email":"rax-public@alibaba-inc.com"},{"name":"sobear","email":"sobear.me@gmail.com"},{"name":"solojiang","email":"feifeishen1996@gmail.com"},{"name":"yuanyan","email":"yuanyan.cao@gmail.com"}],"homepage":"https://github.com/ice-lab/icestark#readme","bugs":{"url":"https://github.com/ice-lab/icestark/issues"},"dist":{"shasum":"e96bd380bab6c3b2c7ee84ac88d5ef3da24aba88","tarball":"https://registry.npmjs.org/@ice/stark-module/-/stark-module-1.1.2-0.tgz","fileCount":14,"integrity":"sha512-p7lr05LINV0B6FyExzoJs0yz8TFdn2xyiY6rl0jAL5KMOKpxUv9cyhJ10yakUjpKDQF4VRW+UroEW1LTRrG1Kw==","signatures":[{"sig":"MEUCIQCUGzROT91YzWTh1LBMsDn5eDFVdi6DRTacxkvNW77qWgIgdPTrCvVjJ4FHe9QgK5FPUucNiHnKe60wvgBVc3BeeJw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":40849,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfQ1sCCRA9TVsSAnZWagAAbwwP/2WiIJjjnOgvjkhGTP2+\n0ykWWoirqYoQafer9ea6++BUfBbIgUmLiVPVB+4VK4Vv5dEQ6kKhd591XJZo\najv+K0GGbt+5dcSCc9No44LvmGUW18hrt2AQJZho0Nrt2p4UOS0/cT/nf47s\nRv7iQGApIKlCyPz1jmJENX6DLk5NI5lP+NuLTbZ0674YQPkDCpqwFtuGSMjH\nWEfMrFX4ltk6cLmWu/W8G7U2ehMj31vqQFvks+USw5Uz8dXEsvMytbSlj5+U\nYbaDBuvYCQpkAWo7xMsqlyMQ4TVnOe3xd6KLBO0mhG2UFw3AyNc2yKZ+K3np\nIAGdKJD+HJHD2V/xGGUkzyLAYqSwnwxJL1VUCIAUJoiW5pbj71dyt7sAaxQG\nUpcsT4QFuF9UoqhjESS4xFSe7ZRHL44c2VMHA0TW/M+y6qWsSbcHSWdI+c5E\n3HS/kev+vQz/u8eFxf66bicPI+I3Ih6rcUTdMhBH6ldRiWcynRntOHazZcRT\nFkOWAsITP17PMbO7pTZz3gu4IbZYGiZFIs7eVoGZvs1LvFiSmTfuDgpf6aDy\nysoCx+iM1i3EKK6/hFAdeyQXp9HpsLuRcTGYBBOy7Bm6l+72wCr+EnHYbWnf\n0eAaK8Elm4HpWlx3t/KBh8M7+O45vVcsSaDxJyHJVMtzkIOGPlzPUneo4xgk\nrDhA\r\n=74mO\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"preset":"ts-jest","collectCoverage":true,"coverageDirectory":"./coverage/"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS"}},"readme":"# @ice/stark-module\n\n[![NPM version](https://img.shields.io/npm/v/@ice/stark-module.svg?style=flat)](https://npmjs.org/package/@ice/stark-module) [![Package Quality](https://npm.packagequality.com/shield/@ice%2Fstark-module.svg)](https://packagequality.com/#?package=@ice%2Fstark-module) [![build status](https://img.shields.io/travis/ice-lab/icestark.svg?style=flat-square)](https://travis-ci.org/ice-lab/icestark) [![Test coverage](https://img.shields.io/codecov/c/github/ice-lab/icestark.svg?style=flat-square)](https://codecov.io/gh/ice-lab/icestark) [![NPM downloads](http://img.shields.io/npm/dm/@ice/stark-module.svg?style=flat)](https://npmjs.org/package/@ice/stark-module) [![David deps](https://img.shields.io/david/ice-lab/icestark.svg?style=flat-square)](https://david-dm.org/ice-lab/icestark)\n\n## Installation\n\n```bash\n$ npm install @ice/stark-module --save\n```\n\n## Module LifeCycle\n\nspecify module lifeCycle when pack code as a micro module\n\n```js\nconst SampleComponent = () => {\n  return <div>Sample</div>;\n}\n\n// mount function will be trigger when mount micro module\nexport function mount(ModuleComponent, targetNode, props) {\n  ReactDOM.render(<ModuleComponent {...props} />, targetNode);\n}\n\n// unmount function will be trigger when unmount micro module\nexport function unmount(targetNode) {\n  ReactDOM.unmountComponentAtNode(targetNode);\n}\n\nexport default SampleComponent;\n```\n\n> pack module with module spec UMD\n\n## Usage\n\n### Basic Usage\n\n```jsx\nimport { MicroModule } from '@ice/stark-module';\n\nconst App = () => {\n  const moduleInfo = {\n    name: 'moduleName',\n    url: 'https://localhost/module.js',\n  }\n  return <MicroModule moduleInfo={moduleInfo} />;\n}\n```\n\n### Register Modules\n\n```jsx\nimport { MicroModule, registerModules, getModules } from '@ice/stark-module';\n\nregisterModules([\n  {\n    url: 'https://localhost/module-a.js',\n    name: 'module-a',\n  },\n  {\n    url: 'https://localhost/module-b.js',\n    name: 'module-b',\n  },\n]);\n\n// get module info registered by API registerModules\nconst moduleInfo = getModules();\n\nconst App = () => {\n  // after registerMdoules, use micro module by specify module name\n  return (\n    <div>\n      <MicroModule moduleName=\"module-a\" />\n      <MicroModule moduleName=\"module-b\" />\n    </div>\n  );\n}\n```\n\n### Clear Modules\n\n```js\nimport { registerModules, getModules } from '@ice/stark-module';\n\nregisterModules([\n  {\n    url: 'https://localhost/module-a.js',\n    name: 'module-a',\n  },\n]);\n// clear module information registered by API registerModules including content cache\nclearModules();\n```\n\n### Custom Lifecyle\n\n```jsx\nimport { MicroModule } from '@ice/stark-module';\n\nconst App = () => {\n  const moduleInfo = {\n    name: 'moduleName',\n    url: 'https://localhost/module.js',\n    mount: (ModuleComponent, mountNode) => {\n      console.log('custom mount');\n      ReactDOM.render(<ModuleComponent />, mountNode);\n    },\n  }\n  return <MicroModule moduleInfo={moduleInfo} />;\n}\n```\n\n### Custom mount component\n\n```jsx\nimport { mountModule, unmoutModule } from '@ice/stark-module';\n\nconst moduleInfo = {\n  name: 'moduleName',\n  url: 'https://localhost/module.js',\n};\n\nconst ModuleComponent = () => {\n  const renderNode = useRef(null);\n  useEffect(() => {\n    mountModule(moduleInfo, renderNode, {});\n    return unmoutModule(moduleInfo, renderNode);\n  }, []);\n  return (<div ref={renderNode}></div>);\n};\n```\n\n## Contributors\n\nFeel free to report any questions as an [issue](https://github.com/ice-lab/icestark/issues/new), we'd love to have your helping hand on `icestark`.\n\nIf you're interested in `icestark`, see [CONTRIBUTING.md](https://github.com/alibaba/ice/blob/master/.github/CONTRIBUTING.md) for more information to learn how to get started.\n\n## License\n\n[MIT](LICENSE)","scripts":{"test":"NODE_ENV=unittest jest","build":"rm -rf lib && tsc","watch":"tsc -w","coverage":"codecov","prepublishOnly":"npm run test && npm run build"},"_npmUser":{"name":"clarkxia","email":"xiawenwu41@gmail.com"},"repository":{"url":"git+https://github.com/ice-lab/icestark.git","type":"git"},"_npmVersion":"6.7.0","description":"toolkit for load standard micro-module","directories":{},"_nodeVersion":"11.10.1","dependencies":{"@ice/sandbox":"^1.0.3"},"publishConfig":{"registry":"http://registry.npmjs.com/"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.2.7","react":"^16.13.1","codecov":"^3.4.0","ts-jest":"^25.3.1","react-dom":"^16.13.1","typescript":"^3.8.3","@testing-library/react":"^10.0.3","@testing-library/jest-dom":"^5.5.0"},"peerDependencies":{"react":">=15.0.0","react-dom":">=15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/stark-module_1.1.2-0_1598249730314_0.08865029034826533","host":"s3://npm-registry-packages"}},"1.1.2":{"name":"@ice/stark-module","version":"1.1.2","keywords":["modules","icestark"],"author":"","license":"MIT","_id":"@ice/stark-module@1.1.2","maintainers":[{"name":"chenbin93","email":"chenbinad@gmail.com"},{"name":"solojiang","email":"feifeishen1996@gmail.com"},{"name":"rax-publisher","email":"rax-public@alibaba-inc.com"},{"name":"alvinhui","email":"alvin.hui@qq.com"},{"name":"yuanyan","email":"yuanyan.cao@gmail.com"},{"name":"clarkxia","email":"xiawenwu41@gmail.com"},{"name":"boiawang","email":"zhengwang2314@gmail.com"},{"name":"sobear","email":"sobear.me@gmail.com"}],"homepage":"https://github.com/ice-lab/icestark#readme","bugs":{"url":"https://github.com/ice-lab/icestark/issues"},"dist":{"shasum":"820ea6f0c7fcdbf4f579012313f269d3c303131e","tarball":"https://registry.npmjs.org/@ice/stark-module/-/stark-module-1.1.2.tgz","fileCount":14,"integrity":"sha512-mjnhZxgibZedHHnlW0yLa6GCjuVmJbawZYPw/5Xj9Pl6Fk0wWgcziIe30swqSGk6beC8oS2vYYekIg1JW9tccQ==","signatures":[{"sig":"MEUCIG6Kumk0BaghSKx6oalOU1DeOHSULZlBNOBQXC+kvmVRAiEAuHqsU0j2TimFbweykAySbC+QaqXJm6IIFYwLR/N5RMg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":40848,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfYtZICRA9TVsSAnZWagAAoPsQAJvf4GtyPGG7obt9Vf4z\ndz93PW5QHcTuC0lE8IWkeB+3+6BhyKCWYdh3ru6vLEioxEbxFCijV4a0jEfA\nQLoj0SLDzq3NE+94ejatjFe02/XP2dQ+s2q6SNC6I/M59/4pn/98p3JtJMJK\nMbyNBZIo2ZuF9venAniOCA/p0mEETZ/0JSTYoAC10s0dP1z26PwciuRifvKl\nUAGzKBQqCzXoJk83Cr+hKIiMaUolayjoP7HoXaZvIVOlxp9ckaZqoV05WsMJ\nG6WmIFLxwFBEtAI57c28vuwYOjyyvOFjxUzdqmRfMbOTqbGJauvLX9wnNA9u\n9Qc6OHCWrfscGuG/xAdx3UmcPa0fb6pe1SKEgCX+fliqi08y+l+gLa19Ivrq\nPjc/xuuSmf5qaV410tYt4jYIY1+3GNgLPHAtcOR3Qei0350NHVSi0rRuz+Ih\nOnZ0Z4Ad0nqv8fNaoQ4up3rrptjyuKV2GVwXQZBsz6H2J4FOF1HZuyniKNCZ\nFan2boknY0pbPXwsv+3xzbGkF6YR0oJAn5+jGKCP0PDvPfghKvRRIk8HgBDH\n82HkBgs8JztJbnpasvnAm8dCJFyu7GaWfjtX/f5ig5nkmfBRWwxxBexd+G7w\nF3MhkricuCjWui8pHzgbl/uqfPiDQFIdIYM8P2tqW0kTOIMsUm657EllaDO9\nKfkY\r\n=ZLeU\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"preset":"ts-jest","collectCoverage":true,"coverageDirectory":"./coverage/"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS"}},"scripts":{"test":"NODE_ENV=unittest jest","build":"rm -rf lib && tsc","watch":"tsc -w","coverage":"codecov","prepublishOnly":"npm run test && npm run build"},"_npmUser":{"name":"clarkxia","email":"xiawenwu41@gmail.com"},"repository":{"url":"git+https://github.com/ice-lab/icestark.git","type":"git"},"_npmVersion":"6.7.0","description":"toolkit for load standard micro-module","directories":{},"_nodeVersion":"11.10.1","dependencies":{"@ice/sandbox":"^1.0.3"},"publishConfig":{"registry":"http://registry.npmjs.com/"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^25.2.7","react":"^16.13.1","codecov":"^3.4.0","ts-jest":"^25.3.1","react-dom":"^16.13.1","typescript":"^3.8.3","@testing-library/react":"^10.0.3","@testing-library/jest-dom":"^5.5.0"},"peerDependencies":{"react":">=15.0.0","react-dom":">=15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/stark-module_1.1.2_1600312903937_0.9565974374813622","host":"s3://npm-registry-packages"}},"1.2.0-0":{"name":"@ice/stark-module","version":"1.2.0-0","keywords":["modules","icestark"],"author":"","license":"MIT","_id":"@ice/stark-module@1.2.0-0","maintainers":[{"name":"chenbin93","email":"chenbinad@gmail.com"},{"name":"solojiang","email":"feifeishen1996@gmail.com"},{"name":"rax-publisher","email":"rax-public@alibaba-inc.com"},{"name":"alvinhui","email":"alvin.hui@qq.com"},{"name":"yuanyan","email":"yuanyan.cao@gmail.com"},{"name":"clarkxia","email":"xiawenwu41@gmail.com"},{"name":"boiawang","email":"zhengwang2314@gmail.com"},{"name":"sobear","email":"sobear.me@gmail.com"}],"homepage":"https://github.com/ice-lab/icestark#readme","bugs":{"url":"https://github.com/ice-lab/icestark/issues"},"dist":{"shasum":"a74754775d5589fc1ec50327190004e803580635","tarball":"https://registry.npmjs.org/@ice/stark-module/-/stark-module-1.2.0-0.tgz","fileCount":17,"integrity":"sha512-ftVhMoT9N4F2n2WQoi4Av8lwN1sa1v5BBbgn7rQM42uTqcsur43RPpERyQVpUJCXJI++3YbkS5siFWpIUp9x0Q==","signatures":[{"sig":"MEQCIGeQv56Ic+dpAvRXQCFannEJoTftO3qJZQRBhfpbD5D+AiA122rqAduXOOa/46nzDqvNDgXOlZNqD51AsgUAfavBEQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":44551,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfqN2qCRA9TVsSAnZWagAAPsgP/R8PCEOWBCut/gtdnyLt\ndrHLfWqWKYKKdnRsTgJV08T/yYdPk3v1ZhgHTsykxeTa5mZT9lBSDna92irM\nCwbspwXqbRw5/ZtO4KdeSlmGXUv2HI02TNWQ9WVn14dt4R8mgCpu0MD5bQNo\nwoEkdwGffLwljsFguPtyRvGJFZjV/OzaO2+zebgSpXWb/z56BKJLjTVFU6V8\nTNXsVujHmPvRcipi5Ng2F2Kdary2nwFdPMnXcTOFHiEmg8lobZHpnW/GuBWd\nGp0NJQAQ/YC2QkOm7y5EpvDLBoh4tZNOXyU8vZSbBpOiBnM7a68MdlwT+Z6d\n7HwjmwDc2HQOYs2QtU+r847bmyb03AO8LM8ayqoB366UvNSr632gt03sVowO\nG7nz351ijwjwBEJrL91WsL1spfhK+7612izL3fXOfeLLgaWZRd0sM1iu7mGz\ndrlmUzunL7ptbPsArm3fa8GNZU0eJ/mq4UbCfECdySIPUOzsAMIof2TFEimt\nHlyg+TtmvFlQhXAO2Yke6D3ZbXM29RKKZcKN8JWNODlz+aE8wq3DUYBsaN6u\nlYKSN12tLI1FmWi9a5qxsZiN4LouEly5MwxjeW5WCN5a1d2FCrImJVSDeOVS\nr3+xYj8HXwmJ2jzauD6ic5u/0A+ZF1G13b3QGFBp7VC6yMwKyYb6ovRvC0qt\nkuxw\r\n=ajSE\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"preset":"ts-jest","collectCoverage":true,"coverageDirectory":"./coverage/"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS"}},"readme":"# @ice/stark-module\n\n[![NPM version](https://img.shields.io/npm/v/@ice/stark-module.svg?style=flat)](https://npmjs.org/package/@ice/stark-module) [![Package Quality](https://npm.packagequality.com/shield/@ice%2Fstark-module.svg)](https://packagequality.com/#?package=@ice%2Fstark-module) [![build status](https://img.shields.io/travis/ice-lab/icestark.svg?style=flat-square)](https://travis-ci.org/ice-lab/icestark) [![Test coverage](https://img.shields.io/codecov/c/github/ice-lab/icestark.svg?style=flat-square)](https://codecov.io/gh/ice-lab/icestark) [![NPM downloads](http://img.shields.io/npm/dm/@ice/stark-module.svg?style=flat)](https://npmjs.org/package/@ice/stark-module) [![David deps](https://img.shields.io/david/ice-lab/icestark.svg?style=flat-square)](https://david-dm.org/ice-lab/icestark)\n\n## Installation\n\n```bash\n$ npm install @ice/stark-module --save\n```\n\n## Module LifeCycle\n\nspecify module lifeCycle when pack code as a micro module\n\n```js\nconst SampleComponent = () => {\n  return <div>Sample</div>;\n}\n\n// mount function will be trigger when mount micro module\nexport function mount(ModuleComponent, targetNode, props) {\n  ReactDOM.render(<ModuleComponent {...props} />, targetNode);\n}\n\n// unmount function will be trigger when unmount micro module\nexport function unmount(targetNode) {\n  ReactDOM.unmountComponentAtNode(targetNode);\n}\n\nexport default SampleComponent;\n```\n\n> pack module with module spec UMD\n\n## Usage\n\n### Basic Usage\n\n```jsx\nimport { MicroModule } from '@ice/stark-module';\n\nconst App = () => {\n  const moduleInfo = {\n    name: 'moduleName',\n    url: 'https://localhost/module.js',\n  }\n  return <MicroModule moduleInfo={moduleInfo} />;\n}\n```\n\n### Register Modules\n\n```jsx\nimport { MicroModule, registerModules, getModules } from '@ice/stark-module';\n\nregisterModules([\n  {\n    url: 'https://localhost/module-a.js',\n    name: 'module-a',\n  },\n  {\n    url: 'https://localhost/module-b.js',\n    name: 'module-b',\n  },\n]);\n\n// get module info registered by API registerModules\nconst moduleInfo = getModules();\n\nconst App = () => {\n  // after registerMdoules, use micro module by specify module name\n  return (\n    <div>\n      <MicroModule moduleName=\"module-a\" />\n      <MicroModule moduleName=\"module-b\" />\n    </div>\n  );\n}\n```\n\n### Clear Modules\n\n```js\nimport { registerModules, getModules } from '@ice/stark-module';\n\nregisterModules([\n  {\n    url: 'https://localhost/module-a.js',\n    name: 'module-a',\n  },\n]);\n// clear module information registered by API registerModules including content cache\nclearModules();\n```\n\n### Custom Lifecyle\n\n```jsx\nimport { MicroModule } from '@ice/stark-module';\n\nconst App = () => {\n  const moduleInfo = {\n    name: 'moduleName',\n    url: 'https://localhost/module.js',\n    mount: (ModuleComponent, mountNode) => {\n      console.log('custom mount');\n      ReactDOM.render(<ModuleComponent />, mountNode);\n    },\n  }\n  return <MicroModule moduleInfo={moduleInfo} />;\n}\n```\n\n### Custom mount component\n\n```jsx\nimport { mountModule, unmoutModule } from '@ice/stark-module';\n\nconst moduleInfo = {\n  name: 'moduleName',\n  url: 'https://localhost/module.js',\n};\n\nconst ModuleComponent = () => {\n  const renderNode = useRef(null);\n  useEffect(() => {\n    mountModule(moduleInfo, renderNode, {});\n    return unmoutModule(moduleInfo, renderNode);\n  }, []);\n  return (<div ref={renderNode}></div>);\n};\n```\n\n## Contributors\n\nFeel free to report any questions as an [issue](https://github.com/ice-lab/icestark/issues/new), we'd love to have your helping hand on `icestark`.\n\nIf you're interested in `icestark`, see [CONTRIBUTING.md](https://github.com/alibaba/ice/blob/master/.github/CONTRIBUTING.md) for more information to learn how to get started.\n\n## License\n\n[MIT](LICENSE)","scripts":{"test":"NODE_ENV=unittest jest","build":"rm -rf lib && tsc","watch":"tsc -w","coverage":"codecov","prepublishOnly":"npm run test && npm run build"},"_npmUser":{"name":"clarkxia","email":"xiawenwu41@gmail.com"},"repository":{"url":"git+https://github.com/ice-lab/icestark.git","type":"git"},"_npmVersion":"6.13.4","description":"toolkit for load standard micro-module","directories":{},"_nodeVersion":"10.19.0","dependencies":{"@ice/sandbox":"^1.0.3"},"publishConfig":{"registry":"http://registry.npmjs.com/"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.2.7","react":"^16.13.1","codecov":"^3.4.0","ts-jest":"^25.3.1","react-dom":"^16.13.1","typescript":"^3.8.3","@testing-library/react":"^10.0.3","@testing-library/jest-dom":"^5.5.0"},"peerDependencies":{"react":">=15.0.0","react-dom":">=15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/stark-module_1.2.0-0_1604902313892_0.5113232707296915","host":"s3://npm-registry-packages"}},"1.2.0-1":{"name":"@ice/stark-module","version":"1.2.0-1","keywords":["modules","icestark"],"author":"","license":"MIT","_id":"@ice/stark-module@1.2.0-1","maintainers":[{"name":"chenbin93","email":"chenbinad@gmail.com"},{"name":"solojiang","email":"feifeishen1996@gmail.com"},{"name":"rax-publisher","email":"rax-public@alibaba-inc.com"},{"name":"alvinhui","email":"alvin.hui@qq.com"},{"name":"yuanyan","email":"yuanyan.cao@gmail.com"},{"name":"clarkxia","email":"xiawenwu41@gmail.com"},{"name":"boiawang","email":"zhengwang2314@gmail.com"},{"name":"sobear","email":"sobear.me@gmail.com"}],"homepage":"https://github.com/ice-lab/icestark#readme","bugs":{"url":"https://github.com/ice-lab/icestark/issues"},"dist":{"shasum":"ec3bc3d72aaca69589ead3b59296d0b506a3d1e3","tarball":"https://registry.npmjs.org/@ice/stark-module/-/stark-module-1.2.0-1.tgz","fileCount":14,"integrity":"sha512-ocGEfLgFtWVuWmMKxOQMKxOVFAH4JDWI7puqQn0Ki2sW/B3pU5yvgMuGkT8GnjSzlClAaUFluW759MuMIT4jmQ==","signatures":[{"sig":"MEYCIQDQBWntkyToM5ZCcsnyTf/sdjljHvHktanQW80eab/YigIhAM+VxGHD86fu6vS62Si+H5TD51bcLx/0QoPVYE8yyGax","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":43986,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfs2nxCRA9TVsSAnZWagAAwlsP/1lt9ltBRFgOKnh4sxkd\nahsm8wz5c4CiRH0H6wLOtD5J61UsUBTz5vt86kqC0NqDCNQQpeluKQF48S1+\n+3cg6hfOl/6+PfJ+dgeuTEohy7HO5YdSErPf0xLJLKrqjQIjBQliAw7kjs72\nFCreolJ/uwJCU3XYn5gNqd5atAzTCuJTXZ0WPJcCqJfNHh0fDdJKq9PDMfL0\nsT/1iIPJKl0D2ONVTIuN9ZnNjXmTSBufpeCeQItbkoWLDv+6rm/glB6TU4Jc\nK5jt7ZzxtlWHeRND8AZ6YjUg/dpCKSBqbaEh3UxkV+XFy4FxyaALV+LEPYNy\nGz7b+poMIP3Lrq4ClYcJ1dWaZEWrKm+7OCw4G24AQHovVZDXg1SoYn5bKfyK\nD7sOzDljq1vBSqYTj5YykHk9iRRJOVuAU9NNyBExpmoNvnChr6g+aWSUvseK\nJTWdY+zJC99Y7phIx7i4JP6wfnpXb6/0D8DOJdx9H5LnjtngURUY3yIV/E1q\n41I1BMDnrah8gSILRiM35bwxVwInDoRRKuFf+jrTfRFffE59tFBo4/RTN2mE\n9mdcIT4rm1aUN9cMtHqENZq5nlun7xdYtqVOlscW95h+8MrhlpK/gbjYxyLd\nv9qcXZd04d6M4yJikGlMLxO2brsglLzbzUtnfUuEAoYPedEm7T5sQ/YJt9Fl\n/V4F\r\n=ywq8\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"preset":"ts-jest","collectCoverage":true,"coverageDirectory":"./coverage/"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS"}},"readme":"# @ice/stark-module\n\n[![NPM version](https://img.shields.io/npm/v/@ice/stark-module.svg?style=flat)](https://npmjs.org/package/@ice/stark-module) [![Package Quality](https://npm.packagequality.com/shield/@ice%2Fstark-module.svg)](https://packagequality.com/#?package=@ice%2Fstark-module) [![build status](https://img.shields.io/travis/ice-lab/icestark.svg?style=flat-square)](https://travis-ci.org/ice-lab/icestark) [![Test coverage](https://img.shields.io/codecov/c/github/ice-lab/icestark.svg?style=flat-square)](https://codecov.io/gh/ice-lab/icestark) [![NPM downloads](http://img.shields.io/npm/dm/@ice/stark-module.svg?style=flat)](https://npmjs.org/package/@ice/stark-module) [![David deps](https://img.shields.io/david/ice-lab/icestark.svg?style=flat-square)](https://david-dm.org/ice-lab/icestark)\n\n## Installation\n\n```bash\n$ npm install @ice/stark-module --save\n```\n\n## Module LifeCycle\n\nspecify module lifeCycle when pack code as a micro module\n\n```js\nconst SampleComponent = () => {\n  return <div>Sample</div>;\n}\n\n// mount function will be trigger when mount micro module\nexport function mount(ModuleComponent, targetNode, props) {\n  ReactDOM.render(<ModuleComponent {...props} />, targetNode);\n}\n\n// unmount function will be trigger when unmount micro module\nexport function unmount(targetNode) {\n  ReactDOM.unmountComponentAtNode(targetNode);\n}\n\nexport default SampleComponent;\n```\n\n> pack module with module spec UMD\n\n## Usage\n\n### Basic Usage\n\n```jsx\nimport { MicroModule } from '@ice/stark-module';\n\nconst App = () => {\n  const moduleInfo = {\n    name: 'moduleName',\n    url: 'https://localhost/module.js',\n  }\n  return <MicroModule moduleInfo={moduleInfo} />;\n}\n```\n\n### Register Modules\n\n```jsx\nimport { MicroModule, registerModules, getModules } from '@ice/stark-module';\n\nregisterModules([\n  {\n    url: 'https://localhost/module-a.js',\n    name: 'module-a',\n  },\n  {\n    url: 'https://localhost/module-b.js',\n    name: 'module-b',\n  },\n]);\n\n// get module info registered by API registerModules\nconst moduleInfo = getModules();\n\nconst App = () => {\n  // after registerMdoules, use micro module by specify module name\n  return (\n    <div>\n      <MicroModule moduleName=\"module-a\" />\n      <MicroModule moduleName=\"module-b\" />\n    </div>\n  );\n}\n```\n\n### Clear Modules\n\n```js\nimport { registerModules, getModules } from '@ice/stark-module';\n\nregisterModules([\n  {\n    url: 'https://localhost/module-a.js',\n    name: 'module-a',\n  },\n]);\n// clear module information registered by API registerModules including content cache\nclearModules();\n```\n\n### Custom Lifecyle\n\n```jsx\nimport { MicroModule } from '@ice/stark-module';\n\nconst App = () => {\n  const moduleInfo = {\n    name: 'moduleName',\n    url: 'https://localhost/module.js',\n    mount: (ModuleComponent, mountNode) => {\n      console.log('custom mount');\n      ReactDOM.render(<ModuleComponent />, mountNode);\n    },\n  }\n  return <MicroModule moduleInfo={moduleInfo} />;\n}\n```\n\n### Custom mount component\n\n```jsx\nimport { mountModule, unmoutModule } from '@ice/stark-module';\n\nconst moduleInfo = {\n  name: 'moduleName',\n  url: 'https://localhost/module.js',\n};\n\nconst ModuleComponent = () => {\n  const renderNode = useRef(null);\n  useEffect(() => {\n    mountModule(moduleInfo, renderNode, {});\n    return unmoutModule(moduleInfo, renderNode);\n  }, []);\n  return (<div ref={renderNode}></div>);\n};\n```\n\n## Contributors\n\nFeel free to report any questions as an [issue](https://github.com/ice-lab/icestark/issues/new), we'd love to have your helping hand on `icestark`.\n\nIf you're interested in `icestark`, see [CONTRIBUTING.md](https://github.com/alibaba/ice/blob/master/.github/CONTRIBUTING.md) for more information to learn how to get started.\n\n## License\n\n[MIT](LICENSE)","scripts":{"test":"NODE_ENV=unittest jest","build":"rm -rf lib && tsc","watch":"tsc -w","coverage":"codecov","prepublishOnly":"npm run test && npm run build"},"_npmUser":{"name":"clarkxia","email":"xiawenwu41@gmail.com"},"repository":{"url":"git+https://github.com/ice-lab/icestark.git","type":"git"},"_npmVersion":"6.13.4","description":"toolkit for load standard micro-module","directories":{},"_nodeVersion":"10.19.0","dependencies":{"@ice/sandbox":"^1.0.3"},"publishConfig":{"registry":"http://registry.npmjs.com/"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.2.7","react":"^16.13.1","codecov":"^3.4.0","ts-jest":"^25.3.1","react-dom":"^16.13.1","typescript":"^3.8.3","@testing-library/react":"^10.0.3","@testing-library/jest-dom":"^5.5.0"},"peerDependencies":{"react":">=15.0.0","react-dom":">=15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/stark-module_1.2.0-1_1605593585164_0.29608860725224306","host":"s3://npm-registry-packages"}},"1.2.0":{"name":"@ice/stark-module","version":"1.2.0","keywords":["modules","icestark"],"author":"","license":"MIT","_id":"@ice/stark-module@1.2.0","maintainers":[{"name":"sobear","email":"sobear.me@gmail.com"},{"name":"boiawang","email":"zhengwang2314@gmail.com"},{"name":"clarkxia","email":"xiawenwu41@gmail.com"},{"name":"yuanyan","email":"yuanyan.cao@gmail.com"},{"name":"alvinhui","email":"alvin.hui@qq.com"},{"name":"rax-publisher","email":"rax-public@alibaba-inc.com"},{"name":"solojiang","email":"feifeishen1996@gmail.com"},{"name":"chenbin93","email":"chenbinad@gmail.com"},{"name":"maoxiaoke","email":"thebigyellowbee@qq.com"}],"homepage":"https://github.com/ice-lab/icestark#readme","bugs":{"url":"https://github.com/ice-lab/icestark/issues"},"dist":{"shasum":"29046210ffe7bbf6b5ab309f060991cb8617b73f","tarball":"https://registry.npmjs.org/@ice/stark-module/-/stark-module-1.2.0.tgz","fileCount":12,"integrity":"sha512-NXN+zv4uLlZeeYbE4I8LAqGf5Tu+IupvZJXwj8Y13owuq/8r19Qhgrj5usvIlO6S4kyJvGM/TkKdx6kFJgm6xw==","signatures":[{"sig":"MEQCIHmhR+fOMk+BCICxoQPscPzRBYBQJcizfTohsj2VwPVAAiB/LO2AsQnl8dF3dNlBJ8xF41ywMQgu5x3v0wMA9bSdfQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":33967,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf1zXyCRA9TVsSAnZWagAAmUoP/R/puUf/4Rsu07fCOMhn\nsgxx1HHhedYZJraapLyE6riAdFdlaMi8t6TYM9/Nj6oohUYuefl9VoFWD/Iy\nJpLhnNT7u5HU5/IxC9XRpCluZ2x0qRjfpCnb1ByxMXVc5Ov8ERpayztKTUbN\nQw3L9qTlTIXUmdkXIjo/KUPojGnjC22vNlg99uM3K08/dAcI6UpUuWSNKZkv\nVjHGDhVV0ch0doMrM3k+p9zmTabEX49WH6XrFb4zmdiXNSeNV+J4nEUD6Ju9\nqlH99zYRdy2lpzWgL8r9XGxuuBEbi/zAll8KrCa9uHoujKOZxzmTX61+a5Nc\nZ26zjHzZeJPSWoKuo1bHBV3gqMErgXWvHPM+pYcZKgt0QTr4ZhmKXK98/Uhk\nY5IPTTCmHiy7Dn0NLGJl8uEyxkd/I9bC9HdR59RklIRy3mDH6RIUgg/sngmC\nH1NejtByuHqJXzT748pF6u6QkFxZM+k34dP14e9Nvpx04FxPQmDzMM0VdHRa\n/QSziktTF0zEK6W15yNSBe/DY+6Wt2QCOJpIoXjW31nzKnLuWkY+HdaVcdUk\njAij0d43Sx72aCpd9431e5NOKrIKApoI7Sf9iodA369fi8WegU88tDPRPtjO\n2PgjUNCDebp5ugmHinvvbwL0WY6e1AkXSP/eevaNpOEMo0byzCduAB66NlpM\n5wfz\r\n=LGFB\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"preset":"ts-jest","collectCoverage":true,"coverageDirectory":"./coverage/"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS"}},"scripts":{"test":"NODE_ENV=unittest jest","build":"rm -rf lib && tsc","watch":"tsc -w","coverage":"codecov","prepublishOnly":"npm run test && npm run build"},"_npmUser":{"name":"rax-publisher","email":"rax-public@alibaba-inc.com"},"repository":{"url":"git+https://github.com/ice-lab/icestark.git","type":"git"},"_npmVersion":"6.14.8","description":"toolkit for load standard micro-module","directories":{},"_nodeVersion":"10.23.0","dependencies":{"@ice/sandbox":"^1.0.3"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^25.2.7","react":"^16.13.1","codecov":"^3.4.0","ts-jest":"^25.3.1","react-dom":"^16.13.1","typescript":"^3.8.3","@testing-library/react":"^10.0.3","@testing-library/jest-dom":"^5.5.0"},"peerDependencies":{"react":">=15.0.0","react-dom":">=15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/stark-module_1.2.0_1607939570103_0.6915619436205742","host":"s3://npm-registry-packages"}},"1.3.0-0":{"name":"@ice/stark-module","version":"1.3.0-0","keywords":["modules","icestark"],"author":"","license":"MIT","_id":"@ice/stark-module@1.3.0-0","maintainers":[{"name":"sobear","email":"sobear.me@gmail.com"},{"name":"boiawang","email":"zhengwang2314@gmail.com"},{"name":"clarkxia","email":"xiawenwu41@gmail.com"},{"name":"yuanyan","email":"yuanyan.cao@gmail.com"},{"name":"alvinhui","email":"alvin.hui@qq.com"},{"name":"rax-publisher","email":"rax-public@alibaba-inc.com"},{"name":"solojiang","email":"feifeishen1996@gmail.com"},{"name":"chenbin93","email":"chenbinad@gmail.com"},{"name":"maoxiaoke","email":"thebigyellowbee@qq.com"}],"homepage":"https://github.com/ice-lab/icestark#readme","bugs":{"url":"https://github.com/ice-lab/icestark/issues"},"dist":{"shasum":"e023a31e975d61df2b2139c660bb65ebbd6e48c5","tarball":"https://registry.npmjs.org/@ice/stark-module/-/stark-module-1.3.0-0.tgz","fileCount":16,"integrity":"sha512-IdZvJymqZCNnzHRD3+6uTMMe+Yy9ZFpCMvRqa/P4FmHfAK60DrjTOzM177voNDEk9HUXjnyQbYnDyAh8MV4m0g==","signatures":[{"sig":"MEYCIQDd64zTQnJYYvcfZJed3/95JlX5GQT45e9ho3LksWR0FgIhAKiqH9BJalFVnwlEacCzTLombXQCwR1MYAm1KZjG6VB5","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":46616,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgHK6+CRA9TVsSAnZWagAAOFkP/iqnuy7rIIlw8Q6iPcP2\nsMOpOVPOIWJS9vfu396ppN9CTjBXYOHLRpUuwFZhktKmKBcKjleHKaRZTLiD\ngCGiYJCuOCz07875XLRgi7HuMx7QfiQgywlc2IhrFtAij+fK8VP9IWfvnTo1\nx9Yk75oiLVWES8uyTNJcOKYkc5wdTN8jLgkIwB8a69svN9o7vBwCPfGcFrN8\nAI7pe5ExSWYM2KbmZp1TgQbLgyKx5bnj5Tmrd3OuPaFnY/IKej7xFa1x/DuQ\n1aNHhglCgODLxTt+n6Wvc6uWW+T2ljJ045Wq+f19BfLHpQT+TTOgwmdPaqS+\nfTlWDiu2X3oaoZorVw4ds+CHELOo/8uWKcSBsF2AgWCgrPvnl/Rb3jteTxmW\nF37/DpMQq2Yksf6o89wkn2V+ScqxigxVEoDcsm2lsoZQ7SPRkieApH84oB9l\n2LycZ3+vlUX0pDijqG9mk1V61RenUsSiuKCwW4Hv1mxDbJVOBESygI6RIBWv\n9qPQWEKs3g2OPxRxUlim3q8o7YZS/wqaplJ4RdN0J2emT+Wau1L4eWkfRcHA\ns0rQxCRNyAWnX8RlBVdA62mj4n6RyyGc03y2A2VK3RBMpQDH+RCq/wMECx3q\n+ELeyaGSpL1/ZMz3kWBAcunwWCPLIyW5/FcByiwoUO9dX2PQXOWyI8n+CEXi\nmbYR\r\n=7YHA\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"preset":"ts-jest","collectCoverage":true,"coverageDirectory":"./coverage/"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS"}},"readme":"# @ice/stark-module\n\n[![NPM version](https://img.shields.io/npm/v/@ice/stark-module.svg?style=flat)](https://npmjs.org/package/@ice/stark-module) [![Package Quality](https://npm.packagequality.com/shield/@ice%2Fstark-module.svg)](https://packagequality.com/#?package=@ice%2Fstark-module) [![build status](https://img.shields.io/travis/ice-lab/icestark.svg?style=flat-square)](https://travis-ci.org/ice-lab/icestark) [![Test coverage](https://img.shields.io/codecov/c/github/ice-lab/icestark.svg?style=flat-square)](https://codecov.io/gh/ice-lab/icestark) [![NPM downloads](http://img.shields.io/npm/dm/@ice/stark-module.svg?style=flat)](https://npmjs.org/package/@ice/stark-module) [![David deps](https://img.shields.io/david/ice-lab/icestark.svg?style=flat-square)](https://david-dm.org/ice-lab/icestark)\n\n## Installation\n\n```bash\n$ npm install @ice/stark-module --save\n```\n\n## Module LifeCycle\n\nspecify module lifeCycle when pack code as a micro module\n\n```js\nconst SampleComponent = () => {\n  return <div>Sample</div>;\n}\n\n// mount function will be trigger when mount micro module\nexport function mount(ModuleComponent, targetNode, props) {\n  ReactDOM.render(<ModuleComponent {...props} />, targetNode);\n}\n\n// unmount function will be trigger when unmount micro module\nexport function unmount(targetNode) {\n  ReactDOM.unmountComponentAtNode(targetNode);\n}\n\nexport default SampleComponent;\n```\n\n> pack module with module spec UMD\n\n## Usage\n\n### Basic Usage\n\n```jsx\nimport { MicroModule } from '@ice/stark-module';\n\nconst App = () => {\n  const moduleInfo = {\n    name: 'moduleName',\n    url: 'https://localhost/module.js',\n  }\n  return <MicroModule moduleInfo={moduleInfo} />;\n}\n```\n\n### Register Modules\n\n```jsx\nimport { MicroModule, registerModules, getModules } from '@ice/stark-module';\n\nregisterModules([\n  {\n    url: 'https://localhost/module-a.js',\n    name: 'module-a',\n  },\n  {\n    url: 'https://localhost/module-b.js',\n    name: 'module-b',\n  },\n]);\n\n// get module info registered by API registerModules\nconst moduleInfo = getModules();\n\nconst App = () => {\n  // after registerMdoules, use micro module by specify module name\n  return (\n    <div>\n      <MicroModule moduleName=\"module-a\" />\n      <MicroModule moduleName=\"module-b\" />\n    </div>\n  );\n}\n```\n\n### Clear Modules\n\n```js\nimport { registerModules, getModules } from '@ice/stark-module';\n\nregisterModules([\n  {\n    url: 'https://localhost/module-a.js',\n    name: 'module-a',\n  },\n]);\n// clear module information registered by API registerModules including content cache\nclearModules();\n```\n\n### Custom Lifecyle\n\n```jsx\nimport { MicroModule } from '@ice/stark-module';\n\nconst App = () => {\n  const moduleInfo = {\n    name: 'moduleName',\n    url: 'https://localhost/module.js',\n    mount: (ModuleComponent, mountNode) => {\n      console.log('custom mount');\n      ReactDOM.render(<ModuleComponent />, mountNode);\n    },\n  }\n  return <MicroModule moduleInfo={moduleInfo} />;\n}\n```\n\n### Custom mount component\n\n```jsx\nimport { mountModule, unmoutModule } from '@ice/stark-module';\n\nconst moduleInfo = {\n  name: 'moduleName',\n  url: 'https://localhost/module.js',\n};\n\nconst ModuleComponent = () => {\n  const renderNode = useRef(null);\n  useEffect(() => {\n    mountModule(moduleInfo, renderNode, {});\n    return unmoutModule(moduleInfo, renderNode);\n  }, []);\n  return (<div ref={renderNode}></div>);\n};\n```\n\n## Contributors\n\nFeel free to report any questions as an [issue](https://github.com/ice-lab/icestark/issues/new), we'd love to have your helping hand on `icestark`.\n\nIf you're interested in `icestark`, see [CONTRIBUTING.md](https://github.com/alibaba/ice/blob/master/.github/CONTRIBUTING.md) for more information to learn how to get started.\n\n## License\n\n[MIT](LICENSE)","scripts":{"test":"NODE_ENV=unittest jest","build":"rm -rf lib && tsc","watch":"tsc -w","coverage":"codecov","prepublishOnly":"npm run test && npm run build"},"_npmUser":{"name":"maoxiaoke","email":"thebigyellowbee@qq.com"},"repository":{"url":"git+https://github.com/ice-lab/icestark.git","type":"git"},"_npmVersion":"6.14.4","description":"toolkit for load standard micro-module","directories":{},"_nodeVersion":"14.0.0","dependencies":{"@ice/sandbox":"1.1.0-0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.2.7","react":"^16.13.1","codecov":"^3.4.0","ts-jest":"^25.3.1","react-dom":"^16.13.1","typescript":"^3.8.3","@testing-library/react":"^10.0.3","@testing-library/jest-dom":"^5.5.0"},"peerDependencies":{"react":">=15.0.0","react-dom":">=15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/stark-module_1.3.0-0_1612492477754_0.5245375790017339","host":"s3://npm-registry-packages"}},"1.3.0-1":{"name":"@ice/stark-module","version":"1.3.0-1","keywords":["modules","icestark"],"author":"","license":"MIT","_id":"@ice/stark-module@1.3.0-1","maintainers":[{"name":"sobear","email":"sobear.me@gmail.com"},{"name":"boiawang","email":"zhengwang2314@gmail.com"},{"name":"clarkxia","email":"xiawenwu41@gmail.com"},{"name":"yuanyan","email":"yuanyan.cao@gmail.com"},{"name":"alvinhui","email":"alvin.hui@qq.com"},{"name":"rax-publisher","email":"rax-public@alibaba-inc.com"},{"name":"solojiang","email":"feifeishen1996@gmail.com"},{"name":"chenbin93","email":"chenbinad@gmail.com"},{"name":"maoxiaoke","email":"thebigyellowbee@qq.com"}],"homepage":"https://github.com/ice-lab/icestark#readme","bugs":{"url":"https://github.com/ice-lab/icestark/issues"},"dist":{"shasum":"d9fc5ba8e53e5e5fdf272a443866dc5cce28b012","tarball":"https://registry.npmjs.org/@ice/stark-module/-/stark-module-1.3.0-1.tgz","fileCount":16,"integrity":"sha512-O07edKhrbIcEe6DTv/bgtxyR+KsAuRJjcAQQnOVuPXHie2yE5ZSpkpVcyWFUndvglldTNd6XQ1ZSpzq76gU1PQ==","signatures":[{"sig":"MEQCIDQxBHzbpdR47LwhVcFCUzCi1n98ZhsPMQdgMD+8p4daAiBREUclAe272DbhQio3oXLoUAKmt1d4h+YkNXgE1Ohbrg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":46903,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgM7ZWCRA9TVsSAnZWagAAxaMQAJTuv4ca/IwSxeXKnf+R\nqo5KVljSVU2sOOXDRXohqF1mPgYkTklZWS8xUR0LQjwLwTKx3ImPdoBa9Ob9\nO4rChyMPQcPpibQ8tNT+srlF6OT1Y6SbWrTve32LqQD2KVOu9ofKRcdiM2gI\nVh07NNOdsc44ANEsVft2Sz9Y3rrgf5WPqC8JCJVBq37YOfPCrQ/1sBzIb0Q4\nRcJCiPjw7X/Rdf0PXDTE+CES81g83YpWW89gjK9ExM4VS/nHeYFkn7tF5zKg\nm9MOHDYix7DRhXiDtq/t5w8RHpcsnxxfdCtzz5Pwq/8uaBbgZX3sN1uZRC/a\nfP8oYOyKPHVKKYmpushzvzrMwLQgKWiLxmtTdJI3mlaJKnAEgdrzv1K3icua\nqWodv4RJCYIMn2Po2bNwAzOvtnOsqldzR9axM/4RRkRBQx6KGS6qstP6xZUT\nUkSxpGN2mo7w9j+NyqLISG+jLu7/ZYbtvmhMJKu8+L8pfMEmSPlldIHqhwVv\nPj0XNkC7FNVy6WdmYHDjG8MVNOXpLfGAXI/eB2DihCkbweiwaDz71V9V4t3L\n7WIK9510dhQWYe19rqNaJg0WwdVi0pDfSwmRs3IpLcLu6fTbsbjuc8gY/Gxq\no/9VRVffXYFznshtGxgSiCKJSDYOwCcpkkQw7IUFP3tRchYHuhruS4ZGeQv/\n/Mt0\r\n=QjbM\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"preset":"ts-jest","collectCoverage":true,"coverageDirectory":"./coverage/"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS"}},"readme":"# @ice/stark-module\n\n[![NPM version](https://img.shields.io/npm/v/@ice/stark-module.svg?style=flat)](https://npmjs.org/package/@ice/stark-module) [![Package Quality](https://npm.packagequality.com/shield/@ice%2Fstark-module.svg)](https://packagequality.com/#?package=@ice%2Fstark-module) [![build status](https://img.shields.io/travis/ice-lab/icestark.svg?style=flat-square)](https://travis-ci.org/ice-lab/icestark) [![Test coverage](https://img.shields.io/codecov/c/github/ice-lab/icestark.svg?style=flat-square)](https://codecov.io/gh/ice-lab/icestark) [![NPM downloads](http://img.shields.io/npm/dm/@ice/stark-module.svg?style=flat)](https://npmjs.org/package/@ice/stark-module) [![David deps](https://img.shields.io/david/ice-lab/icestark.svg?style=flat-square)](https://david-dm.org/ice-lab/icestark)\n\n## Installation\n\n```bash\n$ npm install @ice/stark-module --save\n```\n\n## Module LifeCycle\n\nspecify module lifeCycle when pack code as a micro module\n\n```js\nconst SampleComponent = () => {\n  return <div>Sample</div>;\n}\n\n// mount function will be trigger when mount micro module\nexport function mount(ModuleComponent, targetNode, props) {\n  ReactDOM.render(<ModuleComponent {...props} />, targetNode);\n}\n\n// unmount function will be trigger when unmount micro module\nexport function unmount(targetNode) {\n  ReactDOM.unmountComponentAtNode(targetNode);\n}\n\nexport default SampleComponent;\n```\n\n> pack module with module spec UMD\n\n## Usage\n\n### Basic Usage\n\n```jsx\nimport { MicroModule } from '@ice/stark-module';\n\nconst App = () => {\n  const moduleInfo = {\n    name: 'moduleName',\n    url: 'https://localhost/module.js',\n  }\n  return <MicroModule moduleInfo={moduleInfo} />;\n}\n```\n\n### Register Modules\n\n```jsx\nimport { MicroModule, registerModules, getModules } from '@ice/stark-module';\n\nregisterModules([\n  {\n    url: 'https://localhost/module-a.js',\n    name: 'module-a',\n  },\n  {\n    url: 'https://localhost/module-b.js',\n    name: 'module-b',\n  },\n]);\n\n// get module info registered by API registerModules\nconst moduleInfo = getModules();\n\nconst App = () => {\n  // after registerMdoules, use micro module by specify module name\n  return (\n    <div>\n      <MicroModule moduleName=\"module-a\" />\n      <MicroModule moduleName=\"module-b\" />\n    </div>\n  );\n}\n```\n\n### Clear Modules\n\n```js\nimport { registerModules, getModules } from '@ice/stark-module';\n\nregisterModules([\n  {\n    url: 'https://localhost/module-a.js',\n    name: 'module-a',\n  },\n]);\n// clear module information registered by API registerModules including content cache\nclearModules();\n```\n\n### Custom Lifecyle\n\n```jsx\nimport { MicroModule } from '@ice/stark-module';\n\nconst App = () => {\n  const moduleInfo = {\n    name: 'moduleName',\n    url: 'https://localhost/module.js',\n    mount: (ModuleComponent, mountNode) => {\n      console.log('custom mount');\n      ReactDOM.render(<ModuleComponent />, mountNode);\n    },\n  }\n  return <MicroModule moduleInfo={moduleInfo} />;\n}\n```\n\n### Custom mount component\n\n```jsx\nimport { mountModule, unmoutModule } from '@ice/stark-module';\n\nconst moduleInfo = {\n  name: 'moduleName',\n  url: 'https://localhost/module.js',\n};\n\nconst ModuleComponent = () => {\n  const renderNode = useRef(null);\n  useEffect(() => {\n    mountModule(moduleInfo, renderNode, {});\n    return unmoutModule(moduleInfo, renderNode);\n  }, []);\n  return (<div ref={renderNode}></div>);\n};\n```\n\n## Contributors\n\nFeel free to report any questions as an [issue](https://github.com/ice-lab/icestark/issues/new), we'd love to have your helping hand on `icestark`.\n\nIf you're interested in `icestark`, see [CONTRIBUTING.md](https://github.com/alibaba/ice/blob/master/.github/CONTRIBUTING.md) for more information to learn how to get started.\n\n## License\n\n[MIT](LICENSE)","scripts":{"test":"NODE_ENV=unittest jest","build":"rm -rf lib && tsc","watch":"tsc -w","coverage":"codecov","prepublishOnly":"npm run test && npm run build"},"_npmUser":{"name":"maoxiaoke","email":"thebigyellowbee@qq.com"},"repository":{"url":"git+https://github.com/ice-lab/icestark.git","type":"git"},"_npmVersion":"6.14.4","description":"toolkit for load standard micro-module","directories":{},"_nodeVersion":"14.0.0","dependencies":{"@ice/sandbox":"^1.0.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.2.7","react":"^16.13.1","codecov":"^3.4.0","ts-jest":"^25.3.1","react-dom":"^16.13.1","typescript":"^3.8.3","@testing-library/react":"^10.0.3","@testing-library/jest-dom":"^5.5.0"},"peerDependencies":{"react":">=15.0.0","react-dom":">=15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/stark-module_1.3.0-1_1614001750323_0.13560198206144713","host":"s3://npm-registry-packages"}},"1.3.0-2":{"name":"@ice/stark-module","version":"1.3.0-2","keywords":["modules","icestark"],"author":"","license":"MIT","_id":"@ice/stark-module@1.3.0-2","maintainers":[{"name":"sobear","email":"sobear.me@gmail.com"},{"name":"boiawang","email":"zhengwang2314@gmail.com"},{"name":"clarkxia","email":"xiawenwu41@gmail.com"},{"name":"yuanyan","email":"yuanyan.cao@gmail.com"},{"name":"alvinhui","email":"alvin.hui@qq.com"},{"name":"rax-publisher","email":"rax-public@alibaba-inc.com"},{"name":"solojiang","email":"feifeishen1996@gmail.com"},{"name":"chenbin93","email":"chenbinad@gmail.com"},{"name":"maoxiaoke","email":"thebigyellowbee@qq.com"}],"homepage":"https://github.com/ice-lab/icestark#readme","bugs":{"url":"https://github.com/ice-lab/icestark/issues"},"dist":{"shasum":"6074e4c1669095c8e63ba28985375b64b15973b9","tarball":"https://registry.npmjs.org/@ice/stark-module/-/stark-module-1.3.0-2.tgz","fileCount":16,"integrity":"sha512-rnUsdfUBQZrQN4TSPNNxXtmFVC4/pBpzshkPjwEEwY9u8Rn6hxTji1dsK3F96Lc+2jheiwpmsV/85PUakzdyIA==","signatures":[{"sig":"MEUCIQCxWZ8stn0nQvZuCZPjZAY3fph1J6qPyct9ln837Cx7sQIgX4+IH4CrlT6FiaVi3Gj5JXTAITmXBwrhLv+4auBfptg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":46904,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgNHKSCRA9TVsSAnZWagAAtdoP/2RU/48PG2z0cVmyjrN8\nXpfEZMbTBSXlqF1nAYTa4Uz6RXbaBRaBf1yeQrBoNPNHGNn5uk7Ft5hndKYQ\nBensJNEIbp47vsgp0BPDoQuNbxVoyB6wn3i/DUQns1mSkeOcHoeU8EAaaqXj\nEohJKYqX+pw4TnWBR5ULLcV4XJgQ/+j6ObFvcQkQRQ6EncrAKHphQSJC/wXZ\nuSXqrfVv7owgct8W5QEWDhn6rBVto9/GlzceifUDRsgtJ0e1OP+slWWmW9dM\nUmLEu5Wr09fvlhwzqxa5oA5+Dj+KlKBa2N4AbD1+ChimRzaMG+KoASUCd9zR\nDAkyUDiVVDsoKWG+KsNrxMS+rWE91LERv90h7KGqOvdC/7Ch055thlF/lSbH\nxaaWEqb2oJcIhmGGfXsS/SwBI3gI7NhqcvgvpXEqWwm3AYUuq6xfdmPkfxyl\n5s+t6ZMtaakM8ufMipkAFavXfd44gVQ5N/lC02zGzlTlX48Y19+H1h+G2w8Y\nwxEqHOYjggJxnsYRnnEAAh/6F4vC9lLkIn15dErIOW598BWru8T+stWbD+D1\nBPu/m6wdLoX7mvYPMUvacRtUnkGKoC11c3pODqv2q8js7qXFr2ltDrN4+Rog\npVNh7VYjx83ZnYexWFEAd52AWxNpU0m8M2nemLmDlxXpBexRLi9Ohurbd5bg\nSVTE\r\n=J3r3\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"preset":"ts-jest","collectCoverage":true,"coverageDirectory":"./coverage/"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS"}},"readme":"# @ice/stark-module\n\n[![NPM version](https://img.shields.io/npm/v/@ice/stark-module.svg?style=flat)](https://npmjs.org/package/@ice/stark-module) [![Package Quality](https://npm.packagequality.com/shield/@ice%2Fstark-module.svg)](https://packagequality.com/#?package=@ice%2Fstark-module) [![build status](https://img.shields.io/travis/ice-lab/icestark.svg?style=flat-square)](https://travis-ci.org/ice-lab/icestark) [![Test coverage](https://img.shields.io/codecov/c/github/ice-lab/icestark.svg?style=flat-square)](https://codecov.io/gh/ice-lab/icestark) [![NPM downloads](http://img.shields.io/npm/dm/@ice/stark-module.svg?style=flat)](https://npmjs.org/package/@ice/stark-module) [![David deps](https://img.shields.io/david/ice-lab/icestark.svg?style=flat-square)](https://david-dm.org/ice-lab/icestark)\n\n## Installation\n\n```bash\n$ npm install @ice/stark-module --save\n```\n\n## Module LifeCycle\n\nspecify module lifeCycle when pack code as a micro module\n\n```js\nconst SampleComponent = () => {\n  return <div>Sample</div>;\n}\n\n// mount function will be trigger when mount micro module\nexport function mount(ModuleComponent, targetNode, props) {\n  ReactDOM.render(<ModuleComponent {...props} />, targetNode);\n}\n\n// unmount function will be trigger when unmount micro module\nexport function unmount(targetNode) {\n  ReactDOM.unmountComponentAtNode(targetNode);\n}\n\nexport default SampleComponent;\n```\n\n> pack module with module spec UMD\n\n## Usage\n\n### Basic Usage\n\n```jsx\nimport { MicroModule } from '@ice/stark-module';\n\nconst App = () => {\n  const moduleInfo = {\n    name: 'moduleName',\n    url: 'https://localhost/module.js',\n  }\n  return <MicroModule moduleInfo={moduleInfo} />;\n}\n```\n\n### Register Modules\n\n```jsx\nimport { MicroModule, registerModules, getModules } from '@ice/stark-module';\n\nregisterModules([\n  {\n    url: 'https://localhost/module-a.js',\n    name: 'module-a',\n  },\n  {\n    url: 'https://localhost/module-b.js',\n    name: 'module-b',\n  },\n]);\n\n// get module info registered by API registerModules\nconst moduleInfo = getModules();\n\nconst App = () => {\n  // after registerMdoules, use micro module by specify module name\n  return (\n    <div>\n      <MicroModule moduleName=\"module-a\" />\n      <MicroModule moduleName=\"module-b\" />\n    </div>\n  );\n}\n```\n\n### Clear Modules\n\n```js\nimport { registerModules, getModules } from '@ice/stark-module';\n\nregisterModules([\n  {\n    url: 'https://localhost/module-a.js',\n    name: 'module-a',\n  },\n]);\n// clear module information registered by API registerModules including content cache\nclearModules();\n```\n\n### Custom Lifecyle\n\n```jsx\nimport { MicroModule } from '@ice/stark-module';\n\nconst App = () => {\n  const moduleInfo = {\n    name: 'moduleName',\n    url: 'https://localhost/module.js',\n    mount: (ModuleComponent, mountNode) => {\n      console.log('custom mount');\n      ReactDOM.render(<ModuleComponent />, mountNode);\n    },\n  }\n  return <MicroModule moduleInfo={moduleInfo} />;\n}\n```\n\n### Custom mount component\n\n```jsx\nimport { mountModule, unmoutModule } from '@ice/stark-module';\n\nconst moduleInfo = {\n  name: 'moduleName',\n  url: 'https://localhost/module.js',\n};\n\nconst ModuleComponent = () => {\n  const renderNode = useRef(null);\n  useEffect(() => {\n    mountModule(moduleInfo, renderNode, {});\n    return unmoutModule(moduleInfo, renderNode);\n  }, []);\n  return (<div ref={renderNode}></div>);\n};\n```\n\n## Contributors\n\nFeel free to report any questions as an [issue](https://github.com/ice-lab/icestark/issues/new), we'd love to have your helping hand on `icestark`.\n\nIf you're interested in `icestark`, see [CONTRIBUTING.md](https://github.com/alibaba/ice/blob/master/.github/CONTRIBUTING.md) for more information to learn how to get started.\n\n## License\n\n[MIT](LICENSE)","scripts":{"test":"NODE_ENV=unittest jest","build":"rm -rf lib && tsc","watch":"tsc -w","coverage":"codecov","prepublishOnly":"npm run test && npm run build"},"_npmUser":{"name":"maoxiaoke","email":"thebigyellowbee@qq.com"},"repository":{"url":"git+https://github.com/ice-lab/icestark.git","type":"git"},"_npmVersion":"6.14.4","description":"toolkit for load standard micro-module","directories":{},"_nodeVersion":"14.0.0","dependencies":{"@ice/sandbox":"1.1.0-0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.2.7","react":"^16.13.1","codecov":"^3.4.0","ts-jest":"^25.3.1","react-dom":"^16.13.1","typescript":"^3.8.3","@testing-library/react":"^10.0.3","@testing-library/jest-dom":"^5.5.0"},"peerDependencies":{"react":">=15.0.0","react-dom":">=15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/stark-module_1.3.0-2_1614049938307_0.8982528860746009","host":"s3://npm-registry-packages"}},"1.3.0-3":{"name":"@ice/stark-module","version":"1.3.0-3","keywords":["modules","icestark"],"author":"","license":"MIT","_id":"@ice/stark-module@1.3.0-3","maintainers":[{"name":"sobear","email":"sobear.me@gmail.com"},{"name":"boiawang","email":"zhengwang2314@gmail.com"},{"name":"clarkxia","email":"xiawenwu41@gmail.com"},{"name":"yuanyan","email":"yuanyan.cao@gmail.com"},{"name":"alvinhui","email":"alvin.hui@qq.com"},{"name":"rax-publisher","email":"rax-public@alibaba-inc.com"},{"name":"solojiang","email":"feifeishen1996@gmail.com"},{"name":"chenbin93","email":"chenbinad@gmail.com"},{"name":"maoxiaoke","email":"thebigyellowbee@qq.com"}],"homepage":"https://github.com/ice-lab/icestark#readme","bugs":{"url":"https://github.com/ice-lab/icestark/issues"},"dist":{"shasum":"b298e56c0aa7155b06437ec8b49147fffc7a9a87","tarball":"https://registry.npmjs.org/@ice/stark-module/-/stark-module-1.3.0-3.tgz","fileCount":16,"integrity":"sha512-Umag20nOudEgRotSXm0+BoD6N1ZB4Jto8+dKZeGsNKINP1O+LxGtT8pNJ9R9JSlRfoYG2F8PbuIq1Q+D9FNJZA==","signatures":[{"sig":"MEUCICydhwgNAtpuTA8YtA/i0d9gicFhQ5lXvlwVqHemmeQmAiEA8s7Drv5wAAzEbC7E/DXDo29A0xzXIllsLeBr0skAguc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":46559,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgNP7HCRA9TVsSAnZWagAANikP/1VmucyHc3mjekLFWRLU\nNxNFs7HTMnJTbPyv9/GLLnIClMQXZlin6lwdum+q1mcOesI93ICOaGyMvDlu\ngR0ZQivuHUnY6JegMF9tCI0xWDT67xXgvqfY1ubPeKsUkhZubBBvcTVJ7RdX\nUxF31PCcyhET1VoU1pwZVuu3Ft+cgr2/AP4xPI3iS0B47KWqeClQmxNY/QiT\nIVFB9kBiYOZbjQPzhBC3STPxiF0+6DFtOJACRMnu2VoxwnBqtZ7NbRa1zuZn\nAkUu+83zXOlijWF+tgTKDE3Z3WoIVocVy+sWMpp/PQH4d6iYDP6xbJqv0uMv\ngHX9Y2Jh7EEiKCZJZKsEQuRI620Av6lXZqqiAfpTr0mJ+eTaZey7KxaV44MR\nLt21VbuUWpP+Q2zWub/ipQECkDl/PfVO+ta5isxzivo6LrkRXIzlRIZoXvj0\nu8klv3xdbAmfiZdIcYYWmhXMiR4mYBPcukgcWiOiTOKRSHTG+4cw7MfNPs1w\nlUzZRzOSJwHME/sPqY/aA7ktImCd9EhELIefYxbX5279dn9b4u3HcPLD/3T5\nRg3JJ8pZkBXP26n+wjVc+gFpULgh5Orav5UeZHscNSQci3u8dpUbCdT2zT8T\nnLQ3b33Ul6vpBOnb4R5Y26TtpiYB97gzqd78XQZH9KS10goG1fi9/gH6MzP7\n3Dqx\r\n=JEOr\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"preset":"ts-jest","collectCoverage":true,"coverageDirectory":"./coverage/"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS"}},"readme":"# @ice/stark-module\n\n[![NPM version](https://img.shields.io/npm/v/@ice/stark-module.svg?style=flat)](https://npmjs.org/package/@ice/stark-module) [![Package Quality](https://npm.packagequality.com/shield/@ice%2Fstark-module.svg)](https://packagequality.com/#?package=@ice%2Fstark-module) [![build status](https://img.shields.io/travis/ice-lab/icestark.svg?style=flat-square)](https://travis-ci.org/ice-lab/icestark) [![Test coverage](https://img.shields.io/codecov/c/github/ice-lab/icestark.svg?style=flat-square)](https://codecov.io/gh/ice-lab/icestark) [![NPM downloads](http://img.shields.io/npm/dm/@ice/stark-module.svg?style=flat)](https://npmjs.org/package/@ice/stark-module) [![David deps](https://img.shields.io/david/ice-lab/icestark.svg?style=flat-square)](https://david-dm.org/ice-lab/icestark)\n\n## Installation\n\n```bash\n$ npm install @ice/stark-module --save\n```\n\n## Module LifeCycle\n\nspecify module lifeCycle when pack code as a micro module\n\n```js\nconst SampleComponent = () => {\n  return <div>Sample</div>;\n}\n\n// mount function will be trigger when mount micro module\nexport function mount(ModuleComponent, targetNode, props) {\n  ReactDOM.render(<ModuleComponent {...props} />, targetNode);\n}\n\n// unmount function will be trigger when unmount micro module\nexport function unmount(targetNode) {\n  ReactDOM.unmountComponentAtNode(targetNode);\n}\n\nexport default SampleComponent;\n```\n\n> pack module with module spec UMD\n\n## Usage\n\n### Basic Usage\n\n```jsx\nimport { MicroModule } from '@ice/stark-module';\n\nconst App = () => {\n  const moduleInfo = {\n    name: 'moduleName',\n    url: 'https://localhost/module.js',\n  }\n  return <MicroModule moduleInfo={moduleInfo} />;\n}\n```\n\n### Register Modules\n\n```jsx\nimport { MicroModule, registerModules, getModules } from '@ice/stark-module';\n\nregisterModules([\n  {\n    url: 'https://localhost/module-a.js',\n    name: 'module-a',\n  },\n  {\n    url: 'https://localhost/module-b.js',\n    name: 'module-b',\n  },\n]);\n\n// get module info registered by API registerModules\nconst moduleInfo = getModules();\n\nconst App = () => {\n  // after registerMdoules, use micro module by specify module name\n  return (\n    <div>\n      <MicroModule moduleName=\"module-a\" />\n      <MicroModule moduleName=\"module-b\" />\n    </div>\n  );\n}\n```\n\n### Clear Modules\n\n```js\nimport { registerModules, getModules } from '@ice/stark-module';\n\nregisterModules([\n  {\n    url: 'https://localhost/module-a.js',\n    name: 'module-a',\n  },\n]);\n// clear module information registered by API registerModules including content cache\nclearModules();\n```\n\n### Custom Lifecyle\n\n```jsx\nimport { MicroModule } from '@ice/stark-module';\n\nconst App = () => {\n  const moduleInfo = {\n    name: 'moduleName',\n    url: 'https://localhost/module.js',\n    mount: (ModuleComponent, mountNode) => {\n      console.log('custom mount');\n      ReactDOM.render(<ModuleComponent />, mountNode);\n    },\n  }\n  return <MicroModule moduleInfo={moduleInfo} />;\n}\n```\n\n### Custom mount component\n\n```jsx\nimport { mountModule, unmoutModule } from '@ice/stark-module';\n\nconst moduleInfo = {\n  name: 'moduleName',\n  url: 'https://localhost/module.js',\n};\n\nconst ModuleComponent = () => {\n  const renderNode = useRef(null);\n  useEffect(() => {\n    mountModule(moduleInfo, renderNode, {});\n    return unmoutModule(moduleInfo, renderNode);\n  }, []);\n  return (<div ref={renderNode}></div>);\n};\n```\n\n## Contributors\n\nFeel free to report any questions as an [issue](https://github.com/ice-lab/icestark/issues/new), we'd love to have your helping hand on `icestark`.\n\nIf you're interested in `icestark`, see [CONTRIBUTING.md](https://github.com/alibaba/ice/blob/master/.github/CONTRIBUTING.md) for more information to learn how to get started.\n\n## License\n\n[MIT](LICENSE)","scripts":{"test":"NODE_ENV=unittest jest","build":"rm -rf lib && tsc","watch":"tsc -w","coverage":"codecov","prepublishOnly":"npm run test && npm run build"},"_npmUser":{"name":"maoxiaoke","email":"thebigyellowbee@qq.com"},"repository":{"url":"git+https://github.com/ice-lab/icestark.git","type":"git"},"_npmVersion":"6.14.4","description":"toolkit for load standard micro-module","directories":{},"_nodeVersion":"14.0.0","dependencies":{"@ice/sandbox":"1.1.0-0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.2.7","react":"^16.13.1","codecov":"^3.4.0","ts-jest":"^25.3.1","react-dom":"^16.13.1","typescript":"^3.8.3","@testing-library/react":"^10.0.3","@testing-library/jest-dom":"^5.5.0"},"peerDependencies":{"react":">=15.0.0","react-dom":">=15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/stark-module_1.3.0-3_1614085831072_0.4065563202632927","host":"s3://npm-registry-packages"}},"1.3.0-4":{"name":"@ice/stark-module","version":"1.3.0-4","keywords":["modules","icestark"],"author":"","license":"MIT","_id":"@ice/stark-module@1.3.0-4","maintainers":[{"name":"sobear","email":"sobear.me@gmail.com"},{"name":"boiawang","email":"zhengwang2314@gmail.com"},{"name":"clarkxia","email":"xiawenwu41@gmail.com"},{"name":"yuanyan","email":"yuanyan.cao@gmail.com"},{"name":"alvinhui","email":"alvin.hui@qq.com"},{"name":"rax-publisher","email":"rax-public@alibaba-inc.com"},{"name":"solojiang","email":"feifeishen1996@gmail.com"},{"name":"chenbin93","email":"chenbinad@gmail.com"},{"name":"maoxiaoke","email":"thebigyellowbee@qq.com"}],"homepage":"https://github.com/ice-lab/icestark#readme","bugs":{"url":"https://github.com/ice-lab/icestark/issues"},"dist":{"shasum":"fd9828f4e7f1f377c9353e8be762c42a29cd1f08","tarball":"https://registry.npmjs.org/@ice/stark-module/-/stark-module-1.3.0-4.tgz","fileCount":16,"integrity":"sha512-Z2wZpYPXmeSY74O0eRah634pvse+E8+q6A9qPXaVoWsPkXkSGUNI3NhSS5KAJ2/PwIU1B3XaG/yx7/mM31is/Q==","signatures":[{"sig":"MEUCIQDyUjxdgF9XwKlaYIXNoKeOmZIb/pGtTt+Jk00dL2pDQwIgPUAPY7nnhgI1h+3UWONy+i071tUa6qn6Zq1U8gRlVhc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":45915,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgNctRCRA9TVsSAnZWagAAr9MP/1afxofCntyJ12VGNByI\nnujYG13E33+UOVlnlSqpxM+ohZNmzl/2t+gT0JKaiVFxY9xEmK0sSXA9bLrZ\no54yqnqri9in05Hh2vM0ff1i39lRpoXysmSDLiP9yNEfDIkw8keVxzPjfJtO\nOsGQJKE/GB6+mosz5FYl6OWGExw0gxvZUNt6/1Jas+3zMJwW4Il7DPza9Ayy\n6K5IfD4R4rKKMK1laqDut+wTdWavSuV7pr7e6MSEkeSV5o65jhwMOV+HRIM3\n4cowoNaprQkd99kcizWiJwuJbjimy58bxG1ksikDEeIf2AUqZBcv6vcQYKJn\ntMNTsJr+1hvl16YXiTbHPpBH/FwQGjg3Uz0NVzlnEytUzVb2MCVwlj/T4FtA\nX9VuhYGPkqTd7T7Sj03Lu7HUvPVK6cc2WSIo3p+jNG9P9L2eJicnvFt7sR6H\nwyJjQiDNJbn8NrccTROxs1eZpRVgKP/DzOHFX4ZeXAtbZ1tk9Kcrw3icA8II\nC7o0meBldVzJRmoGBNvzhmAEgElhfDwoyzf8PpdS2eLYJcTEVsSIgFKY23QW\nhJafHgGNI8Q7vZMlaWg4cqcNa5T0iiIDfLtOMbwLGhJQVs1ufmpXpwxoqoK8\nlLH1dHL7exSCKPlkQU7Pg4tCLTlo+j9X7RahU7R0OuRBbHvbS2H+vPvoluOy\n5vbZ\r\n=blZ5\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"preset":"ts-jest","collectCoverage":true,"coverageDirectory":"./coverage/"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS"}},"readme":"# @ice/stark-module\n\n[![NPM version](https://img.shields.io/npm/v/@ice/stark-module.svg?style=flat)](https://npmjs.org/package/@ice/stark-module) [![Package Quality](https://npm.packagequality.com/shield/@ice%2Fstark-module.svg)](https://packagequality.com/#?package=@ice%2Fstark-module) [![build status](https://img.shields.io/travis/ice-lab/icestark.svg?style=flat-square)](https://travis-ci.org/ice-lab/icestark) [![Test coverage](https://img.shields.io/codecov/c/github/ice-lab/icestark.svg?style=flat-square)](https://codecov.io/gh/ice-lab/icestark) [![NPM downloads](http://img.shields.io/npm/dm/@ice/stark-module.svg?style=flat)](https://npmjs.org/package/@ice/stark-module) [![David deps](https://img.shields.io/david/ice-lab/icestark.svg?style=flat-square)](https://david-dm.org/ice-lab/icestark)\n\n## Installation\n\n```bash\n$ npm install @ice/stark-module --save\n```\n\n## Module LifeCycle\n\nspecify module lifeCycle when pack code as a micro module\n\n```js\nconst SampleComponent = () => {\n  return <div>Sample</div>;\n}\n\n// mount function will be trigger when mount micro module\nexport function mount(ModuleComponent, targetNode, props) {\n  ReactDOM.render(<ModuleComponent {...props} />, targetNode);\n}\n\n// unmount function will be trigger when unmount micro module\nexport function unmount(targetNode) {\n  ReactDOM.unmountComponentAtNode(targetNode);\n}\n\nexport default SampleComponent;\n```\n\n> pack module with module spec UMD\n\n## Usage\n\n### Basic Usage\n\n```jsx\nimport { MicroModule } from '@ice/stark-module';\n\nconst App = () => {\n  const moduleInfo = {\n    name: 'moduleName',\n    url: 'https://localhost/module.js',\n  }\n  return <MicroModule moduleInfo={moduleInfo} />;\n}\n```\n\n### Register Modules\n\n```jsx\nimport { MicroModule, registerModules, getModules } from '@ice/stark-module';\n\nregisterModules([\n  {\n    url: 'https://localhost/module-a.js',\n    name: 'module-a',\n  },\n  {\n    url: 'https://localhost/module-b.js',\n    name: 'module-b',\n  },\n]);\n\n// get module info registered by API registerModules\nconst moduleInfo = getModules();\n\nconst App = () => {\n  // after registerMdoules, use micro module by specify module name\n  return (\n    <div>\n      <MicroModule moduleName=\"module-a\" />\n      <MicroModule moduleName=\"module-b\" />\n    </div>\n  );\n}\n```\n\n### Clear Modules\n\n```js\nimport { registerModules, getModules } from '@ice/stark-module';\n\nregisterModules([\n  {\n    url: 'https://localhost/module-a.js',\n    name: 'module-a',\n  },\n]);\n// clear module information registered by API registerModules including content cache\nclearModules();\n```\n\n### Custom Lifecyle\n\n```jsx\nimport { MicroModule } from '@ice/stark-module';\n\nconst App = () => {\n  const moduleInfo = {\n    name: 'moduleName',\n    url: 'https://localhost/module.js',\n    mount: (ModuleComponent, mountNode) => {\n      console.log('custom mount');\n      ReactDOM.render(<ModuleComponent />, mountNode);\n    },\n  }\n  return <MicroModule moduleInfo={moduleInfo} />;\n}\n```\n\n### Custom mount component\n\n```jsx\nimport { mountModule, unmoutModule } from '@ice/stark-module';\n\nconst moduleInfo = {\n  name: 'moduleName',\n  url: 'https://localhost/module.js',\n};\n\nconst ModuleComponent = () => {\n  const renderNode = useRef(null);\n  useEffect(() => {\n    mountModule(moduleInfo, renderNode, {});\n    return unmoutModule(moduleInfo, renderNode);\n  }, []);\n  return (<div ref={renderNode}></div>);\n};\n```\n\n## Contributors\n\nFeel free to report any questions as an [issue](https://github.com/ice-lab/icestark/issues/new), we'd love to have your helping hand on `icestark`.\n\nIf you're interested in `icestark`, see [CONTRIBUTING.md](https://github.com/alibaba/ice/blob/master/.github/CONTRIBUTING.md) for more information to learn how to get started.\n\n## License\n\n[MIT](LICENSE)","scripts":{"test":"NODE_ENV=unittest jest","build":"rm -rf lib && tsc","watch":"tsc -w","coverage":"codecov","prepublishOnly":"npm run test && npm run build"},"_npmUser":{"name":"maoxiaoke","email":"thebigyellowbee@qq.com"},"repository":{"url":"git+https://github.com/ice-lab/icestark.git","type":"git"},"_npmVersion":"6.14.4","description":"toolkit for load standard micro-module","directories":{},"_nodeVersion":"14.0.0","dependencies":{"@ice/sandbox":"1.1.0-0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.2.7","react":"^16.13.1","codecov":"^3.4.0","ts-jest":"^25.3.1","react-dom":"^16.13.1","typescript":"^3.8.3","@testing-library/react":"^10.0.3","@testing-library/jest-dom":"^5.5.0"},"peerDependencies":{"react":">=15.0.0","react-dom":">=15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/stark-module_1.3.0-4_1614138192787_0.3717868697781528","host":"s3://npm-registry-packages"}},"1.3.0":{"name":"@ice/stark-module","version":"1.3.0","keywords":["modules","icestark"],"author":"","license":"MIT","_id":"@ice/stark-module@1.3.0","maintainers":[{"name":"sobear","email":"sobear.me@gmail.com"},{"name":"boiawang","email":"zhengwang2314@gmail.com"},{"name":"clarkxia","email":"xiawenwu41@gmail.com"},{"name":"yuanyan","email":"yuanyan.cao@gmail.com"},{"name":"alvinhui","email":"alvin.hui@qq.com"},{"name":"rax-publisher","email":"rax-public@alibaba-inc.com"},{"name":"solojiang","email":"feifeishen1996@gmail.com"},{"name":"chenbin93","email":"chenbinad@gmail.com"},{"name":"maoxiaoke","email":"thebigyellowbee@qq.com"}],"homepage":"https://github.com/ice-lab/icestark#readme","bugs":{"url":"https://github.com/ice-lab/icestark/issues"},"dist":{"shasum":"e37430a6718b5fd29ddcad1452816007e9c9adb0","tarball":"https://registry.npmjs.org/@ice/stark-module/-/stark-module-1.3.0.tgz","fileCount":17,"integrity":"sha512-4W4mPMIItFHIPa/QmPPtWvDBdnCkYeQlSML3toyafK4HK+++ywADmq1fsS+g6lfJ5zIEBfFJl3kiq/0KhphMjA==","signatures":[{"sig":"MEUCICfOkNjo7KamPEGGekeztojJylPrE83svx+vheb+LDgIAiEApQl/RfEqYX4BjLPsiexHJHEHsEJhQ2UCEYy4I3Wj6Rg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":44094,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgN1XqCRA9TVsSAnZWagAAA2YQAKE1NOxCrLRtRugcapFf\nGWxDmwXKrnXPl58ztMi2qRKLPBZ9bpA9xJamgZXqOj2ZD87HeB2FK8SzxprA\n6094JEkBNCUm4H4Q6w+qqZFWu9t6gKhDvECRmjv2LIM0desXb+nTDXtRTuhn\nTl4jUfOiCtWcZiOjREygZdJQCwtzaEJGVdIukBQU+N0RvbGAkTz1FZDwDRvg\ng0n0aHId+sHLGCZ5qRdaAaGzGfoDxVn59J7zZ90lOOmv1INM1Wr+hEGULT/q\n4+fYveR1HRyVanq/c1g36HShDvM45nieEffZkR26K/Ya5USIVCPR84P9De0x\n65uyTRXw0GpakA5t7cANXY+2KY7IdKq8uLJpu7wt0/FTYuLb5/x+22ykizM1\no11X82MCati7PMJrJm+ouYCGSZOCfi/YX4iOPFZhJBqwZZKaObTeAtVm8wEs\nFAblUb/+Y2ChjBoWBAt/0f3d0lEFGrpB9inMEPb4zmqpKETXOs5LaTAD2o0q\n/TvZW5q3RmzLpFC/pN3OGQI30Z0E35GuW8glsnC2HQQ99Txra9LbcoLEHdyG\nC/KczxqeGKijLRx9MFjbedonF3S8gaP8QGq8kIKoEbMkbqq18u35zHFOqQ6L\nEMMTHhiBaT02yyQvXIdX91K1tWzk3U+a0V1IKSdwquF2jJwVylzNSyUVha9n\n91Ho\r\n=9h6s\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"preset":"ts-jest","collectCoverage":true,"coverageDirectory":"./coverage/"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS"}},"scripts":{"test":"NODE_ENV=unittest jest","build":"rm -rf lib && tsc","watch":"tsc -w","coverage":"codecov","prepublishOnly":"npm run test && npm run build"},"_npmUser":{"name":"rax-publisher","email":"rax-public@alibaba-inc.com"},"repository":{"url":"git+https://github.com/ice-lab/icestark.git","type":"git"},"_npmVersion":"6.14.11","description":"toolkit for load standard micro-module","directories":{},"_nodeVersion":"10.23.3","dependencies":{"@ice/sandbox":"^1.1.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^25.2.7","react":"^16.13.1","codecov":"^3.4.0","ts-jest":"^25.3.1","react-dom":"^16.13.1","typescript":"^3.8.3","@testing-library/react":"^10.0.3","@testing-library/jest-dom":"^5.5.0"},"peerDependencies":{"react":">=15.0.0","react-dom":">=15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/stark-module_1.3.0_1614239209599_0.3638762802366613","host":"s3://npm-registry-packages"}},"1.3.1-0":{"name":"@ice/stark-module","version":"1.3.1-0","keywords":["modules","icestark"],"author":"","license":"MIT","_id":"@ice/stark-module@1.3.1-0","maintainers":[{"name":"sobear","email":"sobear.me@gmail.com"},{"name":"boiawang","email":"zhengwang2314@gmail.com"},{"name":"clarkxia","email":"xiawenwu41@gmail.com"},{"name":"yuanyan","email":"yuanyan.cao@gmail.com"},{"name":"alvinhui","email":"alvin.hui@qq.com"},{"name":"rax-publisher","email":"rax-public@alibaba-inc.com"},{"name":"solojiang","email":"feifeishen1996@gmail.com"},{"name":"chenbin93","email":"chenbinad@gmail.com"},{"name":"maoxiaoke","email":"thebigyellowbee@qq.com"}],"homepage":"https://github.com/ice-lab/icestark#readme","bugs":{"url":"https://github.com/ice-lab/icestark/issues"},"dist":{"shasum":"31b145e5ea18bece512fd3779f45d90729f59f52","tarball":"https://registry.npmjs.org/@ice/stark-module/-/stark-module-1.3.1-0.tgz","fileCount":17,"integrity":"sha512-2+/eMkGJRD4uAOqk5uIq0uOhgmm89CEOUUhiHXKqKVNXHsRPUgTBRmRTd56CdeYxs77gZ6EntRH2wvz9xkQDeA==","signatures":[{"sig":"MEYCIQCGVoSGDE5PeTXXrZKotMIdGTuNAtcZnD5UXEd8/nsF+AIhAIhaAuBeSXr4oatdt5JeN+VBYsdVl+q2xkccWh3ZFPwE","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":46364,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgPKZtCRA9TVsSAnZWagAAgLEP/3NBJ2FzBzr05uc5qiCS\nenkfH+Me29xGNcX/Ar79ZVxjhwcyguy8Q2j4Iz3871/j+7FV3KITw0ze+OKN\nl9yMSAIL8UNKKO80eruRLi2pjURSBf0gtdTyrwiZwsP40n8h1t4nedDlyCiO\nZ6mMa111M+unLfeFyp5pkA4rfE9XGtIuTumR5WSNan4vlNhAVm6gK5cDtP4P\nSH3DUIlC7KmD08Ol1QYdfP65aeGDRttOhmnrQWSem7ASc/CTxQyZeUOh390a\nkzmadZHZyXqv9JrQShLRwX62J6aImbqDbe0M3UiSK97yjRhvXyLuqYvxK6jA\nCq7oBkcjAMTj2iDHjnPCF+ZDBgQACaf5lsBN7M1TdZf306sLWuUptEZX3fXC\nu+a/L46+0lDKsMDkf2FP7etd1tv7Mhhsk1NZ+8IR/R5Xr+9VbKF8xoPdu/fU\n9BFhwfFP2vi4ALa2yTLJGcMCd8gSSGeWMgAxzDa1Mtp/Z1nAb93JDRkGh9jP\n5mNV9oyvrw2uzh0063eQU1zczk3q6YD5lCSXR7s0uFXO3xngOqZkFP8fK/c5\nLfQfX0eX2jbBSTuWBtxOQ/f73yTLa41lUgPL4NotAJ68CsamrZsBJoA6BlE0\nj1waXrn1MYBZP/oZebv91kigE7sVusTJCzEjRPhNgzR9DHXegcI7x2l8SfFE\nE8IE\r\n=8YF3\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"preset":"ts-jest","collectCoverage":true,"coverageDirectory":"./coverage/"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS"}},"readme":"# @ice/stark-module\n\n[![NPM version](https://img.shields.io/npm/v/@ice/stark-module.svg?style=flat)](https://npmjs.org/package/@ice/stark-module) [![Package Quality](https://npm.packagequality.com/shield/@ice%2Fstark-module.svg)](https://packagequality.com/#?package=@ice%2Fstark-module) [![build status](https://img.shields.io/travis/ice-lab/icestark.svg?style=flat-square)](https://travis-ci.org/ice-lab/icestark) [![Test coverage](https://img.shields.io/codecov/c/github/ice-lab/icestark.svg?style=flat-square)](https://codecov.io/gh/ice-lab/icestark) [![NPM downloads](http://img.shields.io/npm/dm/@ice/stark-module.svg?style=flat)](https://npmjs.org/package/@ice/stark-module) [![David deps](https://img.shields.io/david/ice-lab/icestark.svg?style=flat-square)](https://david-dm.org/ice-lab/icestark)\n\n## Installation\n\n```bash\n$ npm install @ice/stark-module --save\n```\n\n## Module LifeCycle\n\nspecify module lifeCycle when pack code as a micro module\n\n```js\nconst SampleComponent = () => {\n  return <div>Sample</div>;\n}\n\n// mount function will be trigger when mount micro module\nexport function mount(ModuleComponent, targetNode, props) {\n  ReactDOM.render(<ModuleComponent {...props} />, targetNode);\n}\n\n// unmount function will be trigger when unmount micro module\nexport function unmount(targetNode) {\n  ReactDOM.unmountComponentAtNode(targetNode);\n}\n\nexport default SampleComponent;\n```\n\n> pack module with module spec UMD\n\n## Usage\n\n### Basic Usage\n\n```jsx\nimport { MicroModule } from '@ice/stark-module';\n\nconst App = () => {\n  const moduleInfo = {\n    name: 'moduleName',\n    url: 'https://localhost/module.js',\n  }\n  return <MicroModule moduleInfo={moduleInfo} />;\n}\n```\n\n### Register Modules\n\n```jsx\nimport { MicroModule, registerModules, getModules } from '@ice/stark-module';\n\nregisterModules([\n  {\n    url: 'https://localhost/module-a.js',\n    name: 'module-a',\n  },\n  {\n    url: 'https://localhost/module-b.js',\n    name: 'module-b',\n  },\n]);\n\n// get module info registered by API registerModules\nconst moduleInfo = getModules();\n\nconst App = () => {\n  // after registerMdoules, use micro module by specify module name\n  return (\n    <div>\n      <MicroModule moduleName=\"module-a\" />\n      <MicroModule moduleName=\"module-b\" />\n    </div>\n  );\n}\n```\n\n### Clear Modules\n\n```js\nimport { registerModules, getModules } from '@ice/stark-module';\n\nregisterModules([\n  {\n    url: 'https://localhost/module-a.js',\n    name: 'module-a',\n  },\n]);\n// clear module information registered by API registerModules including content cache\nclearModules();\n```\n\n### Custom Lifecyle\n\n```jsx\nimport { MicroModule } from '@ice/stark-module';\n\nconst App = () => {\n  const moduleInfo = {\n    name: 'moduleName',\n    url: 'https://localhost/module.js',\n    mount: (ModuleComponent, mountNode) => {\n      console.log('custom mount');\n      ReactDOM.render(<ModuleComponent />, mountNode);\n    },\n  }\n  return <MicroModule moduleInfo={moduleInfo} />;\n}\n```\n\n### Custom mount component\n\n```jsx\nimport { mountModule, unmoutModule } from '@ice/stark-module';\n\nconst moduleInfo = {\n  name: 'moduleName',\n  url: 'https://localhost/module.js',\n};\n\nconst ModuleComponent = () => {\n  const renderNode = useRef(null);\n  useEffect(() => {\n    mountModule(moduleInfo, renderNode, {});\n    return unmoutModule(moduleInfo, renderNode);\n  }, []);\n  return (<div ref={renderNode}></div>);\n};\n```\n\n## Contributors\n\nFeel free to report any questions as an [issue](https://github.com/ice-lab/icestark/issues/new), we'd love to have your helping hand on `icestark`.\n\nIf you're interested in `icestark`, see [CONTRIBUTING.md](https://github.com/alibaba/ice/blob/master/.github/CONTRIBUTING.md) for more information to learn how to get started.\n\n## License\n\n[MIT](LICENSE)","scripts":{"test":"NODE_ENV=unittest jest","build":"rm -rf lib && tsc","watch":"tsc -w","coverage":"codecov","prepublishOnly":"npm run test && npm run build"},"_npmUser":{"name":"maoxiaoke","email":"thebigyellowbee@qq.com"},"repository":{"url":"git+https://github.com/ice-lab/icestark.git","type":"git"},"_npmVersion":"6.14.4","description":"toolkit for load standard micro-module","directories":{},"_nodeVersion":"14.0.0","dependencies":{"@ice/sandbox":"^1.1.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.2.7","react":"^16.13.1","codecov":"^3.4.0","ts-jest":"^25.3.1","react-dom":"^16.13.1","typescript":"^3.8.3","@testing-library/react":"^10.0.3","@testing-library/jest-dom":"^5.5.0"},"peerDependencies":{"react":">=15.0.0","react-dom":">=15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/stark-module_1.3.1-0_1614587500901_0.24187304864963566","host":"s3://npm-registry-packages"}},"1.3.1-1":{"name":"@ice/stark-module","version":"1.3.1-1","keywords":["modules","icestark"],"author":"","license":"MIT","_id":"@ice/stark-module@1.3.1-1","maintainers":[{"name":"sobear","email":"sobear.me@gmail.com"},{"name":"boiawang","email":"zhengwang2314@gmail.com"},{"name":"clarkxia","email":"xiawenwu41@gmail.com"},{"name":"yuanyan","email":"yuanyan.cao@gmail.com"},{"name":"alvinhui","email":"alvin.hui@qq.com"},{"name":"rax-publisher","email":"rax-public@alibaba-inc.com"},{"name":"solojiang","email":"feifeishen1996@gmail.com"},{"name":"chenbin93","email":"chenbinad@gmail.com"},{"name":"maoxiaoke","email":"thebigyellowbee@qq.com"}],"homepage":"https://github.com/ice-lab/icestark#readme","bugs":{"url":"https://github.com/ice-lab/icestark/issues"},"dist":{"shasum":"a2ed7183b4280aa7a7784e8c7e2552d6c0bd50df","tarball":"https://registry.npmjs.org/@ice/stark-module/-/stark-module-1.3.1-1.tgz","fileCount":19,"integrity":"sha512-+DcKO/0LOQ8J2PGYela//kx/LnYn3ibuRdq8PCgZOnwB+YNiGZvxDgtoJagt2urP0jdt+ICVXX8L/JqwUt6SUQ==","signatures":[{"sig":"MEUCIBEF3wgh2cWy3xpHCmucTrmMf2wcSgoUYHf828Jo+dqFAiEAyo6l7LcanvPTKG/ALWD1aw496Pe3Iy/8jIq3K/hzzhE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49137,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgSKiDCRA9TVsSAnZWagAA/t4P/2dcN5XViiGg0gsukOcF\n5VHFkFR2K9b1Spikf3vK0Of+TDoqA5edsUCmUTGqGt3VmDzxq/ykVhYpkL+4\nDDvVVi/vrXxL0FDBH4OhtwUIMNVxvj1wqjQ9kS+OtsyYhYGLlT5e59JhYRWn\nRKjxAPLBW6e6gNi1DH5Lq6yEQGxAKi9vzTjLsGdb4T71/vNGJ2A0z6IOeiao\nLCid6IZGUqC3nszQeLWvb16+eNeYij8f7yQwLtLb2PLBu/eT2Bjl7A8UdQXi\nxfey8ETKyzRPHOsZtwAKLGgEIISSZlIZnedLKrn6+qRSZyuSSnEnli9+/ibt\n5SL8W6Ak+sg7jgCqWnS8vLtmVo09uDjbFdqKQ7KrNwQz5xE9CSlaMDuGLpNl\ni0+Qp/3vpPz+GgNiwgXKCQiNPvrcNU/556gUyyuclnyrFZSxyPzoC6gCGNhx\nHDUjXhPC5hyTG2abpl9Bhfk9BkJ+3ITIF+Iuhu0UXHaFInOVSHVS8QLjIq5k\nkFGHhO4Zvao8StAZVzSk/gLPwgIO7MlaNszMeKDLvrP1hJuMAzxPWfWPyI8U\nYNifwSKABljBHtTUlzETBcqvInt8JvljpaatP3IPJmR4Adpo4SDXRFBHJ5tQ\nf+SDnetYEcx1UTRRT5EZoV8RxGDZBVKt4dzb+rhMGtafdg5rI3RBHXM6442B\nvxim\r\n=5fRX\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"preset":"ts-jest","collectCoverage":true,"coverageDirectory":"./coverage/"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS"}},"readme":"# @ice/stark-module\n\n[![NPM version](https://img.shields.io/npm/v/@ice/stark-module.svg?style=flat)](https://npmjs.org/package/@ice/stark-module) [![Package Quality](https://npm.packagequality.com/shield/@ice%2Fstark-module.svg)](https://packagequality.com/#?package=@ice%2Fstark-module) [![build status](https://img.shields.io/travis/ice-lab/icestark.svg?style=flat-square)](https://travis-ci.org/ice-lab/icestark) [![Test coverage](https://img.shields.io/codecov/c/github/ice-lab/icestark.svg?style=flat-square)](https://codecov.io/gh/ice-lab/icestark) [![NPM downloads](http://img.shields.io/npm/dm/@ice/stark-module.svg?style=flat)](https://npmjs.org/package/@ice/stark-module) [![David deps](https://img.shields.io/david/ice-lab/icestark.svg?style=flat-square)](https://david-dm.org/ice-lab/icestark)\n\n## Installation\n\n```bash\n$ npm install @ice/stark-module --save\n```\n\n## Module LifeCycle\n\nspecify module lifeCycle when pack code as a micro module\n\n```js\nconst SampleComponent = () => {\n  return <div>Sample</div>;\n}\n\n// mount function will be trigger when mount micro module\nexport function mount(ModuleComponent, targetNode, props) {\n  ReactDOM.render(<ModuleComponent {...props} />, targetNode);\n}\n\n// unmount function will be trigger when unmount micro module\nexport function unmount(targetNode) {\n  ReactDOM.unmountComponentAtNode(targetNode);\n}\n\nexport default SampleComponent;\n```\n\n> pack module with module spec UMD\n\n## Usage\n\n### Basic Usage\n\n```jsx\nimport { MicroModule } from '@ice/stark-module';\n\nconst App = () => {\n  const moduleInfo = {\n    name: 'moduleName',\n    url: 'https://localhost/module.js',\n  }\n  return <MicroModule moduleInfo={moduleInfo} />;\n}\n```\n\n### Register Modules\n\n```jsx\nimport { MicroModule, registerModules, getModules } from '@ice/stark-module';\n\nregisterModules([\n  {\n    url: 'https://localhost/module-a.js',\n    name: 'module-a',\n  },\n  {\n    url: 'https://localhost/module-b.js',\n    name: 'module-b',\n  },\n]);\n\n// get module info registered by API registerModules\nconst moduleInfo = getModules();\n\nconst App = () => {\n  // after registerMdoules, use micro module by specify module name\n  return (\n    <div>\n      <MicroModule moduleName=\"module-a\" />\n      <MicroModule moduleName=\"module-b\" />\n    </div>\n  );\n}\n```\n\n### Clear Modules\n\n```js\nimport { registerModules, getModules } from '@ice/stark-module';\n\nregisterModules([\n  {\n    url: 'https://localhost/module-a.js',\n    name: 'module-a',\n  },\n]);\n// clear module information registered by API registerModules including content cache\nclearModules();\n```\n\n### Custom Lifecyle\n\n```jsx\nimport { MicroModule } from '@ice/stark-module';\n\nconst App = () => {\n  const moduleInfo = {\n    name: 'moduleName',\n    url: 'https://localhost/module.js',\n    mount: (ModuleComponent, mountNode) => {\n      console.log('custom mount');\n      ReactDOM.render(<ModuleComponent />, mountNode);\n    },\n  }\n  return <MicroModule moduleInfo={moduleInfo} />;\n}\n```\n\n### Custom mount component\n\n```jsx\nimport { mountModule, unmoutModule } from '@ice/stark-module';\n\nconst moduleInfo = {\n  name: 'moduleName',\n  url: 'https://localhost/module.js',\n};\n\nconst ModuleComponent = () => {\n  const renderNode = useRef(null);\n  useEffect(() => {\n    mountModule(moduleInfo, renderNode, {});\n    return () => {\n      unmoutModule(moduleInfo, renderNode);\n    }\n  }, []);\n  return (<div ref={renderNode}></div>);\n};\n```\n\n## Contributors\n\nFeel free to report any questions as an [issue](https://github.com/ice-lab/icestark/issues/new), we'd love to have your helping hand on `icestark`.\n\nIf you're interested in `icestark`, see [CONTRIBUTING.md](https://github.com/alibaba/ice/blob/master/.github/CONTRIBUTING.md) for more information to learn how to get started.\n\n## License\n\n[MIT](LICENSE)","scripts":{"test":"NODE_ENV=unittest jest","build":"rm -rf lib && tsc","watch":"tsc -w","coverage":"codecov","prepublishOnly":"npm run test && npm run build"},"_npmUser":{"name":"maoxiaoke","email":"thebigyellowbee@qq.com"},"repository":{"url":"git+https://github.com/ice-lab/icestark.git","type":"git"},"_npmVersion":"6.14.4","description":"toolkit for load standard micro-module","directories":{},"_nodeVersion":"14.0.0","dependencies":{"@ice/sandbox":"^1.1.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.2.7","react":"^16.13.1","codecov":"^3.4.0","ts-jest":"^25.3.1","react-dom":"^16.13.1","typescript":"^3.8.3","@testing-library/react":"^10.0.3","@testing-library/jest-dom":"^5.5.0"},"peerDependencies":{"react":">=15.0.0","react-dom":">=15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/stark-module_1.3.1-1_1615374466688_0.9549356411571992","host":"s3://npm-registry-packages"}},"1.3.1":{"name":"@ice/stark-module","version":"1.3.1","keywords":["modules","icestark"],"author":"","license":"MIT","_id":"@ice/stark-module@1.3.1","maintainers":[{"name":"sobear","email":"sobear.me@gmail.com"},{"name":"boiawang","email":"zhengwang2314@gmail.com"},{"name":"clarkxia","email":"xiawenwu41@gmail.com"},{"name":"yuanyan","email":"yuanyan.cao@gmail.com"},{"name":"alvinhui","email":"alvin.hui@qq.com"},{"name":"rax-publisher","email":"rax-public@alibaba-inc.com"},{"name":"solojiang","email":"feifeishen1996@gmail.com"},{"name":"chenbin93","email":"chenbinad@gmail.com"},{"name":"maoxiaoke","email":"thebigyellowbee@qq.com"}],"homepage":"https://github.com/ice-lab/icestark#readme","bugs":{"url":"https://github.com/ice-lab/icestark/issues"},"dist":{"shasum":"ac5180c0e111ede7fdb712d3646ad25b1097342f","tarball":"https://registry.npmjs.org/@ice/stark-module/-/stark-module-1.3.1.tgz","fileCount":17,"integrity":"sha512-DgqeIpN64T5uI7I5CzbTCbUsKQUz3oUWZWBV58ZuomKJyLCfeC0Xw2EYiGN/ywGZ2wiA47oSlMyhwzXArmsXhw==","signatures":[{"sig":"MEUCIH5yaWEA0UY/n5TZlGFHpJRYHAQO6At+hGNjlbwqGHcJAiEA+9KYsfeZyGpG3O2XgjxUOqlrU7PKf2LsqT7klXTmyiQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":46614,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgSdAzCRA9TVsSAnZWagAAqNoP/2zRa0TLSL9F/krULLHq\nsryXTzDLxmywWAnLhp2C6ethd6FM63RI35bASqQ2r6z4vUO3cC84kIfp7Qf5\n1Dt6rs0M5CrJCkajD5PQetPNi6eOUHM7eBCepNwx44aq3T4iz98OHxCZ1Q1B\n5g/sHnvkrwdmgDaOdj9u077HW4qZYtImNASsH3A73hZcMRP6/+THzJ74iprx\ng0T3j9clLqQ+nCfP499W/4ZjzHH7cl4Hvd2dlspH+u4FwCcI73QcjthqQP+l\nZBemwMKrmalTCA+k5ta2PM+EYDQwLuC7swUcDZWr6xaKbteqyQbDO7DAbhHi\nwSoXcTS6WJHkSUyJT0BGuPa68WJR6EyKPH4Ih7KuLLluS8yz+7dN/hIodeKU\nfksiHLQKnVCodQ4AXoW2JdSvYjvYiioBofqH2EqZGJSPn1BO9RuNJS3CU9UB\nP7eBoQe5BMVdWnJh3YhS8R5w0fdVl9pjmemwxiCbxGGz6JPDEFhLfXm8oSSG\ndbgaxyQdNc5z06n2Bg3s/CpfUw/vGISMRGiJGiWHDl4+F0ZgGtvdYUKq2peQ\nqCPziKp94Wnclv80FTAon30fa2l3xaQ+3cT8mjuYDgdYOqt6Tk7sYTWAMhYy\nSvDwQwdImU91Zh07uZRHHYflgTisOvrAYgXH1NBGv6DigLc9HareSDQ8Nv3w\nQ1wf\r\n=BsC2\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"preset":"ts-jest","collectCoverage":true,"coverageDirectory":"./coverage/"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS"}},"scripts":{"test":"NODE_ENV=unittest jest","build":"rm -rf lib && tsc","watch":"tsc -w","coverage":"codecov","prepublishOnly":"npm run test && npm run build"},"_npmUser":{"name":"rax-publisher","email":"rax-public@alibaba-inc.com"},"repository":{"url":"git+https://github.com/ice-lab/icestark.git","type":"git"},"_npmVersion":"6.14.11","description":"toolkit for load standard micro-module","directories":{},"_nodeVersion":"10.24.0","dependencies":{"@ice/sandbox":"^1.1.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^25.2.7","react":"^16.13.1","codecov":"^3.4.0","ts-jest":"^25.3.1","react-dom":"^16.13.1","typescript":"^3.8.3","@testing-library/react":"^10.0.3","@testing-library/jest-dom":"^5.5.0"},"peerDependencies":{"react":">=15.0.0","react-dom":">=15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/stark-module_1.3.1_1615450163245_0.5784952547495856","host":"s3://npm-registry-packages"}},"1.4.0-0":{"name":"@ice/stark-module","version":"1.4.0-0","keywords":["modules","icestark"],"author":"","license":"MIT","_id":"@ice/stark-module@1.4.0-0","maintainers":[{"name":"sobear","email":"sobear.me@gmail.com"},{"name":"boiawang","email":"zhengwang2314@gmail.com"},{"name":"clarkxia","email":"xiawenwu41@gmail.com"},{"name":"yuanyan","email":"yuanyan.cao@gmail.com"},{"name":"alvinhui","email":"alvin.hui@qq.com"},{"name":"rax-publisher","email":"rax-public@alibaba-inc.com"},{"name":"solojiang","email":"feifeishen1996@gmail.com"},{"name":"chenbin93","email":"chenbinad@gmail.com"},{"name":"maoxiaoke","email":"thebigyellowbee@qq.com"}],"homepage":"https://github.com/ice-lab/icestark#readme","bugs":{"url":"https://github.com/ice-lab/icestark/issues"},"dist":{"shasum":"6714fe40b0f2a05d1ea91e92487aef38e234a98c","tarball":"https://registry.npmjs.org/@ice/stark-module/-/stark-module-1.4.0-0.tgz","fileCount":21,"integrity":"sha512-LIQ2WA5Wam4uY7n56G4DK6M7Vu3cQWOLsaAzVV5+rBqLa5K3bRCXJzoxNgFlNmgBj03gxuKz6+AqvA63ODuNAw==","signatures":[{"sig":"MEQCIHqeTVvBebOd1RciN6rG0KnXv2izqkVlOSd7wLH7fRxwAiAT9MDmrpDCScDtJCeQCFkGGULHtyXG/sWNifurcot1JA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51989,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgSukpCRA9TVsSAnZWagAApSgP/iJ56XwBmaYL7+MRxKto\n13jpsiqkIZQrmz50Dhwvq9HCCsF9m3Is0gV5N1amZahAC2bbYNqezpFvXyvq\nIesPo8Tu1uOAw0qtbzK3NXaHmPQN9fLo+M62H23FkHAnXQTJZJlnZeTKOViq\nLg9JPw9u5whvk1N9rvR6avmntth9iv1nKp7BxjJJMEBlQuPtd/MdZSygDTxe\n9fnq0OOxav1eAejfXlvdw8qelOQ5v/0awKK/3mw5q4BvDovVQDqHLCTzTSue\n+5xTG53RZZpoq3RtwS5U6+VylH63VOJ1BODSWt9gLTxs8WLmqYgEGpbqYkyj\ntYELBcQgYufX9rj0Eja/5dJADe5JjS4f7rZZf4UCibEMJygLIFudmsoc4W/A\nti5lX31AIRQwCvk+fmOs3x5r6jka7K4QR0HIcqH36NHo71Jn9Kgeuz6EdZO8\nMfvN2+e0+7forOr6iDtWsqHK/cayKQI/SSwNpEzVuD/Iv1vpDVFFh7r7SdxG\nJND2HbPHZZsY9nv2OSOUxrSxasj/snHgqBdvFpi8Yx+O4yAx38pdKbinjyHs\nK9r3uWSBAQdvKZRKr8llyyXf0TgE9CRK8vHsPNAzUzW0wZbOwYHYHv5mIwUg\nTCyXDbs+082eW2BS5zLxUQDmlmMo2NifNA70bSa25XWDreAWBYIEMLFFEp0B\nrriZ\r\n=/DgH\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"preset":"ts-jest","collectCoverage":true,"coverageDirectory":"./coverage/"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS"}},"readme":"# @ice/stark-module\n\n[![NPM version](https://img.shields.io/npm/v/@ice/stark-module.svg?style=flat)](https://npmjs.org/package/@ice/stark-module) [![Package Quality](https://npm.packagequality.com/shield/@ice%2Fstark-module.svg)](https://packagequality.com/#?package=@ice%2Fstark-module) [![build status](https://img.shields.io/travis/ice-lab/icestark.svg?style=flat-square)](https://travis-ci.org/ice-lab/icestark) [![Test coverage](https://img.shields.io/codecov/c/github/ice-lab/icestark.svg?style=flat-square)](https://codecov.io/gh/ice-lab/icestark) [![NPM downloads](http://img.shields.io/npm/dm/@ice/stark-module.svg?style=flat)](https://npmjs.org/package/@ice/stark-module) [![David deps](https://img.shields.io/david/ice-lab/icestark.svg?style=flat-square)](https://david-dm.org/ice-lab/icestark)\n\n## Installation\n\n```bash\n$ npm install @ice/stark-module --save\n```\n\n## Module LifeCycle\n\nspecify module lifeCycle when pack code as a micro module\n\n```js\nconst SampleComponent = () => {\n  return <div>Sample</div>;\n}\n\n// mount function will be trigger when mount micro module\nexport function mount(ModuleComponent, targetNode, props) {\n  ReactDOM.render(<ModuleComponent {...props} />, targetNode);\n}\n\n// unmount function will be trigger when unmount micro module\nexport function unmount(targetNode) {\n  ReactDOM.unmountComponentAtNode(targetNode);\n}\n\nexport default SampleComponent;\n```\n\n> pack module with module spec UMD\n\n## Usage\n\n### Basic Usage\n\n```jsx\nimport { MicroModule } from '@ice/stark-module';\n\nconst App = () => {\n  const moduleInfo = {\n    name: 'moduleName',\n    url: 'https://localhost/module.js',\n  }\n  return <MicroModule moduleInfo={moduleInfo} />;\n}\n```\n\n### Register Modules\n\n```jsx\nimport { MicroModule, registerModules, getModules } from '@ice/stark-module';\n\nregisterModules([\n  {\n    url: 'https://localhost/module-a.js',\n    name: 'module-a',\n  },\n  {\n    url: 'https://localhost/module-b.js',\n    name: 'module-b',\n  },\n]);\n\n// get module info registered by API registerModules\nconst moduleInfo = getModules();\n\nconst App = () => {\n  // after registerMdoules, use micro module by specify module name\n  return (\n    <div>\n      <MicroModule moduleName=\"module-a\" />\n      <MicroModule moduleName=\"module-b\" />\n    </div>\n  );\n}\n```\n\n### Clear Modules\n\n```js\nimport { registerModules, getModules } from '@ice/stark-module';\n\nregisterModules([\n  {\n    url: 'https://localhost/module-a.js',\n    name: 'module-a',\n  },\n]);\n// clear module information registered by API registerModules including content cache\nclearModules();\n```\n\n### Custom Lifecyle\n\n```jsx\nimport { MicroModule } from '@ice/stark-module';\n\nconst App = () => {\n  const moduleInfo = {\n    name: 'moduleName',\n    url: 'https://localhost/module.js',\n    mount: (ModuleComponent, mountNode) => {\n      console.log('custom mount');\n      ReactDOM.render(<ModuleComponent />, mountNode);\n    },\n  }\n  return <MicroModule moduleInfo={moduleInfo} />;\n}\n```\n\n### Custom mount component\n\n```jsx\nimport { mountModule, unmoutModule } from '@ice/stark-module';\n\nconst moduleInfo = {\n  name: 'moduleName',\n  url: 'https://localhost/module.js',\n};\n\nconst ModuleComponent = () => {\n  const renderNode = useRef(null);\n  useEffect(() => {\n    mountModule(moduleInfo, renderNode, {});\n    return () => {\n      unmoutModule(moduleInfo, renderNode);\n    }\n  }, []);\n  return (<div ref={renderNode}></div>);\n};\n```\n\n## Contributors\n\nFeel free to report any questions as an [issue](https://github.com/ice-lab/icestark/issues/new), we'd love to have your helping hand on `icestark`.\n\nIf you're interested in `icestark`, see [CONTRIBUTING.md](https://github.com/alibaba/ice/blob/master/.github/CONTRIBUTING.md) for more information to learn how to get started.\n\n## License\n\n[MIT](LICENSE)","scripts":{"test":"NODE_ENV=unittest jest","build":"rm -rf lib && tsc","watch":"tsc -w","coverage":"codecov","prepublishOnly":"npm run test && npm run build"},"_npmUser":{"name":"maoxiaoke","email":"thebigyellowbee@qq.com"},"repository":{"url":"git+https://github.com/ice-lab/icestark.git","type":"git"},"_npmVersion":"6.14.4","description":"toolkit for load standard micro-module","directories":{},"_nodeVersion":"14.0.0","dependencies":{"@ice/sandbox":"^1.1.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.2.7","react":"^16.13.1","codecov":"^3.4.0","ts-jest":"^25.3.1","react-dom":"^16.13.1","typescript":"^3.8.3","@testing-library/react":"^10.0.3","@testing-library/jest-dom":"^5.5.0"},"peerDependencies":{"react":">=15.0.0","react-dom":">=15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/stark-module_1.4.0-0_1615522089124_0.6053280306856075","host":"s3://npm-registry-packages"}},"1.3.2-0":{"name":"@ice/stark-module","version":"1.3.2-0","keywords":["modules","icestark"],"author":"","license":"MIT","_id":"@ice/stark-module@1.3.2-0","maintainers":[{"name":"sobear","email":"sobear.me@gmail.com"},{"name":"boiawang","email":"zhengwang2314@gmail.com"},{"name":"clarkxia","email":"xiawenwu41@gmail.com"},{"name":"yuanyan","email":"yuanyan.cao@gmail.com"},{"name":"alvinhui","email":"alvin.hui@qq.com"},{"name":"rax-publisher","email":"rax-public@alibaba-inc.com"},{"name":"solojiang","email":"feifeishen1996@gmail.com"},{"name":"chenbin93","email":"chenbinad@gmail.com"},{"name":"maoxiaoke","email":"thebigyellowbee@qq.com"}],"homepage":"https://github.com/ice-lab/icestark#readme","bugs":{"url":"https://github.com/ice-lab/icestark/issues"},"dist":{"shasum":"b389ce837c9381dc76dc2c050017398af2bfa36f","tarball":"https://registry.npmjs.org/@ice/stark-module/-/stark-module-1.3.2-0.tgz","fileCount":17,"integrity":"sha512-abb8nH7JZ1V3uSdR3+dqVKR0Y41gKDERpk1pGOAVtNLgktiq2/GfdbX5n/cCyKpCqFsp5ydQPZRAQwceqoS5+Q==","signatures":[{"sig":"MEUCIBBwflW9T5mvh2RG7EyryPHXtaW1l/TU90VEUMUlcXH9AiEAyFHWzyTlL1uT0271aSdAuZWYmg7PUiiH7bp8/90d488=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":46630,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgUXV+CRA9TVsSAnZWagAAOsUQAIc7WxqxkHjIjFPEn72F\nBUlefXEDqB3T8LOGwMq4pS8pGPMD2AhlxaViLwayeD2kKmbc1Ohk6TNFYAT6\n2Px6G/EJzg+k+MbY8+DdL4eZGnoXro0eO9gMiB/Bif17IEkvqyYZEJA8waLb\niAydqpilzMLPy2cu8EWV39tBCEazy40/Zdf1Ar13tptrThLl8p9dMaNFesse\n3CbFtNtKxPXAJxMB4oFpIwZ27uOhYGiXag1UoihfFp4Lyk/E7FsGzChvJk3U\nlodC6qk3ogg0DX5l3IADq1Mfz2BAvcrr/1jnWLiAcwezJE8zxekI+LNZ2zUQ\n4skoB6sxL+kHRFQ9NFUow+gzJqNF8JW/LjSqCzMGGOXle2WJ53DP+nxRKTGx\nkhzhWCYzN1AdfEQk/kKtM1KIpR1kmlkwFHM6MXj5P7OWNu6LAXpx21AlUfqs\nzsG1AA/NymjTHYckejY8PEFfB4FjDPpSV8BPDPs7mRuGryd1nzFj3m8yIts6\nHZdbEOnILLEKHiIySsNs98irp6R/6WVgMhL7f06Gw6dnPS/S1r7dBh1VjVDI\nzXxcIMeT5kJqr9Fo1hSDs1PIWhCfxz8AcZo/1U0qJJ5gturMXBcc21UviPLs\n1LCScs4a0bIDvEfQd2jeeTuhMKPcV/v+dOY82RwVb/MhjkRYFBbZ5sxOS6nT\njxRH\r\n=YXpc\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"preset":"ts-jest","collectCoverage":true,"coverageDirectory":"./coverage/"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS"}},"readme":"# @ice/stark-module\n\n[![NPM version](https://img.shields.io/npm/v/@ice/stark-module.svg?style=flat)](https://npmjs.org/package/@ice/stark-module) [![Package Quality](https://npm.packagequality.com/shield/@ice%2Fstark-module.svg)](https://packagequality.com/#?package=@ice%2Fstark-module) [![build status](https://img.shields.io/travis/ice-lab/icestark.svg?style=flat-square)](https://travis-ci.org/ice-lab/icestark) [![Test coverage](https://img.shields.io/codecov/c/github/ice-lab/icestark.svg?style=flat-square)](https://codecov.io/gh/ice-lab/icestark) [![NPM downloads](http://img.shields.io/npm/dm/@ice/stark-module.svg?style=flat)](https://npmjs.org/package/@ice/stark-module) [![David deps](https://img.shields.io/david/ice-lab/icestark.svg?style=flat-square)](https://david-dm.org/ice-lab/icestark)\n\n## Installation\n\n```bash\n$ npm install @ice/stark-module --save\n```\n\n## Module LifeCycle\n\nspecify module lifeCycle when pack code as a micro module\n\n```js\nconst SampleComponent = () => {\n  return <div>Sample</div>;\n}\n\n// mount function will be trigger when mount micro module\nexport function mount(ModuleComponent, targetNode, props) {\n  ReactDOM.render(<ModuleComponent {...props} />, targetNode);\n}\n\n// unmount function will be trigger when unmount micro module\nexport function unmount(targetNode) {\n  ReactDOM.unmountComponentAtNode(targetNode);\n}\n\nexport default SampleComponent;\n```\n\n> pack module with module spec UMD\n\n## Usage\n\n### Basic Usage\n\n```jsx\nimport { MicroModule } from '@ice/stark-module';\n\nconst App = () => {\n  const moduleInfo = {\n    name: 'moduleName',\n    url: 'https://localhost/module.js',\n  }\n  return <MicroModule moduleInfo={moduleInfo} />;\n}\n```\n\n### Register Modules\n\n```jsx\nimport { MicroModule, registerModules, getModules } from '@ice/stark-module';\n\nregisterModules([\n  {\n    url: 'https://localhost/module-a.js',\n    name: 'module-a',\n  },\n  {\n    url: 'https://localhost/module-b.js',\n    name: 'module-b',\n  },\n]);\n\n// get module info registered by API registerModules\nconst moduleInfo = getModules();\n\nconst App = () => {\n  // after registerMdoules, use micro module by specify module name\n  return (\n    <div>\n      <MicroModule moduleName=\"module-a\" />\n      <MicroModule moduleName=\"module-b\" />\n    </div>\n  );\n}\n```\n\n### Clear Modules\n\n```js\nimport { registerModules, getModules } from '@ice/stark-module';\n\nregisterModules([\n  {\n    url: 'https://localhost/module-a.js',\n    name: 'module-a',\n  },\n]);\n// clear module information registered by API registerModules including content cache\nclearModules();\n```\n\n### Custom Lifecyle\n\n```jsx\nimport { MicroModule } from '@ice/stark-module';\n\nconst App = () => {\n  const moduleInfo = {\n    name: 'moduleName',\n    url: 'https://localhost/module.js',\n    mount: (ModuleComponent, mountNode) => {\n      console.log('custom mount');\n      ReactDOM.render(<ModuleComponent />, mountNode);\n    },\n  }\n  return <MicroModule moduleInfo={moduleInfo} />;\n}\n```\n\n### Custom mount component\n\n```jsx\nimport { mountModule, unmoutModule } from '@ice/stark-module';\n\nconst moduleInfo = {\n  name: 'moduleName',\n  url: 'https://localhost/module.js',\n};\n\nconst ModuleComponent = () => {\n  const renderNode = useRef(null);\n  useEffect(() => {\n    mountModule(moduleInfo, renderNode, {});\n    return () => {\n      unmoutModule(moduleInfo, renderNode);\n    }\n  }, []);\n  return (<div ref={renderNode}></div>);\n};\n```\n\n## Contributors\n\nFeel free to report any questions as an [issue](https://github.com/ice-lab/icestark/issues/new), we'd love to have your helping hand on `icestark`.\n\nIf you're interested in `icestark`, see [CONTRIBUTING.md](https://github.com/alibaba/ice/blob/master/.github/CONTRIBUTING.md) for more information to learn how to get started.\n\n## License\n\n[MIT](LICENSE)","scripts":{"test":"NODE_ENV=unittest jest","build":"rm -rf lib && tsc","watch":"tsc -w","coverage":"codecov","prepublishOnly":"npm run test && npm run build"},"_npmUser":{"name":"maoxiaoke","email":"thebigyellowbee@qq.com"},"repository":{"url":"git+https://github.com/ice-lab/icestark.git","type":"git"},"_npmVersion":"6.14.4","description":"toolkit for load standard micro-module","directories":{},"_nodeVersion":"14.0.0","dependencies":{"@ice/sandbox":"^1.1.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.2.7","react":"^16.13.1","codecov":"^3.4.0","ts-jest":"^25.3.1","react-dom":"^16.13.1","typescript":"^3.8.3","@testing-library/react":"^10.0.3","@testing-library/jest-dom":"^5.5.0"},"peerDependencies":{"react":">=15.0.0","react-dom":">=15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/stark-module_1.3.2-0_1615951229446_0.04988606634493653","host":"s3://npm-registry-packages"}},"1.4.0-1":{"name":"@ice/stark-module","version":"1.4.0-1","keywords":["modules","icestark"],"author":"","license":"MIT","_id":"@ice/stark-module@1.4.0-1","maintainers":[{"name":"sobear","email":"sobear.me@gmail.com"},{"name":"boiawang","email":"zhengwang2314@gmail.com"},{"name":"clarkxia","email":"xiawenwu41@gmail.com"},{"name":"yuanyan","email":"yuanyan.cao@gmail.com"},{"name":"alvinhui","email":"alvin.hui@qq.com"},{"name":"rax-publisher","email":"rax-public@alibaba-inc.com"},{"name":"solojiang","email":"feifeishen1996@gmail.com"},{"name":"chenbin93","email":"chenbinad@gmail.com"},{"name":"maoxiaoke","email":"thebigyellowbee@qq.com"}],"homepage":"https://github.com/ice-lab/icestark#readme","bugs":{"url":"https://github.com/ice-lab/icestark/issues"},"dist":{"shasum":"8d4d8fbacf48d7e2ab58775824d25819cab2f523","tarball":"https://registry.npmjs.org/@ice/stark-module/-/stark-module-1.4.0-1.tgz","fileCount":17,"integrity":"sha512-gMFTxeiZXDVHPu2pIh3A6+ekl7Hxq0bkJYBBzIEiIaiLpEa7pGEg0x51MOZ7F/ixmuHADq00/okf+rmkZN6/Nw==","signatures":[{"sig":"MEUCIQDkOC0sUz3/mn5MN3LlfnwUg1OzFHXj+y/WITWIea8GjgIgJCDogT4zFlMXMa87g4gcD7YFhd6cOu3Xc8sCUg8pjZk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50797,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgWeSCCRA9TVsSAnZWagAA7RsP/jV8HMvNt7Iaw28zKBjC\n0kN6hKXCskuTh7PYIP9WhcH/oCpmqeSS5eHvfZKt2brqbI0dCJfH4ot/gFMn\nJ/LHVmGIRCRnvJCe/BTJwSlt9PZvh49fn18lKVjBZK6ChiRq15Y8siDAz9AJ\nkvfwUojLI4uHKArKIiXWxc22HoQwfagQ99IuU8vzjSWmKLBM4gO8d27hK63W\nHXHYV+5idjjPvKFjb0H5791yYzjRsgi4gRRPnKYJhLLX4TKJGdQJiG0gppBC\nTMNPHIz0tchKFa64ArTncGwsVffQg60r/ZRuDe5LPDeMtY8y0xi1r211ggTw\nYVsM71QYFZIAiaX0aFbMQASNmN6tfsBnZpQw5dzdddmp8ICLwa+zsBIVACOJ\n6Xtk+GZ4W3Iod1EsyvCLK7mgM3GRd1gsxJaAIE6XQgkjSJoHYXm0aWasaeMu\nBA3wduw7ffGL+wMRgH3YUIs9cXV2XIiRFy6Joep04PD2/5KrVJ21H/3CXJmQ\nd9lCK23Q6/RFchYdZIPIKhWqDyqqxZsKG8r9BrZiFETbBAudQmxKrwI8+RPk\nKm8xALBdxvoHicjiP4TJ4AtCbPSYXDlEuRxi9ldMT8TTWG9vesljVput5poC\n/mhJO71u1U5eHroICPHlTJNp/aTD/gxW9VT0HPEvZxGQ65FGKqspuHWItOlR\n1O4h\r\n=db1y\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"preset":"ts-jest","collectCoverage":true,"coverageDirectory":"./coverage/"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS"}},"readme":"# @ice/stark-module\n\n[![NPM version](https://img.shields.io/npm/v/@ice/stark-module.svg?style=flat)](https://npmjs.org/package/@ice/stark-module) [![Package Quality](https://npm.packagequality.com/shield/@ice%2Fstark-module.svg)](https://packagequality.com/#?package=@ice%2Fstark-module) [![build status](https://img.shields.io/travis/ice-lab/icestark.svg?style=flat-square)](https://travis-ci.org/ice-lab/icestark) [![Test coverage](https://img.shields.io/codecov/c/github/ice-lab/icestark.svg?style=flat-square)](https://codecov.io/gh/ice-lab/icestark) [![NPM downloads](http://img.shields.io/npm/dm/@ice/stark-module.svg?style=flat)](https://npmjs.org/package/@ice/stark-module) [![David deps](https://img.shields.io/david/ice-lab/icestark.svg?style=flat-square)](https://david-dm.org/ice-lab/icestark)\n\n## Installation\n\n```bash\n$ npm install @ice/stark-module --save\n```\n\n## Module LifeCycle\n\nspecify module lifeCycle when pack code as a micro module\n\n```js\nconst SampleComponent = () => {\n  return <div>Sample</div>;\n}\n\n// mount function will be trigger when mount micro module\nexport function mount(ModuleComponent, targetNode, props) {\n  ReactDOM.render(<ModuleComponent {...props} />, targetNode);\n}\n\n// unmount function will be trigger when unmount micro module\nexport function unmount(targetNode) {\n  ReactDOM.unmountComponentAtNode(targetNode);\n}\n\nexport default SampleComponent;\n```\n\n> pack module with module spec UMD\n\n## Usage\n\n### Basic Usage\n\n```jsx\nimport { MicroModule } from '@ice/stark-module';\n\nconst App = () => {\n  const moduleInfo = {\n    name: 'moduleName',\n    url: 'https://localhost/module.js',\n  }\n  return <MicroModule moduleInfo={moduleInfo} />;\n}\n```\n\n### Register Modules\n\n```jsx\nimport { MicroModule, registerModule, registerModules, getModules } from '@ice/stark-module';\n\n// register single module\nregisterModule({\n  url: 'https://localhost/module-a.js',\n  name: 'module-a',\n});\n\n// register multiple modules at once\nregisterModules([\n  {\n    url: 'https://localhost/module-b.js',\n    name: 'module-b',\n  },\n  {\n    url: 'https://localhost/module-c.js',\n    name: 'module-c',\n  },\n]);\n\n// get module info registered by API registerModules\nconst moduleInfo = getModules();\n\nconst App = () => {\n  // after registerMdoules, use micro module by specify module name\n  return (\n    <div>\n      <MicroModule moduleName=\"module-a\" />\n      <MicroModule moduleName=\"module-b\" />\n      <MicroModule moduleName=\"module-c\" />\n    </div>\n  );\n}\n```\n\n### Registration Merging\n\nIf more than one modules are registered with the same name, only the last one will be kept.\n\n```jsx\nimport { registerModule, registerModules, getModules } from '@ice/stark-module';\n\nregisterModules([\n  {\n    url: 'https://localhost/module-a.js',\n    name: 'module-a',\n  },\n  {\n    url: 'https://localhost/module-b.js',\n    name: 'module-a',\n  },\n]);\n\nconst modules = getModules();\n/** the modules will be:\n[{\n  url: 'https://localhost/module-b.js',\n  name: 'module-a',\n}]\n*/\n\nregisterModule({\n  url: 'https://localhost/module-c.js',\n  name: 'module-a',\n});\n\nconst modules = getModules();\n/** the modules will be:\n[{\n  url: 'https://localhost/module-c.js',\n  name: 'module-a',\n}]\n*/\n```\n\n### Clear Modules\n\n```js\nimport { registerModules,  removeModule, clearModules } from '@ice/stark-module';\n\nregisterModules([\n  {\n    url: 'https://localhost/module-a.js',\n    name: 'module-a',\n  },\n  {\n    url: 'https://localhost/module-b.js',\n    name: 'module-b',\n  },\n]);\n\n// clear module information and content cache by name.\nremoveModule('module-a');\n\n// clear all modules information and content cache.\nclearModules();\n```\n\n### Custom Lifecyle\n\n```jsx\nimport { MicroModule } from '@ice/stark-module';\n\nconst App = () => {\n  const moduleInfo = {\n    name: 'moduleName',\n    url: 'https://localhost/module.js',\n    mount: (ModuleComponent, mountNode) => {\n      console.log('custom mount');\n      ReactDOM.render(<ModuleComponent />, mountNode);\n    },\n  }\n  return <MicroModule moduleInfo={moduleInfo} />;\n}\n```\n\n### Custom mount component\n\n```jsx\nimport { mountModule, unmoutModule } from '@ice/stark-module';\n\nconst moduleInfo = {\n  name: 'moduleName',\n  url: 'https://localhost/module.js',\n};\n\nconst ModuleComponent = () => {\n  const renderNode = useRef(null);\n  useEffect(() => {\n    mountModule(moduleInfo, renderNode, {});\n    return () => {\n      unmoutModule(moduleInfo, renderNode);\n    }\n  }, []);\n  return (<div ref={renderNode}></div>);\n};\n```\n\n### Register Local Modules\n\nIn some scenarios, it is necessary to support the built-in components to be customized by the second and third parties. In this case, the local module feature can be used\n\n```jsx\nimport { mountModule, unmoutModule } from '@ice/stark-module';\nimport LocalComponent from './localComponent';\n\nregisterModules([{\n  name: 'moduleName',\n  render: LocalComponent,\n  mount: (ModuleComponent, mountNode, props) => {\n    ReactDOM.render(<ModuleComponent />, mountNode, props);\n  },\n}]);\n\nconst App = () => {\n  return (\n    <div>\n      <MicroModule moduleName=\"moduleName\" />\n    </div>\n  );\n}\n```\n\n## Contributors\n\nFeel free to report any questions as an [issue](https://github.com/ice-lab/icestark/issues/new), we'd love to have your helping hand on `icestark`.\n\nIf you're interested in `icestark`, see [CONTRIBUTING.md](https://github.com/alibaba/ice/blob/master/.github/CONTRIBUTING.md) for more information to learn how to get started.\n\n## License\n\n[MIT](LICENSE)","scripts":{"test":"NODE_ENV=unittest jest","build":"rm -rf lib && tsc","watch":"tsc -w","coverage":"codecov","prepublishOnly":"npm run test && npm run build"},"_npmUser":{"name":"maoxiaoke","email":"thebigyellowbee@qq.com"},"repository":{"url":"git+https://github.com/ice-lab/icestark.git","type":"git"},"_npmVersion":"6.14.4","description":"toolkit for load standard micro-module","directories":{},"_nodeVersion":"14.0.0","dependencies":{"@ice/sandbox":"^1.1.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.2.7","react":"^16.13.1","codecov":"^3.4.0","ts-jest":"^25.3.1","react-dom":"^16.13.1","typescript":"^3.8.3","@testing-library/react":"^10.0.3","@testing-library/jest-dom":"^5.5.0"},"peerDependencies":{"react":">=15.0.0","react-dom":">=15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/stark-module_1.4.0-1_1616503938195_0.5006385145279628","host":"s3://npm-registry-packages"}},"1.4.0":{"name":"@ice/stark-module","version":"1.4.0","keywords":["modules","icestark"],"author":"","license":"MIT","_id":"@ice/stark-module@1.4.0","maintainers":[{"name":"sobear","email":"sobear.me@gmail.com"},{"name":"boiawang","email":"zhengwang2314@gmail.com"},{"name":"clarkxia","email":"xiawenwu41@gmail.com"},{"name":"yuanyan","email":"yuanyan.cao@gmail.com"},{"name":"alvinhui","email":"alvin.hui@qq.com"},{"name":"rax-publisher","email":"rax-public@alibaba-inc.com"},{"name":"solojiang","email":"feifeishen1996@gmail.com"},{"name":"chenbin93","email":"chenbinad@gmail.com"},{"name":"maoxiaoke","email":"thebigyellowbee@qq.com"}],"homepage":"https://github.com/ice-lab/icestark#readme","bugs":{"url":"https://github.com/ice-lab/icestark/issues"},"dist":{"shasum":"0292dd1078dc0c295853f0182844f20a626e3856","tarball":"https://registry.npmjs.org/@ice/stark-module/-/stark-module-1.4.0.tgz","fileCount":19,"integrity":"sha512-moDYn0KGa1nRFKXLxm7wno4c8u8q8nF+rtO2z2+6yr475TC+16J9ZORARYTys+mhfWzxenctL+e0ntz8Q8wFpg==","signatures":[{"sig":"MEYCIQDs/tCkkxTLBY8lVISQDnK8ICNZLLpBydtcB5gDsvFmJAIhANw4drYzUPdUAcbNXf6JALO/cCntie2dzsnVDT+rG4JF","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51224,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgXFwdCRA9TVsSAnZWagAAgmQP/Ry3mhTJMupPbftD3m8z\ndAlA41bLtJ9NlyXNqcbb7lGf8ShAFEWsV43ZhMAoIcVt41q4vIljL2bqRpjY\nn6KlJmsDkLiT7XqxHckgcBqO4eloIcW36ZftyjPXhzOPZWQ2lIil5U0QPzAw\nzq0jpYcrJxtrYBr1SWQfj8KDF1eIDHy+4Qtl8ndLLKuXPmA9P3jITozR41Cf\n0VNNwLEXCSimh5tYTWshg6/ehn3ReHiypuYSA0BGK1KoimRZAcljUGbIZU6U\nuApVkYef/cPDpWmlfd+bv0apUCkff9B1o1M8dhuksczpSs7GugcUC0qWNbZm\np2f1K8gv2mFYt6GtaaqUF8nj5AsoEpoo822UGz2TIj6EyiJE1XEEzqzaf+SW\n8Zxq/jqQojWbUBu3UtIYC4gE4XrcMTCqwe52EcCsxvyqYozlQBIg1/418Mly\np5lXJLje/2pbgb0qrFIjtkMdI3pX41QCKpJ3d95FTRJXZCbdLeX4xCTNHqLP\n4PbDY4x4wbsviRHIvQn/lgKKTwoNyurhNf8I5CEAGNXA8KWF37d9456Ftxrd\n0bIcLZsYNFfxW1mwuyURo1BITN0WeSQBBZ/QQrsRp39eYN1t9t/G1OxJvUhZ\nwGAy37qN/wbOsKW2vw6bYYAgJKNsOiIqWWXQS0V5ZBeBEefs0NTK8feuWsw2\nJyxy\r\n=cI9/\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"preset":"ts-jest","collectCoverage":true,"coverageDirectory":"./coverage/"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS"}},"scripts":{"test":"NODE_ENV=unittest jest","build":"rm -rf lib && tsc","watch":"tsc -w","coverage":"codecov","prepublishOnly":"npm run test && npm run build"},"_npmUser":{"name":"rax-publisher","email":"rax-public@alibaba-inc.com"},"repository":{"url":"git+https://github.com/ice-lab/icestark.git","type":"git"},"_npmVersion":"6.14.11","description":"toolkit for load standard micro-module","directories":{},"_nodeVersion":"10.24.0","dependencies":{"@ice/sandbox":"^1.1.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^25.2.7","react":"^16.13.1","codecov":"^3.4.0","ts-jest":"^25.3.1","react-dom":"^16.13.1","typescript":"^3.8.3","@testing-library/react":"^10.0.3","@testing-library/jest-dom":"^5.5.0"},"peerDependencies":{"react":">=15.0.0","react-dom":">=15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/stark-module_1.4.0_1616665628869_0.49857462470039215","host":"s3://npm-registry-packages"}},"1.4.1":{"name":"@ice/stark-module","version":"1.4.1","keywords":["modules","icestark"],"author":"","license":"MIT","_id":"@ice/stark-module@1.4.1","maintainers":[{"name":"sobear","email":"sobear.me@gmail.com"},{"name":"boiawang","email":"zhengwang2314@gmail.com"},{"name":"clarkxia","email":"xiawenwu41@gmail.com"},{"name":"yuanyan","email":"yuanyan.cao@gmail.com"},{"name":"alvinhui","email":"alvin.hui@qq.com"},{"name":"rax-publisher","email":"rax-public@alibaba-inc.com"},{"name":"solojiang","email":"feifeishen1996@gmail.com"},{"name":"chenbin93","email":"chenbinad@gmail.com"},{"name":"maoxiaoke","email":"thebigyellowbee@qq.com"}],"homepage":"https://github.com/ice-lab/icestark#readme","bugs":{"url":"https://github.com/ice-lab/icestark/issues"},"dist":{"shasum":"90e9172e3276a0ba0f09608e7057904686116b69","tarball":"https://registry.npmjs.org/@ice/stark-module/-/stark-module-1.4.1.tgz","fileCount":19,"integrity":"sha512-66Nm7zYUw68MyBLGkpB+awO0TnH17JqQgiAmiMvwcH7+Dow6ZY88ZOVgO5XzFk3r6omUlJH8eUnRcQ/U4Z6edg==","signatures":[{"sig":"MEUCIQCycgQg7sRGP9+Yv/pO0QdNHWQRaaU8lLuaVONGrvj4DQIgU+E8CZJ5RtCD8+Nd09HVPJfT6fPONKJ41rsKPGNRhCY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51287,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgphEUCRA9TVsSAnZWagAAbnIQAJXjEk1R+T6nQahCO102\nDAT53+TkFuSMBNS3QVOPTtr87/8l0sZoBh+03hrGedm3n0c9zMf7p8UCtr5n\noLKsPs8PPbCY6SgVygmIW1JS/8lTvsbpmTCB/H828Dv3sPJi1kZNUknsWM3S\n4fnDkaj7gri390W2BfH2EiPOou5rEpZ0rIypOoQCagkg2z9DyADcs6x3FiLN\nxv6IWf4HmgzGq7HTSi8XOXsAwvdcWts7nfL1/grpu6CsK7nDC0bSXy6Adksy\nWlaLCWSpqH14cTpSs/0yg5fQkhtbqTnLr/4Q0SjE4SnNBIQaGgeXINp+CFa0\nG5mbTzhfXrUixv10R3OB/GIKR2iBBtCyhBr+jzgtEh6yqAH1wNeRAks/Wvd1\nbjyY+qRe9F/RqwtLKZygettUpNlhK68C6FuaJE/iT3tqOBmUI+24/HitisVh\nvXchkXsvUUdIa559DbyvagVFVvoFm13YqGTcMjitFFKh9oMRfo5+MTqZPVz/\nEatex0HrpToR3QhTKWWbcm7tBcCbaua3Zw9q1V95atPUXgFz/R5yw/CvGjxz\n485mUGp12Cp3z3Aeu5olg60JVm3tE/dB3HGfYbPPg4tGVbg7R5SwrxzJSbm8\nAyMLJAp1hGUVWaO27LneH3TtPqeX2UIcU6/eJbfcl+Lwnby3bVRgLrCQKtqo\ntkTS\r\n=uDev\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"preset":"ts-jest","collectCoverage":true,"coverageDirectory":"./coverage/"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS"}},"scripts":{"test":"NODE_ENV=unittest jest","build":"rm -rf lib && tsc","watch":"tsc -w","coverage":"codecov","prepublishOnly":"npm run test && npm run build"},"_npmUser":{"name":"rax-publisher","email":"rax-public@alibaba-inc.com"},"repository":{"url":"git+https://github.com/ice-lab/icestark.git","type":"git"},"_npmVersion":"6.14.12","description":"toolkit for load standard micro-module","directories":{},"_nodeVersion":"10.24.1","dependencies":{"@ice/sandbox":"^1.1.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^25.2.7","react":"^16.13.1","codecov":"^3.4.0","ts-jest":"^25.3.1","react-dom":"^16.13.1","typescript":"^3.8.3","@testing-library/react":"^10.0.3","@testing-library/jest-dom":"^5.5.0"},"peerDependencies":{"react":">=15.0.0","react-dom":">=15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/stark-module_1.4.1_1621496083958_0.5733190335758815","host":"s3://npm-registry-packages"}},"1.4.2-0":{"name":"@ice/stark-module","version":"1.4.2-0","keywords":["modules","icestark"],"author":"","license":"MIT","_id":"@ice/stark-module@1.4.2-0","maintainers":[{"name":"sobear","email":"sobear.me@gmail.com"},{"name":"clarkxia","email":"xiawenwu41@gmail.com"},{"name":"yuanyan","email":"yuanyan.cao@gmail.com"},{"name":"rax-publisher","email":"rax-public@alibaba-inc.com"},{"name":"solojiang","email":"feifeishen1996@gmail.com"},{"name":"chenbin93","email":"chenbinad@gmail.com"},{"name":"maoxiaoke","email":"thebigyellowbee@qq.com"}],"homepage":"https://github.com/ice-lab/icestark#readme","bugs":{"url":"https://github.com/ice-lab/icestark/issues"},"dist":{"shasum":"f68992c0a01997a8964cd3a445a576858a7b90d5","tarball":"https://registry.npmjs.org/@ice/stark-module/-/stark-module-1.4.2-0.tgz","fileCount":19,"integrity":"sha512-hC7BvBMRrtO9Y8AEroJ7N3QRkM2GsBnduOcKB6fKaqW+5jORVibpmBhx3ftMEW8diw2yzQjJeh3lHCAk13Q3nA==","signatures":[{"sig":"MEUCICuXzsIgyBXGHdSoU+xBy6iSpBubL2lgAsp/wFg5H6fSAiEAyrQ8FXyX8ODSz43kaudGbnscZp0k3hhi8RzRoM5H3U4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51465,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg5ZmoCRA9TVsSAnZWagAAj9QQAJENoRtCtBbtJAwzutw2\neLPzWMJhM8qxpUFUCYlcDXvZImaS10W5mkftCgrIZtz1xTquWQfA60ZS35fP\npe9OcjHSg9k78S3IHI8cliBK4E+SKchPHIsp+zNLVGF1BShe/jjo+BgOnjrA\noUXOAUlPEIV3n8u1zcwaZvUQm8uGYyON5Gder4e2wBGK04bAKRtTRtEkP9x4\nQ38/U43a/pfkaya3ab8buJbB3MAU4uSOrSswLkdv4DcK2maOArI1BMIoYfip\nEaoZTy9IhuMKjcilt1OuqQ/KiN/Q1zr9Qkz2KiOnye3TAG5SD4ABXFTpgHDr\n299CHYSoZI8LhTpaTXimQ6vSA0HTaQvWC69SqBxyI0kIKmPcAr3a+WeiFWFx\nHUXgZev7HuUkgb1ZL18tza8n/QvA+yhAeR+676PQsr60/5rwEMwCmsjW1+XW\nQaftc1ZRHQajWzESkvHdjtVohXUrW0UPTdphjbortbosq0XUKxiQUQ2tjE9T\nnwVSsoG6AyJ9TamsYdsUQ78FyfVXtCMld0jKLje3G5uND+5+TL+8fDa9a0XV\nHInFQrdxD8I7J7m3bUWQoOsDwPG1Iaed6V5kB/Ruhvs/I6536pidmDkyLoJv\nQ4NJ7N58xY2BoI3Dxubqj3hIyArTwd/Is9HobhLpynz6zi3X6Xw7pkq2fIih\n7nBQ\r\n=ATJj\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"preset":"ts-jest","collectCoverage":true,"coverageDirectory":"./coverage/"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS"}},"readme":"# @ice/stark-module\n\n[![NPM version](https://img.shields.io/npm/v/@ice/stark-module.svg?style=flat)](https://npmjs.org/package/@ice/stark-module) [![Package Quality](https://npm.packagequality.com/shield/@ice%2Fstark-module.svg)](https://packagequality.com/#?package=@ice%2Fstark-module) [![build status](https://img.shields.io/travis/ice-lab/icestark.svg?style=flat-square)](https://travis-ci.org/ice-lab/icestark) [![Test coverage](https://img.shields.io/codecov/c/github/ice-lab/icestark.svg?style=flat-square)](https://codecov.io/gh/ice-lab/icestark) [![NPM downloads](http://img.shields.io/npm/dm/@ice/stark-module.svg?style=flat)](https://npmjs.org/package/@ice/stark-module) [![David deps](https://img.shields.io/david/ice-lab/icestark.svg?style=flat-square)](https://david-dm.org/ice-lab/icestark)\n\n## Installation\n\n```bash\n$ npm install @ice/stark-module --save\n```\n\n## Module LifeCycle\n\nspecify module lifeCycle when pack code as a micro module\n\n```js\nconst SampleComponent = () => {\n  return <div>Sample</div>;\n}\n\n// mount function will be trigger when mount micro module\nexport function mount(ModuleComponent, targetNode, props) {\n  ReactDOM.render(<ModuleComponent {...props} />, targetNode);\n}\n\n// unmount function will be trigger when unmount micro module\nexport function unmount(targetNode) {\n  ReactDOM.unmountComponentAtNode(targetNode);\n}\n\nexport default SampleComponent;\n```\n\n> pack module with module spec UMD\n\n## Usage\n\n### Basic Usage\n\n```jsx\nimport { MicroModule } from '@ice/stark-module';\n\nconst App = () => {\n  const moduleInfo = {\n    name: 'moduleName',\n    url: 'https://localhost/module.js',\n  }\n  return <MicroModule moduleInfo={moduleInfo} />;\n}\n```\n\n### Register Modules\n\n```jsx\nimport { MicroModule, registerModule, registerModules, getModules } from '@ice/stark-module';\n\n// register single module\nregisterModule({\n  url: 'https://localhost/module-a.js',\n  name: 'module-a',\n});\n\n// register multiple modules at once\nregisterModules([\n  {\n    url: 'https://localhost/module-b.js',\n    name: 'module-b',\n  },\n  {\n    url: 'https://localhost/module-c.js',\n    name: 'module-c',\n  },\n]);\n\n// get module info registered by API registerModules\nconst moduleInfo = getModules();\n\nconst App = () => {\n  // after registerMdoules, use micro module by specify module name\n  return (\n    <div>\n      <MicroModule moduleName=\"module-a\" />\n      <MicroModule moduleName=\"module-b\" />\n      <MicroModule moduleName=\"module-c\" />\n    </div>\n  );\n}\n```\n\n### Registration Merging\n\nIf more than one modules are registered with the same name, only the last one will be kept.\n\n```jsx\nimport { registerModule, registerModules, getModules } from '@ice/stark-module';\n\nregisterModules([\n  {\n    url: 'https://localhost/module-a.js',\n    name: 'module-a',\n  },\n  {\n    url: 'https://localhost/module-b.js',\n    name: 'module-a',\n  },\n]);\n\nconst modules = getModules();\n/** the modules will be:\n[{\n  url: 'https://localhost/module-b.js',\n  name: 'module-a',\n}]\n*/\n\nregisterModule({\n  url: 'https://localhost/module-c.js',\n  name: 'module-a',\n});\n\nconst modules = getModules();\n/** the modules will be:\n[{\n  url: 'https://localhost/module-c.js',\n  name: 'module-a',\n}]\n*/\n```\n\n### Clear Modules\n\n```js\nimport { registerModules, clearModules } from '@ice/stark-module';\n\nregisterModules([\n  {\n    url: 'https://localhost/module-a.js',\n    name: 'module-a',\n  },\n  {\n    url: 'https://localhost/module-b.js',\n    name: 'module-b',\n  },\n]);\n\n// clear all modules information and content cache.\nclearModules();\n```\n\n### Custom Lifecyle\n\n```jsx\nimport { MicroModule } from '@ice/stark-module';\n\nconst App = () => {\n  const moduleInfo = {\n    name: 'moduleName',\n    url: 'https://localhost/module.js',\n    mount: (ModuleComponent, mountNode) => {\n      console.log('custom mount');\n      ReactDOM.render(<ModuleComponent />, mountNode);\n    },\n  }\n  return <MicroModule moduleInfo={moduleInfo} />;\n}\n```\n\n### Custom mount component\n\n```jsx\nimport { mountModule, unmoutModule } from '@ice/stark-module';\n\nconst moduleInfo = {\n  name: 'moduleName',\n  url: 'https://localhost/module.js',\n};\n\nconst ModuleComponent = () => {\n  const renderNode = useRef(null);\n  useEffect(() => {\n    mountModule(moduleInfo, renderNode, {});\n    return () => {\n      unmoutModule(moduleInfo, renderNode);\n    }\n  }, []);\n  return (<div ref={renderNode}></div>);\n};\n```\n\n### Register Local Modules\n\nIn some scenarios, it is necessary to support the built-in components. In this case, one can use `render` property to render a local module.\n\n```jsx\nimport LocalComponent from './localComponent';\n\nregisterModules([{\n  name: 'moduleName',\n  render: () => LocalComponent,\n}]);\n\nconst App = () => {\n  return (\n    <div>\n      <MicroModule moduleName=\"moduleName\" />\n    </div>\n  );\n}\n```\n\n## Contributors\n\nFeel free to report any questions as an [issue](https://github.com/ice-lab/icestark/issues/new), we'd love to have your helping hand on `icestark`.\n\nIf you're interested in `icestark`, see [CONTRIBUTING.md](https://github.com/alibaba/ice/blob/master/.github/CONTRIBUTING.md) for more information to learn how to get started.\n\n## License\n\n[MIT](LICENSE)","scripts":{"test":"NODE_ENV=unittest jest","build":"rm -rf lib && tsc","watch":"tsc -w","coverage":"codecov","prepublishOnly":"npm run test && npm run build"},"_npmUser":{"name":"maoxiaoke","email":"thebigyellowbee@qq.com"},"repository":{"url":"git+https://github.com/ice-lab/icestark.git","type":"git"},"_npmVersion":"6.14.4","description":"toolkit for load standard micro-module","directories":{},"_nodeVersion":"14.0.0","dependencies":{"@ice/sandbox":"^1.1.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.2.7","react":"^16.13.1","codecov":"^3.4.0","ts-jest":"^25.3.1","react-dom":"^16.13.1","typescript":"^3.8.3","@testing-library/react":"^10.0.3","@testing-library/jest-dom":"^5.5.0"},"peerDependencies":{"react":">=15.0.0","react-dom":">=15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/stark-module_1.4.2-0_1625659816303_0.23937993945431146","host":"s3://npm-registry-packages"}},"1.4.2":{"name":"@ice/stark-module","version":"1.4.2","keywords":["modules","icestark"],"author":"","license":"MIT","_id":"@ice/stark-module@1.4.2","maintainers":[{"name":"sobear","email":"sobear.me@gmail.com"},{"name":"clarkxia","email":"xiawenwu41@gmail.com"},{"name":"yuanyan","email":"yuanyan.cao@gmail.com"},{"name":"rax-publisher","email":"rax-public@alibaba-inc.com"},{"name":"solojiang","email":"feifeishen1996@gmail.com"},{"name":"chenbin93","email":"chenbinad@gmail.com"},{"name":"maoxiaoke","email":"thebigyellowbee@qq.com"}],"homepage":"https://github.com/ice-lab/icestark#readme","bugs":{"url":"https://github.com/ice-lab/icestark/issues"},"dist":{"shasum":"84822bffdff495db6a2635cf4c8ff77529b0ca70","tarball":"https://registry.npmjs.org/@ice/stark-module/-/stark-module-1.4.2.tgz","fileCount":19,"integrity":"sha512-gXtqiVcRkfucQmgbcVDurhWGdK5g6Fap3KcSMT5qF+4nqBaigC/SoHU/WBJIehehkGXcwI4VoS7RM/kA9ocO+A==","signatures":[{"sig":"MEUCICIeO+X2nEfQroJ3es5Tq5Kv3dzSQknqnQTxQC3YUJR2AiEAp68Om16AyxN5+tJDs3ElzdF3Aa+9LGpmwC7NWIrdpgc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51416,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhFec5CRA9TVsSAnZWagAAzwEP/RosOWXq8kBLcH1WfY1Q\n29WYRxg2yRTfofrYefRi9bHJJTT7gf6pTnmciNbGKrIakLGxoLGFb4tUpBaA\ndUuVVsfsHQ6JeU6sOwTYZhUbBF0Vg1o48Zu5Zwg+EtmPDU7M4TvHrAJHcuiy\nAUN9kXm/pDhCgwm5jX+H5reSjQXkMmdz0DIMakVjWKoLR1I+egXmyF4zXAf7\nM1smTGpjwdhtWB5IdGrYP/acsx7Oa5JOfNtE5xQMfFXkemRsWH3HzNBvC/DG\nwMHFpm415GjcyxcpXzlqI+dgMn0Jq1fecCOMq2WmEE52o92szKJibE/CAe55\nG6MDSD4GkaOGYQ0FOjblGcRnL5EJks+vMWjqBXlG89Qp1/r//EbCdeyjrLRz\nenNiJx3IkzXKDND07X+N8kiQw2FR2o/hm/ZBRMWmJp8I+hPnGoPoEwgtl/Nn\nODXPoIFT8ETdFsL43CFjkQthkLrsbeRO6N4cK9f8cvqz5chyZ5S52f7hLUDv\nxD1mFNmbRgowXq4+XST0yJIXXhFPtGrrhXQDosL9BOroH+Q//sK0iPrKqPDP\n+kY+GSgBTTRcAwjg2X6CJfHr663pUQ5wOXbU5oWRCrLBGLFnm7dV4a0/hABK\nhnL/daZRj/2kVJ3zMyJ4U31VSYevWvxOB9krD82eYk5hQ/knO1MbMOJv0L0z\nxm2e\r\n=OqGJ\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"preset":"ts-jest","collectCoverage":true,"coverageDirectory":"./coverage/"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS"}},"scripts":{"test":"NODE_ENV=unittest jest","build":"rm -rf lib && tsc","watch":"tsc -w","coverage":"codecov","prepublishOnly":"npm run test && npm run build"},"_npmUser":{"name":"rax-publisher","email":"rax-public@alibaba-inc.com"},"repository":{"url":"git+https://github.com/ice-lab/icestark.git","type":"git"},"_npmVersion":"6.14.12","description":"toolkit for load standard micro-module","directories":{},"_nodeVersion":"10.24.1","dependencies":{"@ice/sandbox":"^1.1.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^25.2.7","react":"^16.13.1","codecov":"^3.4.0","ts-jest":"^25.3.1","react-dom":"^16.13.1","typescript":"^3.8.3","@testing-library/react":"^10.0.3","@testing-library/jest-dom":"^5.5.0"},"peerDependencies":{"react":">=15.0.0","react-dom":">=15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/stark-module_1.4.2_1628825401280_0.4582669659781813","host":"s3://npm-registry-packages"}},"1.4.3-0":{"name":"@ice/stark-module","version":"1.4.3-0","keywords":["modules","icestark"],"author":"","license":"MIT","_id":"@ice/stark-module@1.4.3-0","maintainers":[{"name":"sobear","email":"sobear.me@gmail.com"},{"name":"clarkxia","email":"xiawenwu41@gmail.com"},{"name":"yuanyan","email":"yuanyan.cao@gmail.com"},{"name":"rax-publisher","email":"rax-public@alibaba-inc.com"},{"name":"solojiang","email":"feifeishen1996@gmail.com"},{"name":"chenbin93","email":"chenbinad@gmail.com"},{"name":"maoxiaoke","email":"thebigyellowbee@qq.com"}],"homepage":"https://github.com/ice-lab/icestark#readme","bugs":{"url":"https://github.com/ice-lab/icestark/issues"},"dist":{"shasum":"3e0d98ea786a2fd4bc0c214794bebec18fb99531","tarball":"https://registry.npmjs.org/@ice/stark-module/-/stark-module-1.4.3-0.tgz","fileCount":19,"integrity":"sha512-EZBIfy6o3CsxMavM3VOQGQ3CjRsIzNbdOhDOSdJTYZSz69eXjfsdvfzQDOxzEPQJUbKjmdfyyWRegkKU87idsg==","signatures":[{"sig":"MEYCIQCq/UstFsaKxtBFM1TOvi0oBb86dW4ssFkoVQ5+GQoHSAIhAMrvgp50vEtQb3fgSHmspZltswFL/njRGI7sJTRptY8G","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51690,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhI5N+CRA9TVsSAnZWagAA7xYP/Rh+AI3Mrrx5dFjhyprW\nbLd+5h1w7hO9qUSurjpG7Mb7BfVgMtb/+KIA6SIh446tJf3YZz0y2bmeyqPi\n4L8m7r9/clGLaP8sDBtNm+mOMZPDZEgVx+4qERlRQ8xo2o6izTfDKmpp9lTE\njzgk6vjZ3ODII8GErlPIzGEp1ppMqgkrWb8MQwiBxpCE8VHoymymPuVWqb7N\ncNHmNothZvGfsYSOSvfvotP+IcrSXTtWN1JAP0n8+7Dk5EgZ8c/HbjxOo7GN\n2Toi97Nc35U3tcqwF0lvYG3zat77XGqkCLpOrZlf57gJjo0DPst4Ro7xAHoT\n+3rXahKNgFmS12HyEqN5q22CqlzHm6puAgafFLlfLJyliKOVX9VpHhizrh8C\nsf2ydk4lrx3bFXoUplqijjo/7OsciQBCIupmnu0c0RmKlb1dHuxf3XynAjxB\nAwIgFni+VEueb87heeWqG+F5sskADLtebmVITbJfJ5ESKjIGFewZBAQuc4gu\nWIguJZLuJRvohMUrV6LkirXhkR4hP/du6ghRy7JBvhlxGk5VNscp9buRcnWB\n894R8aoWTZOZ3dL3vMn90y2iUBJeEV7OVuolC67qhdtUUXEreDG2456luute\nV2wE5rsn8VTAnzxOgEh/Ej38LCr0YSNxS+frFjuosUlTA2+GI/bV71vkWqR1\nLU+b\r\n=ljKk\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"preset":"ts-jest","collectCoverage":true,"coverageDirectory":"./coverage/"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS"}},"readme":"# @ice/stark-module\n\n[![NPM version](https://img.shields.io/npm/v/@ice/stark-module.svg?style=flat)](https://npmjs.org/package/@ice/stark-module) [![Package Quality](https://npm.packagequality.com/shield/@ice%2Fstark-module.svg)](https://packagequality.com/#?package=@ice%2Fstark-module) [![build status](https://img.shields.io/travis/ice-lab/icestark.svg?style=flat-square)](https://travis-ci.org/ice-lab/icestark) [![Test coverage](https://img.shields.io/codecov/c/github/ice-lab/icestark.svg?style=flat-square)](https://codecov.io/gh/ice-lab/icestark) [![NPM downloads](http://img.shields.io/npm/dm/@ice/stark-module.svg?style=flat)](https://npmjs.org/package/@ice/stark-module) [![David deps](https://img.shields.io/david/ice-lab/icestark.svg?style=flat-square)](https://david-dm.org/ice-lab/icestark)\n\n## Installation\n\n```bash\n$ npm install @ice/stark-module --save\n```\n\n## Module LifeCycle\n\nspecify module lifeCycle when pack code as a micro module\n\n```js\nconst SampleComponent = () => {\n  return <div>Sample</div>;\n}\n\n// mount function will be trigger when mount micro module\nexport function mount(ModuleComponent, targetNode, props) {\n  ReactDOM.render(<ModuleComponent {...props} />, targetNode);\n}\n\n// unmount function will be trigger when unmount micro module\nexport function unmount(targetNode) {\n  ReactDOM.unmountComponentAtNode(targetNode);\n}\n\nexport default SampleComponent;\n```\n\n> pack module with module spec UMD\n\n## Usage\n\n### Basic Usage\n\n```jsx\nimport { MicroModule } from '@ice/stark-module';\n\nconst App = () => {\n  const moduleInfo = {\n    name: 'moduleName',\n    url: 'https://localhost/module.js',\n  }\n  return <MicroModule moduleInfo={moduleInfo} />;\n}\n```\n\n### Register Modules\n\n```jsx\nimport { MicroModule, registerModule, registerModules, getModules } from '@ice/stark-module';\n\n// register single module\nregisterModule({\n  url: 'https://localhost/module-a.js',\n  name: 'module-a',\n});\n\n// register multiple modules at once\nregisterModules([\n  {\n    url: 'https://localhost/module-b.js',\n    name: 'module-b',\n  },\n  {\n    url: 'https://localhost/module-c.js',\n    name: 'module-c',\n  },\n]);\n\n// get module info registered by API registerModules\nconst moduleInfo = getModules();\n\nconst App = () => {\n  // after registerMdoules, use micro module by specify module name\n  return (\n    <div>\n      <MicroModule moduleName=\"module-a\" />\n      <MicroModule moduleName=\"module-b\" />\n      <MicroModule moduleName=\"module-c\" />\n    </div>\n  );\n}\n```\n\n### Registration Merging\n\nIf more than one modules are registered with the same name, only the last one will be kept.\n\n```jsx\nimport { registerModule, registerModules, getModules } from '@ice/stark-module';\n\nregisterModules([\n  {\n    url: 'https://localhost/module-a.js',\n    name: 'module-a',\n  },\n  {\n    url: 'https://localhost/module-b.js',\n    name: 'module-a',\n  },\n]);\n\nconst modules = getModules();\n/** the modules will be:\n[{\n  url: 'https://localhost/module-b.js',\n  name: 'module-a',\n}]\n*/\n\nregisterModule({\n  url: 'https://localhost/module-c.js',\n  name: 'module-a',\n});\n\nconst modules = getModules();\n/** the modules will be:\n[{\n  url: 'https://localhost/module-c.js',\n  name: 'module-a',\n}]\n*/\n```\n\n### Clear Modules\n\n```js\nimport { registerModules, clearModules } from '@ice/stark-module';\n\nregisterModules([\n  {\n    url: 'https://localhost/module-a.js',\n    name: 'module-a',\n  },\n  {\n    url: 'https://localhost/module-b.js',\n    name: 'module-b',\n  },\n]);\n\n// clear all modules information and content cache.\nclearModules();\n```\n\n### Custom Lifecyle\n\n```jsx\nimport { MicroModule } from '@ice/stark-module';\n\nconst App = () => {\n  const moduleInfo = {\n    name: 'moduleName',\n    url: 'https://localhost/module.js',\n    mount: (ModuleComponent, mountNode) => {\n      console.log('custom mount');\n      ReactDOM.render(<ModuleComponent />, mountNode);\n    },\n  }\n  return <MicroModule moduleInfo={moduleInfo} />;\n}\n```\n\n### Custom mount component\n\n```jsx\nimport { mountModule, unmoutModule } from '@ice/stark-module';\n\nconst moduleInfo = {\n  name: 'moduleName',\n  url: 'https://localhost/module.js',\n};\n\nconst ModuleComponent = () => {\n  const renderNode = useRef(null);\n  useEffect(() => {\n    mountModule(moduleInfo, renderNode, {});\n    return () => {\n      unmoutModule(moduleInfo, renderNode);\n    }\n  }, []);\n  return (<div ref={renderNode}></div>);\n};\n```\n\n### Register Local Modules\n\nIn some scenarios, it is necessary to support the built-in components. In this case, one can use `render` property to render a local module.\n\n```jsx\nimport LocalComponent from './localComponent';\n\nregisterModules([{\n  name: 'moduleName',\n  render: () => LocalComponent,\n}]);\n\nconst App = () => {\n  return (\n    <div>\n      <MicroModule moduleName=\"moduleName\" />\n    </div>\n  );\n}\n```\n\n## Contributors\n\nFeel free to report any questions as an [issue](https://github.com/ice-lab/icestark/issues/new), we'd love to have your helping hand on `icestark`.\n\nIf you're interested in `icestark`, see [CONTRIBUTING.md](https://github.com/alibaba/ice/blob/master/.github/CONTRIBUTING.md) for more information to learn how to get started.\n\n## License\n\n[MIT](LICENSE)","scripts":{"test":"NODE_ENV=unittest jest","build":"rm -rf lib && tsc","watch":"tsc -w","coverage":"codecov","prepublishOnly":"npm run test && npm run build"},"_npmUser":{"name":"maoxiaoke","email":"thebigyellowbee@qq.com"},"repository":{"url":"git+https://github.com/ice-lab/icestark.git","type":"git"},"_npmVersion":"6.14.4","description":"toolkit for load standard micro-module","directories":{},"_nodeVersion":"14.0.0","dependencies":{"@ice/sandbox":"^1.1.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.2.7","react":"^16.13.1","codecov":"^3.4.0","ts-jest":"^25.3.1","react-dom":"^16.13.1","typescript":"^3.8.3","@testing-library/react":"^10.0.3","@testing-library/jest-dom":"^5.5.0"},"peerDependencies":{"react":">=15.0.0","react-dom":">=15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/stark-module_1.4.3-0_1629721470737_0.788063973836715","host":"s3://npm-registry-packages"}},"1.4.3-1":{"name":"@ice/stark-module","version":"1.4.3-1","keywords":["modules","icestark"],"author":"","license":"MIT","_id":"@ice/stark-module@1.4.3-1","maintainers":[{"name":"sobear","email":"sobear.me@gmail.com"},{"name":"clarkxia","email":"xiawenwu41@gmail.com"},{"name":"yuanyan","email":"yuanyan.cao@gmail.com"},{"name":"rax-publisher","email":"rax-public@alibaba-inc.com"},{"name":"solojiang","email":"feifeishen1996@gmail.com"},{"name":"chenbin93","email":"chenbinad@gmail.com"},{"name":"maoxiaoke","email":"thebigyellowbee@qq.com"}],"homepage":"https://github.com/ice-lab/icestark#readme","bugs":{"url":"https://github.com/ice-lab/icestark/issues"},"dist":{"shasum":"c1dc0b664160f17a98351a7950d4af58b4e45267","tarball":"https://registry.npmjs.org/@ice/stark-module/-/stark-module-1.4.3-1.tgz","fileCount":19,"integrity":"sha512-Yv0Valj6+Ht/gpW5ljCz12bBiBPFmQH9HPnfD7CIRY2oVbQ4+XKEYyq128Hde+M2Rg/44h1Kf0bcv3G3IQen9w==","signatures":[{"sig":"MEUCICNvdzU0mkrdRslOic2CQP2CNLKBvp3vhJdoesvqNwopAiEAkpPqVFeWzA4HsOZEecV5NEr3vFUbi3BXqKrFDGn+p6c=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51471,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhLvdSCRA9TVsSAnZWagAAhxYP/3mCE3DIuDOTz4Vvk5EA\nDYjn4gm6j/AHInzibe6FOHl17dvjSf8/jlXeH2a/7VqukpkDXoq9zduIoc1w\nq6pLUPO4vgAId9FgjjZvLvqBLnGT35zP3jBgIhWGO7+BchmRePSuvVgErOBW\nZecG+iU8AtQ0uBThCo73bgpryd8nmrgQ6Yg2phXF6yoQjBxWM/3uip4LuW1w\n+nFIw2mHDG7oHIQi8UH14rQUfLLj1xVnwsOSH/3E37U/qmyPNxNkZiKzxjpg\nL6/Vs7XOqWDA3Ci98SEQC6xwcakxd4rB3sqrRY1fV+MAcmHPe1n8jp1HTVw4\nfMomo3mon19ssq3ZLCFZ4TiPh4QcpYYdUAI0hiNW0FzyezXBldnLbbHZ/t1u\ngYVNi9tmdhY/6CwZ7CbvGbU3mTCI+7X+d33g1MvqUnOVAMwEhLD8C77AD5Z7\nJKVFBuloaOYxOnIGPRcKvkjef3gsdqK4UiH5KrZ3aiFyJaPQx2uyN6BhhOYU\n7dblYvJwfNVOYY9BTaqu4A/ZU5q2efWoi30RtsWdbQw7JoWOt4o2LD5gNbhn\nLlVyNt/KoTwxUnCuy7NFn6MPx6sd0jpdrlf7JHvofZvss1uyIS4Uh24KtbIH\nWTSp7qqluRxjcbNi4BcHvOyB7nVAIXMRX2FtY7NavNuHnw0D8cW/wFEXWFkF\n2R55\r\n=CsR1\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"preset":"ts-jest","collectCoverage":true,"coverageDirectory":"./coverage/"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS"}},"readme":"# @ice/stark-module\n\n[![NPM version](https://img.shields.io/npm/v/@ice/stark-module.svg?style=flat)](https://npmjs.org/package/@ice/stark-module) [![Package Quality](https://npm.packagequality.com/shield/@ice%2Fstark-module.svg)](https://packagequality.com/#?package=@ice%2Fstark-module) [![build status](https://img.shields.io/travis/ice-lab/icestark.svg?style=flat-square)](https://travis-ci.org/ice-lab/icestark) [![Test coverage](https://img.shields.io/codecov/c/github/ice-lab/icestark.svg?style=flat-square)](https://codecov.io/gh/ice-lab/icestark) [![NPM downloads](http://img.shields.io/npm/dm/@ice/stark-module.svg?style=flat)](https://npmjs.org/package/@ice/stark-module) [![David deps](https://img.shields.io/david/ice-lab/icestark.svg?style=flat-square)](https://david-dm.org/ice-lab/icestark)\n\n## Installation\n\n```bash\n$ npm install @ice/stark-module --save\n```\n\n## Module LifeCycle\n\nspecify module lifeCycle when pack code as a micro module\n\n```js\nconst SampleComponent = () => {\n  return <div>Sample</div>;\n}\n\n// mount function will be trigger when mount micro module\nexport function mount(ModuleComponent, targetNode, props) {\n  ReactDOM.render(<ModuleComponent {...props} />, targetNode);\n}\n\n// unmount function will be trigger when unmount micro module\nexport function unmount(targetNode) {\n  ReactDOM.unmountComponentAtNode(targetNode);\n}\n\nexport default SampleComponent;\n```\n\n> pack module with module spec UMD\n\n## Usage\n\n### Basic Usage\n\n```jsx\nimport { MicroModule } from '@ice/stark-module';\n\nconst App = () => {\n  const moduleInfo = {\n    name: 'moduleName',\n    url: 'https://localhost/module.js',\n  }\n  return <MicroModule moduleInfo={moduleInfo} />;\n}\n```\n\n### Register Modules\n\n```jsx\nimport { MicroModule, registerModule, registerModules, getModules } from '@ice/stark-module';\n\n// register single module\nregisterModule({\n  url: 'https://localhost/module-a.js',\n  name: 'module-a',\n});\n\n// register multiple modules at once\nregisterModules([\n  {\n    url: 'https://localhost/module-b.js',\n    name: 'module-b',\n  },\n  {\n    url: 'https://localhost/module-c.js',\n    name: 'module-c',\n  },\n]);\n\n// get module info registered by API registerModules\nconst moduleInfo = getModules();\n\nconst App = () => {\n  // after registerMdoules, use micro module by specify module name\n  return (\n    <div>\n      <MicroModule moduleName=\"module-a\" />\n      <MicroModule moduleName=\"module-b\" />\n      <MicroModule moduleName=\"module-c\" />\n    </div>\n  );\n}\n```\n\n### Registration Merging\n\nIf more than one modules are registered with the same name, only the last one will be kept.\n\n```jsx\nimport { registerModule, registerModules, getModules } from '@ice/stark-module';\n\nregisterModules([\n  {\n    url: 'https://localhost/module-a.js',\n    name: 'module-a',\n  },\n  {\n    url: 'https://localhost/module-b.js',\n    name: 'module-a',\n  },\n]);\n\nconst modules = getModules();\n/** the modules will be:\n[{\n  url: 'https://localhost/module-b.js',\n  name: 'module-a',\n}]\n*/\n\nregisterModule({\n  url: 'https://localhost/module-c.js',\n  name: 'module-a',\n});\n\nconst modules = getModules();\n/** the modules will be:\n[{\n  url: 'https://localhost/module-c.js',\n  name: 'module-a',\n}]\n*/\n```\n\n### Clear Modules\n\n```js\nimport { registerModules, clearModules } from '@ice/stark-module';\n\nregisterModules([\n  {\n    url: 'https://localhost/module-a.js',\n    name: 'module-a',\n  },\n  {\n    url: 'https://localhost/module-b.js',\n    name: 'module-b',\n  },\n]);\n\n// clear all modules information and content cache.\nclearModules();\n```\n\n### Custom Lifecyle\n\n```jsx\nimport { MicroModule } from '@ice/stark-module';\n\nconst App = () => {\n  const moduleInfo = {\n    name: 'moduleName',\n    url: 'https://localhost/module.js',\n    mount: (ModuleComponent, mountNode) => {\n      console.log('custom mount');\n      ReactDOM.render(<ModuleComponent />, mountNode);\n    },\n  }\n  return <MicroModule moduleInfo={moduleInfo} />;\n}\n```\n\n### Custom mount component\n\n```jsx\nimport { mountModule, unmoutModule } from '@ice/stark-module';\n\nconst moduleInfo = {\n  name: 'moduleName',\n  url: 'https://localhost/module.js',\n};\n\nconst ModuleComponent = () => {\n  const renderNode = useRef(null);\n  useEffect(() => {\n    mountModule(moduleInfo, renderNode, {});\n    return () => {\n      unmoutModule(moduleInfo, renderNode);\n    }\n  }, []);\n  return (<div ref={renderNode}></div>);\n};\n```\n\n### Register Local Modules\n\nIn some scenarios, it is necessary to support the built-in components. In this case, one can use `render` property to render a local module.\n\n```jsx\nimport LocalComponent from './localComponent';\n\nregisterModules([{\n  name: 'moduleName',\n  render: () => LocalComponent,\n}]);\n\nconst App = () => {\n  return (\n    <div>\n      <MicroModule moduleName=\"moduleName\" />\n    </div>\n  );\n}\n```\n\n## Contributors\n\nFeel free to report any questions as an [issue](https://github.com/ice-lab/icestark/issues/new), we'd love to have your helping hand on `icestark`.\n\nIf you're interested in `icestark`, see [CONTRIBUTING.md](https://github.com/alibaba/ice/blob/master/.github/CONTRIBUTING.md) for more information to learn how to get started.\n\n## License\n\n[MIT](LICENSE)","scripts":{"test":"NODE_ENV=unittest jest","build":"rm -rf lib && tsc","watch":"tsc -w","coverage":"codecov","prepublishOnly":"npm run test && npm run build"},"_npmUser":{"name":"maoxiaoke","email":"thebigyellowbee@qq.com"},"repository":{"url":"git+https://github.com/ice-lab/icestark.git","type":"git"},"_npmVersion":"6.14.4","description":"toolkit for load standard micro-module","directories":{},"_nodeVersion":"14.0.0","dependencies":{"@ice/sandbox":"^1.1.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.2.7","react":"^16.13.1","codecov":"^3.4.0","ts-jest":"^25.3.1","react-dom":"^16.13.1","typescript":"^3.8.3","@testing-library/react":"^10.0.3","@testing-library/jest-dom":"^5.5.0"},"peerDependencies":{"react":">=15.0.0","react-dom":">=15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/stark-module_1.4.3-1_1630467922574_0.9915333352270619","host":"s3://npm-registry-packages"}},"1.4.3-2":{"name":"@ice/stark-module","version":"1.4.3-2","keywords":["modules","icestark"],"author":"","license":"MIT","_id":"@ice/stark-module@1.4.3-2","maintainers":[{"name":"sobear","email":"sobear.me@gmail.com"},{"name":"clarkxia","email":"xiawenwu41@gmail.com"},{"name":"yuanyan","email":"yuanyan.cao@gmail.com"},{"name":"rax-publisher","email":"rax-public@alibaba-inc.com"},{"name":"solojiang","email":"feifeishen1996@gmail.com"},{"name":"chenbin93","email":"chenbinad@gmail.com"},{"name":"maoxiaoke","email":"thebigyellowbee@qq.com"}],"homepage":"https://github.com/ice-lab/icestark#readme","bugs":{"url":"https://github.com/ice-lab/icestark/issues"},"dist":{"shasum":"c3e5cfc32126c741c6428a41c767a901c2596fe1","tarball":"https://registry.npmjs.org/@ice/stark-module/-/stark-module-1.4.3-2.tgz","fileCount":19,"integrity":"sha512-JfE9XVxC65WB9EAcEMNB5FqaSUbJISsWcjLIuBJQ3vZvUYDmT3elQ91m3Z9fipuiSWIL3v1kfqxOi+o8wUhUlw==","signatures":[{"sig":"MEUCIAuj7cjK7er5XS1+c11iVGy0muH10wBw/OBiMkPxSLPSAiEA1wZyfsWmZbDyXJVd8Wkblo0hXGKLtstehHrBgDYcXvI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51554,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhMb2lCRA9TVsSAnZWagAA/hMP/jzsCUmPQ3YR5YVfaVNy\nKWg1GO2EF99RQQsTjXSzJB+vbgmfwFd7ZSwsVhaMzgDqSak2zSIuEYQYs9nL\no3BqRfpH3dxmxewwvcZHZ3CWsj2HbCD1C99Lk4QqF8jN0YbAei2fAIPecOUc\nr+MzxOOAf6ARadqdyvgoJE3ipzWXB7HXUMJOv+SaGW5VR/uz4PY5kXEgg8TI\nbEjm0ZKmYXTg1BsqX4QntnelBLdEfXXt/nCbXhkttxzAL7kfybO5kASg8Vpz\np472EnnSU06Takx3ZzxzTTHvtqHXWG6PKUd3FGBo3J8YpaMHOBpvfG6AbOqR\nYV3djavz0S4F1wiohS6rSFKrb7MswN2yul7JDxo8ZM2MEcqyEBpIw74Ik+qf\nyOn/djg/BrqlNm4inMFwilJW2GaU6nTQBydiMcl2r2Vxi7h1FVhfaj+0h9I6\nx+ZsmdrempdQooQkkxFjgVDMxwWzRzEYhnd3bpqyY+XucfiLS+OIZWseHJI1\n5JaUTkGxQvpRH0MTZWogicKdpspCzJ0CLeoqLDwC0GdlXkYtL4doo+VeN6DQ\nafUycO1QBeXwEe2J21lVGN/FgSUf7JbDqe0Z8y3Be17wWs4G5TY93x7/yGeV\nj6HVzlm0jzgtLa8c5kvGTH9neyj73zDYOa/iUSi0To1k4lmx27hhCoRTLkul\nfnpQ\r\n=elCs\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"preset":"ts-jest","collectCoverage":true,"coverageDirectory":"./coverage/"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS"}},"readme":"# @ice/stark-module\n\n[![NPM version](https://img.shields.io/npm/v/@ice/stark-module.svg?style=flat)](https://npmjs.org/package/@ice/stark-module) [![Package Quality](https://npm.packagequality.com/shield/@ice%2Fstark-module.svg)](https://packagequality.com/#?package=@ice%2Fstark-module) [![build status](https://img.shields.io/travis/ice-lab/icestark.svg?style=flat-square)](https://travis-ci.org/ice-lab/icestark) [![Test coverage](https://img.shields.io/codecov/c/github/ice-lab/icestark.svg?style=flat-square)](https://codecov.io/gh/ice-lab/icestark) [![NPM downloads](http://img.shields.io/npm/dm/@ice/stark-module.svg?style=flat)](https://npmjs.org/package/@ice/stark-module) [![David deps](https://img.shields.io/david/ice-lab/icestark.svg?style=flat-square)](https://david-dm.org/ice-lab/icestark)\n\n## Installation\n\n```bash\n$ npm install @ice/stark-module --save\n```\n\n## Module LifeCycle\n\nspecify module lifeCycle when pack code as a micro module\n\n```js\nconst SampleComponent = () => {\n  return <div>Sample</div>;\n}\n\n// mount function will be trigger when mount micro module\nexport function mount(ModuleComponent, targetNode, props) {\n  ReactDOM.render(<ModuleComponent {...props} />, targetNode);\n}\n\n// unmount function will be trigger when unmount micro module\nexport function unmount(targetNode) {\n  ReactDOM.unmountComponentAtNode(targetNode);\n}\n\nexport default SampleComponent;\n```\n\n> pack module with module spec UMD\n\n## Usage\n\n### Basic Usage\n\n```jsx\nimport { MicroModule } from '@ice/stark-module';\n\nconst App = () => {\n  const moduleInfo = {\n    name: 'moduleName',\n    url: 'https://localhost/module.js',\n  }\n  return <MicroModule moduleInfo={moduleInfo} />;\n}\n```\n\n### Register Modules\n\n```jsx\nimport { MicroModule, registerModule, registerModules, getModules } from '@ice/stark-module';\n\n// register single module\nregisterModule({\n  url: 'https://localhost/module-a.js',\n  name: 'module-a',\n});\n\n// register multiple modules at once\nregisterModules([\n  {\n    url: 'https://localhost/module-b.js',\n    name: 'module-b',\n  },\n  {\n    url: 'https://localhost/module-c.js',\n    name: 'module-c',\n  },\n]);\n\n// get module info registered by API registerModules\nconst moduleInfo = getModules();\n\nconst App = () => {\n  // after registerMdoules, use micro module by specify module name\n  return (\n    <div>\n      <MicroModule moduleName=\"module-a\" />\n      <MicroModule moduleName=\"module-b\" />\n      <MicroModule moduleName=\"module-c\" />\n    </div>\n  );\n}\n```\n\n### Registration Merging\n\nIf more than one modules are registered with the same name, only the last one will be kept.\n\n```jsx\nimport { registerModule, registerModules, getModules } from '@ice/stark-module';\n\nregisterModules([\n  {\n    url: 'https://localhost/module-a.js',\n    name: 'module-a',\n  },\n  {\n    url: 'https://localhost/module-b.js',\n    name: 'module-a',\n  },\n]);\n\nconst modules = getModules();\n/** the modules will be:\n[{\n  url: 'https://localhost/module-b.js',\n  name: 'module-a',\n}]\n*/\n\nregisterModule({\n  url: 'https://localhost/module-c.js',\n  name: 'module-a',\n});\n\nconst modules = getModules();\n/** the modules will be:\n[{\n  url: 'https://localhost/module-c.js',\n  name: 'module-a',\n}]\n*/\n```\n\n### Clear Modules\n\n```js\nimport { registerModules, clearModules } from '@ice/stark-module';\n\nregisterModules([\n  {\n    url: 'https://localhost/module-a.js',\n    name: 'module-a',\n  },\n  {\n    url: 'https://localhost/module-b.js',\n    name: 'module-b',\n  },\n]);\n\n// clear all modules information and content cache.\nclearModules();\n```\n\n### Custom Lifecyle\n\n```jsx\nimport { MicroModule } from '@ice/stark-module';\n\nconst App = () => {\n  const moduleInfo = {\n    name: 'moduleName',\n    url: 'https://localhost/module.js',\n    mount: (ModuleComponent, mountNode) => {\n      console.log('custom mount');\n      ReactDOM.render(<ModuleComponent />, mountNode);\n    },\n  }\n  return <MicroModule moduleInfo={moduleInfo} />;\n}\n```\n\n### Custom mount component\n\n```jsx\nimport { mountModule, unmoutModule } from '@ice/stark-module';\n\nconst moduleInfo = {\n  name: 'moduleName',\n  url: 'https://localhost/module.js',\n};\n\nconst ModuleComponent = () => {\n  const renderNode = useRef(null);\n  useEffect(() => {\n    mountModule(moduleInfo, renderNode, {});\n    return () => {\n      unmoutModule(moduleInfo, renderNode);\n    }\n  }, []);\n  return (<div ref={renderNode}></div>);\n};\n```\n\n### Register Local Modules\n\nIn some scenarios, it is necessary to support the built-in components. In this case, one can use `render` property to render a local module.\n\n```jsx\nimport LocalComponent from './localComponent';\n\nregisterModules([{\n  name: 'moduleName',\n  render: () => LocalComponent,\n}]);\n\nconst App = () => {\n  return (\n    <div>\n      <MicroModule moduleName=\"moduleName\" />\n    </div>\n  );\n}\n```\n\n## Contributors\n\nFeel free to report any questions as an [issue](https://github.com/ice-lab/icestark/issues/new), we'd love to have your helping hand on `icestark`.\n\nIf you're interested in `icestark`, see [CONTRIBUTING.md](https://github.com/alibaba/ice/blob/master/.github/CONTRIBUTING.md) for more information to learn how to get started.\n\n## License\n\n[MIT](LICENSE)","scripts":{"test":"NODE_ENV=unittest jest","build":"rm -rf lib && tsc","watch":"tsc -w","coverage":"codecov","prepublishOnly":"npm run test && npm run build"},"_npmUser":{"name":"maoxiaoke","email":"thebigyellowbee@qq.com"},"repository":{"url":"git+https://github.com/ice-lab/icestark.git","type":"git"},"_npmVersion":"6.14.4","description":"toolkit for load standard micro-module","directories":{},"_nodeVersion":"14.0.0","dependencies":{"@ice/sandbox":"^1.1.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.2.7","react":"^16.13.1","codecov":"^3.4.0","ts-jest":"^25.3.1","react-dom":"^16.13.1","typescript":"^3.8.3","@testing-library/react":"^10.0.3","@testing-library/jest-dom":"^5.5.0"},"peerDependencies":{"react":">=15.0.0","react-dom":">=15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/stark-module_1.4.3-2_1630649765577_0.9939893808079716","host":"s3://npm-registry-packages"}},"1.4.3-3":{"name":"@ice/stark-module","version":"1.4.3-3","keywords":["modules","icestark"],"author":"","license":"MIT","_id":"@ice/stark-module@1.4.3-3","maintainers":[{"name":"sobear","email":"sobear.me@gmail.com"},{"name":"clarkxia","email":"xiawenwu41@gmail.com"},{"name":"yuanyan","email":"yuanyan.cao@gmail.com"},{"name":"rax-publisher","email":"rax-public@alibaba-inc.com"},{"name":"solojiang","email":"feifeishen1996@gmail.com"},{"name":"chenbin93","email":"chenbinad@gmail.com"},{"name":"maoxiaoke","email":"thebigyellowbee@qq.com"}],"homepage":"https://github.com/ice-lab/icestark#readme","bugs":{"url":"https://github.com/ice-lab/icestark/issues"},"dist":{"shasum":"094191dd2cdb1aa04d52bf023fd7b78517b2fb1d","tarball":"https://registry.npmjs.org/@ice/stark-module/-/stark-module-1.4.3-3.tgz","fileCount":19,"integrity":"sha512-Y/WNCAFyaw8TfFiZfkG4kO3ltkknH9X704OZga4nocgtbbWft9RT5T8p6NVFQOUCaUExILAup2D92E8LpObkxQ==","signatures":[{"sig":"MEYCIQDn1C9WDV7or7CTsJFgjlZQTnGQhjd8gBRnIKB8XbdrDQIhAJaLrueBKOl9DU36cYxBOzYTglJMyz2lIX85/DE+Y4kC","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51500,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhMb5rCRA9TVsSAnZWagAAJ14P/1z/UpCfF5O5VSaf746u\ndd7z4P1LiHPrVQp0wJ2V/9m24Vslvf3lg+7VnQZ1Q57HbYeybCm5Kmig/cU3\nTP2Dzk1L/y4Y4J65KHkr1Ap6uHrX9WBzy1gLiBGD8tGJa5Yzg6C7o6tgdtv/\nT2M9bBZqFusHrSOR+WtKP8p8uK2xH9Zbq0OUYB4f/FMZkBq2+6fU2NXgJKnD\nl6Cq+QtLXhmp19UfOdGydYLgtVgQvhXbIei0dugSBCq1P0tG3q/gcsd1wIoL\nZpBijSqDB9I6e3HquKdX6d1/JVEtKikWkt1j4beYWUcvXSBJU2+4hMjPGWiM\nZlDXEa6+PjB1wKZFc8B2f4Q0CW3WVUvS1cfmiF5V4dCqdD7qB5qSZAz7IPGv\nh5lY2RuWZN3mCNDJp6FvSin04g8pL/BtXiU/aSc3XRWvu2//Eu8tTmqaS1EM\nmMlTF9phduSuR2VPHUcjz3yfXXwAI/U03soYc1laTjKoHrZtZsFZrsZYqn/5\nvsD2ti2g/wOdRokatR3Srrz5pouSxG+teGSz7JufwZKowfQEdBMKiOgT47Tj\nWl8xpxH2diVXGilBDSB7tI6u3lkd3CyMKTHvMh+wLHRVyaPAkl5xb06re/YE\nb3b8dmklz0gyQBJe+FKVxv2Tqm1RKzEmOeIyGYHAg7yoKR5Mh9XLL7tePY3j\nObPg\r\n=1OG0\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"preset":"ts-jest","collectCoverage":true,"coverageDirectory":"./coverage/"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS"}},"readme":"# @ice/stark-module\n\n[![NPM version](https://img.shields.io/npm/v/@ice/stark-module.svg?style=flat)](https://npmjs.org/package/@ice/stark-module) [![Package Quality](https://npm.packagequality.com/shield/@ice%2Fstark-module.svg)](https://packagequality.com/#?package=@ice%2Fstark-module) [![build status](https://img.shields.io/travis/ice-lab/icestark.svg?style=flat-square)](https://travis-ci.org/ice-lab/icestark) [![Test coverage](https://img.shields.io/codecov/c/github/ice-lab/icestark.svg?style=flat-square)](https://codecov.io/gh/ice-lab/icestark) [![NPM downloads](http://img.shields.io/npm/dm/@ice/stark-module.svg?style=flat)](https://npmjs.org/package/@ice/stark-module) [![David deps](https://img.shields.io/david/ice-lab/icestark.svg?style=flat-square)](https://david-dm.org/ice-lab/icestark)\n\n## Installation\n\n```bash\n$ npm install @ice/stark-module --save\n```\n\n## Module LifeCycle\n\nspecify module lifeCycle when pack code as a micro module\n\n```js\nconst SampleComponent = () => {\n  return <div>Sample</div>;\n}\n\n// mount function will be trigger when mount micro module\nexport function mount(ModuleComponent, targetNode, props) {\n  ReactDOM.render(<ModuleComponent {...props} />, targetNode);\n}\n\n// unmount function will be trigger when unmount micro module\nexport function unmount(targetNode) {\n  ReactDOM.unmountComponentAtNode(targetNode);\n}\n\nexport default SampleComponent;\n```\n\n> pack module with module spec UMD\n\n## Usage\n\n### Basic Usage\n\n```jsx\nimport { MicroModule } from '@ice/stark-module';\n\nconst App = () => {\n  const moduleInfo = {\n    name: 'moduleName',\n    url: 'https://localhost/module.js',\n  }\n  return <MicroModule moduleInfo={moduleInfo} />;\n}\n```\n\n### Register Modules\n\n```jsx\nimport { MicroModule, registerModule, registerModules, getModules } from '@ice/stark-module';\n\n// register single module\nregisterModule({\n  url: 'https://localhost/module-a.js',\n  name: 'module-a',\n});\n\n// register multiple modules at once\nregisterModules([\n  {\n    url: 'https://localhost/module-b.js',\n    name: 'module-b',\n  },\n  {\n    url: 'https://localhost/module-c.js',\n    name: 'module-c',\n  },\n]);\n\n// get module info registered by API registerModules\nconst moduleInfo = getModules();\n\nconst App = () => {\n  // after registerMdoules, use micro module by specify module name\n  return (\n    <div>\n      <MicroModule moduleName=\"module-a\" />\n      <MicroModule moduleName=\"module-b\" />\n      <MicroModule moduleName=\"module-c\" />\n    </div>\n  );\n}\n```\n\n### Registration Merging\n\nIf more than one modules are registered with the same name, only the last one will be kept.\n\n```jsx\nimport { registerModule, registerModules, getModules } from '@ice/stark-module';\n\nregisterModules([\n  {\n    url: 'https://localhost/module-a.js',\n    name: 'module-a',\n  },\n  {\n    url: 'https://localhost/module-b.js',\n    name: 'module-a',\n  },\n]);\n\nconst modules = getModules();\n/** the modules will be:\n[{\n  url: 'https://localhost/module-b.js',\n  name: 'module-a',\n}]\n*/\n\nregisterModule({\n  url: 'https://localhost/module-c.js',\n  name: 'module-a',\n});\n\nconst modules = getModules();\n/** the modules will be:\n[{\n  url: 'https://localhost/module-c.js',\n  name: 'module-a',\n}]\n*/\n```\n\n### Clear Modules\n\n```js\nimport { registerModules, clearModules } from '@ice/stark-module';\n\nregisterModules([\n  {\n    url: 'https://localhost/module-a.js',\n    name: 'module-a',\n  },\n  {\n    url: 'https://localhost/module-b.js',\n    name: 'module-b',\n  },\n]);\n\n// clear all modules information and content cache.\nclearModules();\n```\n\n### Custom Lifecyle\n\n```jsx\nimport { MicroModule } from '@ice/stark-module';\n\nconst App = () => {\n  const moduleInfo = {\n    name: 'moduleName',\n    url: 'https://localhost/module.js',\n    mount: (ModuleComponent, mountNode) => {\n      console.log('custom mount');\n      ReactDOM.render(<ModuleComponent />, mountNode);\n    },\n  }\n  return <MicroModule moduleInfo={moduleInfo} />;\n}\n```\n\n### Custom mount component\n\n```jsx\nimport { mountModule, unmoutModule } from '@ice/stark-module';\n\nconst moduleInfo = {\n  name: 'moduleName',\n  url: 'https://localhost/module.js',\n};\n\nconst ModuleComponent = () => {\n  const renderNode = useRef(null);\n  useEffect(() => {\n    mountModule(moduleInfo, renderNode, {});\n    return () => {\n      unmoutModule(moduleInfo, renderNode);\n    }\n  }, []);\n  return (<div ref={renderNode}></div>);\n};\n```\n\n### Register Local Modules\n\nIn some scenarios, it is necessary to support the built-in components. In this case, one can use `render` property to render a local module.\n\n```jsx\nimport LocalComponent from './localComponent';\n\nregisterModules([{\n  name: 'moduleName',\n  render: () => LocalComponent,\n}]);\n\nconst App = () => {\n  return (\n    <div>\n      <MicroModule moduleName=\"moduleName\" />\n    </div>\n  );\n}\n```\n\n## Contributors\n\nFeel free to report any questions as an [issue](https://github.com/ice-lab/icestark/issues/new), we'd love to have your helping hand on `icestark`.\n\nIf you're interested in `icestark`, see [CONTRIBUTING.md](https://github.com/alibaba/ice/blob/master/.github/CONTRIBUTING.md) for more information to learn how to get started.\n\n## License\n\n[MIT](LICENSE)","scripts":{"test":"NODE_ENV=unittest jest","build":"rm -rf lib && tsc","watch":"tsc -w","coverage":"codecov","prepublishOnly":"npm run test && npm run build"},"_npmUser":{"name":"maoxiaoke","email":"thebigyellowbee@qq.com"},"repository":{"url":"git+https://github.com/ice-lab/icestark.git","type":"git"},"_npmVersion":"6.14.4","description":"toolkit for load standard micro-module","directories":{},"_nodeVersion":"14.0.0","dependencies":{"@ice/sandbox":"^1.1.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.2.7","react":"^16.13.1","codecov":"^3.4.0","ts-jest":"^25.3.1","react-dom":"^16.13.1","typescript":"^3.8.3","@testing-library/react":"^10.0.3","@testing-library/jest-dom":"^5.5.0"},"peerDependencies":{"react":">=15.0.0","react-dom":">=15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/stark-module_1.4.3-3_1630649962919_0.8701706120251582","host":"s3://npm-registry-packages"}},"1.4.3-4":{"name":"@ice/stark-module","version":"1.4.3-4","keywords":["modules","icestark"],"author":"","license":"MIT","_id":"@ice/stark-module@1.4.3-4","maintainers":[{"name":"sobear","email":"sobear.me@gmail.com"},{"name":"clarkxia","email":"xiawenwu41@gmail.com"},{"name":"yuanyan","email":"yuanyan.cao@gmail.com"},{"name":"rax-publisher","email":"rax-public@alibaba-inc.com"},{"name":"solojiang","email":"feifeishen1996@gmail.com"},{"name":"chenbin93","email":"chenbinad@gmail.com"},{"name":"maoxiaoke","email":"thebigyellowbee@qq.com"}],"homepage":"https://github.com/ice-lab/icestark#readme","bugs":{"url":"https://github.com/ice-lab/icestark/issues"},"dist":{"shasum":"fdcf4c00a4343e4d05327779baa3b582298cfdf0","tarball":"https://registry.npmjs.org/@ice/stark-module/-/stark-module-1.4.3-4.tgz","fileCount":19,"integrity":"sha512-Q03hK0bJjOEUpdGemFyg2dlGKWuh4Y8aWpiLDDY0JY7qTphZo5BqL4z05rHEJSccnHo6fxViK4fzMLBsuAUO4w==","signatures":[{"sig":"MEQCIEezlyiZY2cV5h9iB0dKdGHcbfgWn5MjWK/aM3+sc5rhAiBV19OPLawsvSa/7nkHgBEpqre9DemY5r/f7oq0LBj0iQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51500,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhOIaQCRA9TVsSAnZWagAA4B0P/1oR/m92vbrw0MoCDnYO\nDuOStNFTbpJy1O7IHk7EaYdlw7YVUfA/e+8vLhoLU/5M2xbag1ljN1IdhQSD\n3tHwpdT6JLAtF0+xmTNUN1t2B8mIUyoSQviCVgXckOa8qAZbkuOT5Eq5/Z5x\ngUzDwvvjbgEmfafmhGX4XwHg6EcSgTWV8gluWi13lOkuiqMDsQ+rR70j5WBD\nrz9Iju3AENTevWkiF0S5/Zy1pZxKMlvol+6JV+fbb/eThLF73UpNcu1IgZT8\nd3erQbXX7txY2cvoweKGEkA1mOUIKOCU1XS9AwSPepRZx6HnaqXChk+RJpFF\nQMqq6fFgI251/BaAlyEX6tvc20dB5W1GE+WVXXFqAKbtu+ZKAGeqWYXOEMCg\nhgo89Vy1bklp6qWJYKAy4SgtDP4dbmMyzUAljrpNERQZL3En6mbP3fu7dzXA\nu3ADI+Rn7LvMZAuptaqaeBknS4/YLJemhh1CGB4whKUwq3hc+0fw2lwAhJhA\n+iIoXIBj7Foyzi2cIEkfuMhkZqtJ+K+/xjjGKlZp49K+wVcknLiPI4L/ihGh\nOHqHoeNFEieWYHDPXPq0j8s24lFw4AKM/mm6lK2uBx0FLV4L4aEeGjsYFcX8\nKcNsTyQGBAhsu2SWmTBr3I9Fi53Tcs/Dvpjr6sWoKoBtuAlClvgIvyYYY6BL\natbK\r\n=1Iai\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"preset":"ts-jest","collectCoverage":true,"coverageDirectory":"./coverage/"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS"}},"readme":"# @ice/stark-module\n\n[![NPM version](https://img.shields.io/npm/v/@ice/stark-module.svg?style=flat)](https://npmjs.org/package/@ice/stark-module) [![Package Quality](https://npm.packagequality.com/shield/@ice%2Fstark-module.svg)](https://packagequality.com/#?package=@ice%2Fstark-module) [![build status](https://img.shields.io/travis/ice-lab/icestark.svg?style=flat-square)](https://travis-ci.org/ice-lab/icestark) [![Test coverage](https://img.shields.io/codecov/c/github/ice-lab/icestark.svg?style=flat-square)](https://codecov.io/gh/ice-lab/icestark) [![NPM downloads](http://img.shields.io/npm/dm/@ice/stark-module.svg?style=flat)](https://npmjs.org/package/@ice/stark-module) [![David deps](https://img.shields.io/david/ice-lab/icestark.svg?style=flat-square)](https://david-dm.org/ice-lab/icestark)\n\n## Installation\n\n```bash\n$ npm install @ice/stark-module --save\n```\n\n## Module LifeCycle\n\nspecify module lifeCycle when pack code as a micro module\n\n```js\nconst SampleComponent = () => {\n  return <div>Sample</div>;\n}\n\n// mount function will be trigger when mount micro module\nexport function mount(ModuleComponent, targetNode, props) {\n  ReactDOM.render(<ModuleComponent {...props} />, targetNode);\n}\n\n// unmount function will be trigger when unmount micro module\nexport function unmount(targetNode) {\n  ReactDOM.unmountComponentAtNode(targetNode);\n}\n\nexport default SampleComponent;\n```\n\n> pack module with module spec UMD\n\n## Usage\n\n### Basic Usage\n\n```jsx\nimport { MicroModule } from '@ice/stark-module';\n\nconst App = () => {\n  const moduleInfo = {\n    name: 'moduleName',\n    url: 'https://localhost/module.js',\n  }\n  return <MicroModule moduleInfo={moduleInfo} />;\n}\n```\n\n### Register Modules\n\n```jsx\nimport { MicroModule, registerModule, registerModules, getModules } from '@ice/stark-module';\n\n// register single module\nregisterModule({\n  url: 'https://localhost/module-a.js',\n  name: 'module-a',\n});\n\n// register multiple modules at once\nregisterModules([\n  {\n    url: 'https://localhost/module-b.js',\n    name: 'module-b',\n  },\n  {\n    url: 'https://localhost/module-c.js',\n    name: 'module-c',\n  },\n]);\n\n// get module info registered by API registerModules\nconst moduleInfo = getModules();\n\nconst App = () => {\n  // after registerMdoules, use micro module by specify module name\n  return (\n    <div>\n      <MicroModule moduleName=\"module-a\" />\n      <MicroModule moduleName=\"module-b\" />\n      <MicroModule moduleName=\"module-c\" />\n    </div>\n  );\n}\n```\n\n### Registration Merging\n\nIf more than one modules are registered with the same name, only the last one will be kept.\n\n```jsx\nimport { registerModule, registerModules, getModules } from '@ice/stark-module';\n\nregisterModules([\n  {\n    url: 'https://localhost/module-a.js',\n    name: 'module-a',\n  },\n  {\n    url: 'https://localhost/module-b.js',\n    name: 'module-a',\n  },\n]);\n\nconst modules = getModules();\n/** the modules will be:\n[{\n  url: 'https://localhost/module-b.js',\n  name: 'module-a',\n}]\n*/\n\nregisterModule({\n  url: 'https://localhost/module-c.js',\n  name: 'module-a',\n});\n\nconst modules = getModules();\n/** the modules will be:\n[{\n  url: 'https://localhost/module-c.js',\n  name: 'module-a',\n}]\n*/\n```\n\n### Clear Modules\n\n```js\nimport { registerModules, clearModules } from '@ice/stark-module';\n\nregisterModules([\n  {\n    url: 'https://localhost/module-a.js',\n    name: 'module-a',\n  },\n  {\n    url: 'https://localhost/module-b.js',\n    name: 'module-b',\n  },\n]);\n\n// clear all modules information and content cache.\nclearModules();\n```\n\n### Custom Lifecyle\n\n```jsx\nimport { MicroModule } from '@ice/stark-module';\n\nconst App = () => {\n  const moduleInfo = {\n    name: 'moduleName',\n    url: 'https://localhost/module.js',\n    mount: (ModuleComponent, mountNode) => {\n      console.log('custom mount');\n      ReactDOM.render(<ModuleComponent />, mountNode);\n    },\n  }\n  return <MicroModule moduleInfo={moduleInfo} />;\n}\n```\n\n### Custom mount component\n\n```jsx\nimport { mountModule, unmoutModule } from '@ice/stark-module';\n\nconst moduleInfo = {\n  name: 'moduleName',\n  url: 'https://localhost/module.js',\n};\n\nconst ModuleComponent = () => {\n  const renderNode = useRef(null);\n  useEffect(() => {\n    mountModule(moduleInfo, renderNode, {});\n    return () => {\n      unmoutModule(moduleInfo, renderNode);\n    }\n  }, []);\n  return (<div ref={renderNode}></div>);\n};\n```\n\n### Register Local Modules\n\nIn some scenarios, it is necessary to support the built-in components. In this case, one can use `render` property to render a local module.\n\n```jsx\nimport LocalComponent from './localComponent';\n\nregisterModules([{\n  name: 'moduleName',\n  render: () => LocalComponent,\n}]);\n\nconst App = () => {\n  return (\n    <div>\n      <MicroModule moduleName=\"moduleName\" />\n    </div>\n  );\n}\n```\n\n## Contributors\n\nFeel free to report any questions as an [issue](https://github.com/ice-lab/icestark/issues/new), we'd love to have your helping hand on `icestark`.\n\nIf you're interested in `icestark`, see [CONTRIBUTING.md](https://github.com/alibaba/ice/blob/master/.github/CONTRIBUTING.md) for more information to learn how to get started.\n\n## License\n\n[MIT](LICENSE)","scripts":{"test":"NODE_ENV=unittest jest","build":"rm -rf lib && tsc","watch":"tsc -w","coverage":"codecov","prepublishOnly":"npm run test && npm run build"},"_npmUser":{"name":"maoxiaoke","email":"thebigyellowbee@qq.com"},"repository":{"url":"git+https://github.com/ice-lab/icestark.git","type":"git"},"_npmVersion":"6.14.4","description":"toolkit for load standard micro-module","directories":{},"_nodeVersion":"14.0.0","dependencies":{"@ice/sandbox":"^1.1.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.2.7","react":"^16.13.1","codecov":"^3.4.0","ts-jest":"^25.3.1","react-dom":"^16.13.1","typescript":"^3.8.3","@testing-library/react":"^10.0.3","@testing-library/jest-dom":"^5.5.0"},"peerDependencies":{"react":">=15.0.0","react-dom":">=15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/stark-module_1.4.3-4_1631094416615_0.5999782976511641","host":"s3://npm-registry-packages"}},"1.4.3":{"name":"@ice/stark-module","version":"1.4.3","keywords":["modules","icestark"],"author":"","license":"MIT","_id":"@ice/stark-module@1.4.3","maintainers":[{"name":"sobear","email":"sobear.me@gmail.com"},{"name":"clarkxia","email":"xiawenwu41@gmail.com"},{"name":"yuanyan","email":"yuanyan.cao@gmail.com"},{"name":"rax-publisher","email":"rax-public@alibaba-inc.com"},{"name":"solojiang","email":"feifeishen1996@gmail.com"},{"name":"chenbin93","email":"chenbinad@gmail.com"},{"name":"maoxiaoke","email":"thebigyellowbee@qq.com"}],"homepage":"https://github.com/ice-lab/icestark#readme","bugs":{"url":"https://github.com/ice-lab/icestark/issues"},"dist":{"shasum":"c190d5a7a771e4a5e52497bf7c2265af67df9f88","tarball":"https://registry.npmjs.org/@ice/stark-module/-/stark-module-1.4.3.tgz","fileCount":19,"integrity":"sha512-BrXfeUByCzR41Inn0ruqw5MEi9Bu08Yg7h8BBVwuWUgM0JDjE4709IjKHD1VADyrUsuQspiOtOFmrwYRtsrZHQ==","signatures":[{"sig":"MEYCIQDm1MYqjzKGhtNDngiBYAOYzT+H0a4MLtX9CXAj0YCTIwIhAIgyqHgfjj4vfrFxI1lNjR5/T6mi4FgHXvZ2/uOwb+Rr","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51581},"jest":{"preset":"ts-jest","collectCoverage":true,"coverageDirectory":"./coverage/"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS"}},"scripts":{"test":"NODE_ENV=unittest jest","build":"rm -rf lib && tsc","watch":"tsc -w","coverage":"codecov","prepublishOnly":"npm run test && npm run build"},"_npmUser":{"name":"rax-publisher","email":"rax-public@alibaba-inc.com"},"repository":{"url":"git+https://github.com/ice-lab/icestark.git","type":"git"},"_npmVersion":"6.14.15","description":"toolkit for load standard micro-module","directories":{},"_nodeVersion":"12.22.6","dependencies":{"@ice/sandbox":"^1.1.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^25.2.7","react":"^16.13.1","codecov":"^3.4.0","ts-jest":"^25.3.1","react-dom":"^16.13.1","typescript":"^3.8.3","@testing-library/react":"^10.0.3","@testing-library/jest-dom":"^5.5.0"},"peerDependencies":{"react":">=15.0.0","react-dom":">=15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/stark-module_1.4.3_1632391299723_0.9489160338804432","host":"s3://npm-registry-packages"}},"1.5.0-0":{"name":"@ice/stark-module","version":"1.5.0-0","keywords":["modules","icestark"],"author":"","license":"MIT","_id":"@ice/stark-module@1.5.0-0","maintainers":[{"name":"luhengchang228","email":"luhengchang228@126.com"},{"name":"sobear","email":"sobear.me@gmail.com"},{"name":"clarkxia","email":"xiawenwu41@gmail.com"},{"name":"yuanyan","email":"yuanyan.cao@gmail.com"},{"name":"rax-publisher","email":"rax-public@alibaba-inc.com"},{"name":"solojiang","email":"feifeishen1996@gmail.com"},{"name":"chenbin93","email":"chenbinad@gmail.com"},{"name":"maoxiaoke","email":"thebigyellowbee@qq.com"}],"homepage":"https://github.com/ice-lab/icestark#readme","bugs":{"url":"https://github.com/ice-lab/icestark/issues"},"dist":{"shasum":"8b75a9de89f8e772521531f36d7cd5bfa1abf4fb","tarball":"https://registry.npmjs.org/@ice/stark-module/-/stark-module-1.5.0-0.tgz","fileCount":23,"integrity":"sha512-dsG+rdAm/1ZBbErImkgwGZUvNIE9QVJl9Wg7lBPkyAxL5mxllQGtFEXJ4/Lp/z54JapqrwpZj5Rndqs0XvaODg==","signatures":[{"sig":"MEYCIQCAC0wF8yPxMlqlPw4yZ9P+St56WsmlEHnfrz7XI5VPjAIhANZLzkgcEHzfIQUkw0B7gtsFIlUeGxjh1gPt+AtlEnhE","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":56855,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhrwQTCRA9TVsSAnZWagAAhIgP/iM7MiyADQZnkuCANV4A\n3wHkGkCAeRT3bl+VGK/BlYywXs1pjo1C0uc+IOYRJ+PrU26aavzh8mwqUacJ\nkxu579u+UWcq+0t6aZ/HDzmbnEOnmzxRCcULtzEORPXdU1QLXVftJiHqiOuZ\nJbGDzX5u/MAyhgCzufk9ooBgWmRLDeG4XTRCZMHvo/WBIrWLTUS8GbtUu3l8\nqHCfxpU2Rr6q02hZ6DBfAFtIgU8ftFb7GGcmJCQmPrNT1ZTSVOwwuYqow5y/\nd6G4AlHeHiyaxfXdXdoTEINUFuGJjB17f0ifbFBJwU+NQl7OU4fFxZHUwSuM\nV3ExiFh4WlgsE2+dWUEcu8ta1j2bbznsMbLplYfD5Q+nxFQulp/hJxkWhpGC\noVRgPoyoiWD4eR5w74HELD1zzITNBI79v20pqZ01OZLAtCWN83HQ31CpN2wT\n6iljRfHVZuCnwOl4mDMYh3frG8GdY7ZHsFKpN/dmlEWKl+F/OWIHDQNP7VwT\nCSbSv1xF9o/rtV0sw6Y3sH9xU+JPurS5KTvF/3imiCGiiiB8KAnUu0m8JLCY\noW24fI5MBz8rF3ih1gupGWNt5jn4/G8DDhnzXErhmERW12Q9w2EhdYDfmiVd\no4iQ3tHc3kVhOfxQOBgbVWVpb0wU8obWGzsAnfTf2RdCwIinEkMmwrilUFGF\nqwgY\r\n=+gSd\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"preset":"ts-jest","collectCoverage":true,"coverageDirectory":"./coverage/"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS"}},"readme":"# @ice/stark-module\n\n[![NPM version](https://img.shields.io/npm/v/@ice/stark-module.svg?style=flat)](https://npmjs.org/package/@ice/stark-module) [![Package Quality](https://npm.packagequality.com/shield/@ice%2Fstark-module.svg)](https://packagequality.com/#?package=@ice%2Fstark-module) [![build status](https://img.shields.io/travis/ice-lab/icestark.svg?style=flat-square)](https://travis-ci.org/ice-lab/icestark) [![Test coverage](https://img.shields.io/codecov/c/github/ice-lab/icestark.svg?style=flat-square)](https://codecov.io/gh/ice-lab/icestark) [![NPM downloads](http://img.shields.io/npm/dm/@ice/stark-module.svg?style=flat)](https://npmjs.org/package/@ice/stark-module) [![David deps](https://img.shields.io/david/ice-lab/icestark.svg?style=flat-square)](https://david-dm.org/ice-lab/icestark)\n\n## Installation\n\n```bash\n$ npm install @ice/stark-module --save\n```\n\n## Module LifeCycle\n\nspecify module lifeCycle when pack code as a micro module\n\n```js\nconst SampleComponent = () => {\n  return <div>Sample</div>;\n}\n\n// mount function will be trigger when mount micro module\nexport function mount(ModuleComponent, targetNode, props) {\n  ReactDOM.render(<ModuleComponent {...props} />, targetNode);\n}\n\n// unmount function will be trigger when unmount micro module\nexport function unmount(targetNode) {\n  ReactDOM.unmountComponentAtNode(targetNode);\n}\n\nexport default SampleComponent;\n```\n\n> pack module with module spec UMD\n\n## Usage\n\n### Basic Usage\n\n```jsx\nimport { MicroModule } from '@ice/stark-module';\n\nconst App = () => {\n  const moduleInfo = {\n    name: 'moduleName',\n    url: 'https://localhost/module.js',\n  }\n  return <MicroModule moduleInfo={moduleInfo} />;\n}\n```\n\n### Register Modules\n\n```jsx\nimport { MicroModule, registerModule, registerModules, getModules } from '@ice/stark-module';\n\n// register single module\nregisterModule({\n  url: 'https://localhost/module-a.js',\n  name: 'module-a',\n});\n\n// register multiple modules at once\nregisterModules([\n  {\n    url: 'https://localhost/module-b.js',\n    name: 'module-b',\n  },\n  {\n    url: 'https://localhost/module-c.js',\n    name: 'module-c',\n  },\n]);\n\n// get module info registered by API registerModules\nconst moduleInfo = getModules();\n\nconst App = () => {\n  // after registerMdoules, use micro module by specify module name\n  return (\n    <div>\n      <MicroModule moduleName=\"module-a\" />\n      <MicroModule moduleName=\"module-b\" />\n      <MicroModule moduleName=\"module-c\" />\n    </div>\n  );\n}\n```\n\n### Registration Merging\n\nIf more than one modules are registered with the same name, only the last one will be kept.\n\n```jsx\nimport { registerModule, registerModules, getModules } from '@ice/stark-module';\n\nregisterModules([\n  {\n    url: 'https://localhost/module-a.js',\n    name: 'module-a',\n  },\n  {\n    url: 'https://localhost/module-b.js',\n    name: 'module-a',\n  },\n]);\n\nconst modules = getModules();\n/** the modules will be:\n[{\n  url: 'https://localhost/module-b.js',\n  name: 'module-a',\n}]\n*/\n\nregisterModule({\n  url: 'https://localhost/module-c.js',\n  name: 'module-a',\n});\n\nconst modules = getModules();\n/** the modules will be:\n[{\n  url: 'https://localhost/module-c.js',\n  name: 'module-a',\n}]\n*/\n```\n\n### Clear Modules\n\n```js\nimport { registerModules, clearModules } from '@ice/stark-module';\n\nregisterModules([\n  {\n    url: 'https://localhost/module-a.js',\n    name: 'module-a',\n  },\n  {\n    url: 'https://localhost/module-b.js',\n    name: 'module-b',\n  },\n]);\n\n// clear all modules information and content cache.\nclearModules();\n```\n\n### Custom Lifecyle\n\n```jsx\nimport { MicroModule } from '@ice/stark-module';\n\nconst App = () => {\n  const moduleInfo = {\n    name: 'moduleName',\n    url: 'https://localhost/module.js',\n    mount: (ModuleComponent, mountNode) => {\n      console.log('custom mount');\n      ReactDOM.render(<ModuleComponent />, mountNode);\n    },\n  }\n  return <MicroModule moduleInfo={moduleInfo} />;\n}\n```\n\n### Custom mount component\n\n```jsx\nimport { mountModule, unmoutModule } from '@ice/stark-module';\n\nconst moduleInfo = {\n  name: 'moduleName',\n  url: 'https://localhost/module.js',\n};\n\nconst ModuleComponent = () => {\n  const renderNode = useRef(null);\n  useEffect(() => {\n    mountModule(moduleInfo, renderNode, {});\n    return () => {\n      unmoutModule(moduleInfo, renderNode);\n    }\n  }, []);\n  return (<div ref={renderNode}></div>);\n};\n```\n\n### Register Local Modules\n\nIn some scenarios, it is necessary to support the built-in components. In this case, one can use `render` property to render a local module.\n\n```jsx\nimport LocalComponent from './localComponent';\n\nregisterModules([{\n  name: 'moduleName',\n  render: () => LocalComponent,\n}]);\n\nconst App = () => {\n  return (\n    <div>\n      <MicroModule moduleName=\"moduleName\" />\n    </div>\n  );\n}\n```\n\n## Contributors\n\nFeel free to report any questions as an [issue](https://github.com/ice-lab/icestark/issues/new), we'd love to have your helping hand on `icestark`.\n\nIf you're interested in `icestark`, see [CONTRIBUTING.md](https://github.com/alibaba/ice/blob/master/.github/CONTRIBUTING.md) for more information to learn how to get started.\n\n## License\n\n[MIT](LICENSE)","scripts":{"test":"NODE_ENV=unittest jest","build":"rm -rf lib && tsc","watch":"tsc -w","coverage":"codecov","prepublishOnly":"npm run test && npm run build"},"_npmUser":{"name":"maoxiaoke","email":"thebigyellowbee@qq.com"},"repository":{"url":"git+https://github.com/ice-lab/icestark.git","type":"git"},"_npmVersion":"6.14.8","description":"toolkit for load standard micro-module","directories":{},"_nodeVersion":"14.15.0","dependencies":{"@ice/sandbox":"^1.1.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.2.7","react":"^16.13.1","codecov":"^3.4.0","ts-jest":"^25.3.1","react-dom":"^16.13.1","typescript":"^3.8.3","@testing-library/react":"^10.0.3","@testing-library/jest-dom":"^5.5.0"},"peerDependencies":{"react":">=15.0.0","react-dom":">=15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/stark-module_1.5.0-0_1638859795638_0.020751846637758087","host":"s3://npm-registry-packages"}},"1.4.4-0":{"name":"@ice/stark-module","version":"1.4.4-0","keywords":["modules","icestark"],"author":"","license":"MIT","_id":"@ice/stark-module@1.4.4-0","maintainers":[{"name":"luhengchang228","email":"luhengchang228@126.com"},{"name":"sobear","email":"sobear.me@gmail.com"},{"name":"clarkxia","email":"xiawenwu41@gmail.com"},{"name":"yuanyan","email":"yuanyan.cao@gmail.com"},{"name":"rax-publisher","email":"rax-public@alibaba-inc.com"},{"name":"solojiang","email":"feifeishen1996@gmail.com"},{"name":"chenbin93","email":"chenbinad@gmail.com"},{"name":"maoxiaoke","email":"thebigyellowbee@qq.com"}],"homepage":"https://github.com/ice-lab/icestark#readme","bugs":{"url":"https://github.com/ice-lab/icestark/issues"},"dist":{"shasum":"527f070508730873f5e58dea5fa89ec4f9a8bbb2","tarball":"https://registry.npmjs.org/@ice/stark-module/-/stark-module-1.4.4-0.tgz","fileCount":19,"integrity":"sha512-306FDyTaRipmRqTh3SdeayzsyA5QNpdLvTKQ2Waos5SWJp9tG+dSgJGtWW3k56vXWi06W+VK7J90BGs7Np3QYA==","signatures":[{"sig":"MEYCIQCt2o03BQO5J0qMlwQzn9tZSZGdzbL4AAb7eqTWHTENQAIhALbhqHFgkFBFbZjiX9Kw/YyboaX5vUFzswToSOSihVCp","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":52785,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhstJoCRA9TVsSAnZWagAA1hYP/34+VZB44czLO1NDouzY\nZfL3Pe5RN4xH8S6IbYyUijpzerzJmej5KjEQeK0npbvqoDyX28vLvGxFqWG7\nftQ9XuqpdSV7xgqWoeIVO8ETY2iIKC4XlFq8t4dFsnCLXl82Sflt0AKgd/be\nQPMh/eXsf9fUDVyLKshQWcLgnvTlda0y1auj5hx2FgUwe7VXxnwOAbVbN2ga\naURHf7SalX8UuLMJn5GDKbxMt7OaILf/vxXKcyJzl6zUGMGVyLD3XQSdCHyi\n46HAjldDX+VqbVQdQwZIgvPKHya9KSh98NXHnzK+aLcVwikwN08efYv2UK2U\nRC39o70r11bFpyycTJ6Jt7M+ai/Yi4tPcuxhx1SkVcfOkLojqm1R4dc1ClhL\nBGg52XYYaePU9LlWPxyaNBy5aaX3QT9GrkvYt4CGjDvg3uS1UY58TycgWckq\nfjspSXEbBbUI9vhUyOLli8C5zn7k0bHCPTh/EEhwdSp/ePDDCe9G77ZlbdeF\n/1+E2T42bJNWIvIhQwPtSnVQjGG3aLM/2doqJRyIHRb3stgOycQJ+2iKS5xC\nbc7mBeG49JO/eKsBWkyseP/zLr2KWy/QZJ/GwIceBoJjVXMlgXLSrNPQBSmV\nkcU+++wa+PeDxYk8S0+RW64wqYuPe3ZgJh+gGmVU8LLv1F8YfNL1RYlmeSPu\niBvj\r\n=rUgv\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"preset":"ts-jest","collectCoverage":true,"coverageDirectory":"./coverage/"},"main":"lib/index.js","husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS"}},"readme":"# @ice/stark-module\n\n[![NPM version](https://img.shields.io/npm/v/@ice/stark-module.svg?style=flat)](https://npmjs.org/package/@ice/stark-module) [![Package Quality](https://npm.packagequality.com/shield/@ice%2Fstark-module.svg)](https://packagequality.com/#?package=@ice%2Fstark-module) [![build status](https://img.shields.io/travis/ice-lab/icestark.svg?style=flat-square)](https://travis-ci.org/ice-lab/icestark) [![Test coverage](https://img.shields.io/codecov/c/github/ice-lab/icestark.svg?style=flat-square)](https://codecov.io/gh/ice-lab/icestark) [![NPM downloads](http://img.shields.io/npm/dm/@ice/stark-module.svg?style=flat)](https://npmjs.org/package/@ice/stark-module) [![David deps](https://img.shields.io/david/ice-lab/icestark.svg?style=flat-square)](https://david-dm.org/ice-lab/icestark)\n\n## Installation\n\n```bash\n$ npm install @ice/stark-module --save\n```\n\n## Module LifeCycle\n\nspecify module lifeCycle when pack code as a micro module\n\n```js\nconst SampleComponent = () => {\n  return <div>Sample</div>;\n}\n\n// mount function will be trigger when mount micro module\nexport function mount(ModuleComponent, targetNode, props) {\n  ReactDOM.render(<ModuleComponent {...props} />, targetNode);\n}\n\n// unmount function will be trigger when unmount micro module\nexport function unmount(targetNode) {\n  ReactDOM.unmountComponentAtNode(targetNode);\n}\n\nexport default SampleComponent;\n```\n\n> pack module with module spec UMD\n\n## Usage\n\n### Basic Usage\n\n```jsx\nimport { MicroModule } from '@ice/stark-module';\n\nconst App = () => {\n  const moduleInfo = {\n    name: 'moduleName',\n    url: 'https://localhost/module.js',\n  }\n  return <MicroModule moduleInfo={moduleInfo} />;\n}\n```\n\n### Register Modules\n\n```jsx\nimport { MicroModule, registerModule, registerModules, getModules } from '@ice/stark-module';\n\n// register single module\nregisterModule({\n  url: 'https://localhost/module-a.js',\n  name: 'module-a',\n});\n\n// register multiple modules at once\nregisterModules([\n  {\n    url: 'https://localhost/module-b.js',\n    name: 'module-b',\n  },\n  {\n    url: 'https://localhost/module-c.js',\n    name: 'module-c',\n  },\n]);\n\n// get module info registered by API registerModules\nconst moduleInfo = getModules();\n\nconst App = () => {\n  // after registerMdoules, use micro module by specify module name\n  return (\n    <div>\n      <MicroModule moduleName=\"module-a\" />\n      <MicroModule moduleName=\"module-b\" />\n      <MicroModule moduleName=\"module-c\" />\n    </div>\n  );\n}\n```\n\n### Registration Merging\n\nIf more than one modules are registered with the same name, only the last one will be kept.\n\n```jsx\nimport { registerModule, registerModules, getModules } from '@ice/stark-module';\n\nregisterModules([\n  {\n    url: 'https://localhost/module-a.js',\n    name: 'module-a',\n  },\n  {\n    url: 'https://localhost/module-b.js',\n    name: 'module-a',\n  },\n]);\n\nconst modules = getModules();\n/** the modules will be:\n[{\n  url: 'https://localhost/module-b.js',\n  name: 'module-a',\n}]\n*/\n\nregisterModule({\n  url: 'https://localhost/module-c.js',\n  name: 'module-a',\n});\n\nconst modules = getModules();\n/** the modules will be:\n[{\n  url: 'https://localhost/module-c.js',\n  name: 'module-a',\n}]\n*/\n```\n\n### Clear Modules\n\n```js\nimport { registerModules, clearModules } from '@ice/stark-module';\n\nregisterModules([\n  {\n    url: 'https://localhost/module-a.js',\n    name: 'module-a',\n  },\n  {\n    url: 'https://localhost/module-b.js',\n    name: 'module-b',\n  },\n]);\n\n// clear all modules information and content cache.\nclearModules();\n```\n\n### Custom Lifecyle\n\n```jsx\nimport { MicroModule } from '@ice/stark-module';\n\nconst App = () => {\n  const moduleInfo = {\n    name: 'moduleName',\n    url: 'https://localhost/module.js',\n    mount: (ModuleComponent, mountNode) => {\n      console.log('custom mount');\n      ReactDOM.render(<ModuleComponent />, mountNode);\n    },\n  }\n  return <MicroModule moduleInfo={moduleInfo} />;\n}\n```\n\n### Custom mount component\n\n```jsx\nimport { mountModule, unmoutModule } from '@ice/stark-module';\n\nconst moduleInfo = {\n  name: 'moduleName',\n  url: 'https://localhost/module.js',\n};\n\nconst ModuleComponent = () => {\n  const renderNode = useRef(null);\n  useEffect(() => {\n    mountModule(moduleInfo, renderNode, {});\n    return () => {\n      unmoutModule(moduleInfo, renderNode);\n    }\n  }, []);\n  return (<div ref={renderNode}></div>);\n};\n```\n\n### Register Local Modules\n\nIn some scenarios, it is necessary to support the built-in components. In this case, one can use `render` property to render a local module.\n\n```jsx\nimport LocalComponent from './localComponent';\n\nregisterModules([{\n  name: 'moduleName',\n  render: () => LocalComponent,\n}]);\n\nconst App = () => {\n  return (\n    <div>\n      <MicroModule moduleName=\"moduleName\" />\n    </div>\n  );\n}\n```\n\n## Contributors\n\nFeel free to report any questions as an [issue](https://github.com/ice-lab/icestark/issues/new), we'd love to have your helping hand on `icestark`.\n\nIf you're interested in `icestark`, see [CONTRIBUTING.md](https://github.com/alibaba/ice/blob/master/.github/CONTRIBUTING.md) for more information to learn how to get started.\n\n## License\n\n[MIT](LICENSE)","scripts":{"test":"NODE_ENV=unittest jest","build":"rm -rf lib && tsc","watch":"tsc -w","coverage":"codecov","prepublishOnly":"npm run test && npm run build"},"_npmUser":{"name":"maoxiaoke","email":"thebigyellowbee@qq.com"},"repository":{"url":"git+https://github.com/ice-lab/icestark.git","type":"git"},"_npmVersion":"6.14.8","description":"toolkit for load standard micro-module","directories":{},"_nodeVersion":"14.15.0","dependencies":{"@ice/sandbox":"^1.1.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.2.7","react":"^16.13.1","codecov":"^3.4.0","ts-jest":"^25.3.1","react-dom":"^16.13.1","typescript":"^3.8.3","@testing-library/react":"^10.0.3","@testing-library/jest-dom":"^5.5.0"},"peerDependencies":{"react":">=15.0.0","react-dom":">=15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/stark-module_1.4.4-0_1639109224712_0.21109961586679682","host":"s3://npm-registry-packages"}},"1.5.1-0":{"name":"@ice/stark-module","version":"1.5.1-0","keywords":["modules","icestark"],"author":"","license":"MIT","_id":"@ice/stark-module@1.5.1-0","maintainers":[{"name":"luhengchang228","email":"luhengchang228@126.com"},{"name":"sobear","email":"sobear.me@gmail.com"},{"name":"clarkxia","email":"xiawenwu41@gmail.com"},{"name":"yuanyan","email":"yuanyan.cao@gmail.com"},{"name":"rax-publisher","email":"rax-public@alibaba-inc.com"},{"name":"solojiang","email":"feifeishen1996@gmail.com"},{"name":"chenbin93","email":"chenbinad@gmail.com"},{"name":"maoxiaoke","email":"thebigyellowbee@qq.com"}],"homepage":"https://github.com/ice-lab/icestark#readme","bugs":{"url":"https://github.com/ice-lab/icestark/issues"},"dist":{"shasum":"01577ce2177bd51392d722413713738828aaabe4","tarball":"https://registry.npmjs.org/@ice/stark-module/-/stark-module-1.5.1-0.tgz","fileCount":19,"integrity":"sha512-qq8rSYNKZ4lajn7kBcc7Guo4Aoxf9JZCCTbr5YdCU15DlwxoZSnZ2wzc8PFSS/x2jxU74e11kU/YLxsY4Oyalg==","signatures":[{"sig":"MEUCIQDjjf23EBqvUSNTBZirTFyhHhR3G4KickspGVzjXV8//gIgfb2edyXAyJBQEKlmm0RFCYuTmv2/lOkXv/XqiKURo1I=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":52022,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhw+G0CRA9TVsSAnZWagAAlpEQAIS7njuMEP0LGyUTt/1q\nhxDcPugI00ammBqJT4Gvm0x6f7Le1hJvKKRFIIPP9jf5lBMbymOlt3tKgH6F\nwiYsNdAxHmzM5edmwIk1n7/fmFW7hjn1Csi/r5idDk7NUzLFRM7dsUAt1mR2\nSysv5ue3P4IP3Fw05kjj5py98ZnMiwYSnKI4GMMTvq90gPcC1alMh0+dX6Wl\nANAe4RluJicsBZuzB1RKQG9eZSkX6rSGvVvS8d+kF6wkNuB+AC23fwGquz+i\nildlCgDjEsthHFdk/wVOK2NqxcnxnH7CLVasBg+Mj1wbVejNtXWT3ehuwk+f\nt4qeqFNcPD5cWOfa9duo60wG6zhTGcWNYhMyNr24QjaO6DeMfFMG9DLWH7Cu\nO7ev+K2YxT7UvSEtC8d80n7tUwf2mqDIdtLv40uUQXKYwAq3qnQlWOelywnX\nUFrYpzx9PbY+PSdmPTEjdRMEvEC/FAiAK6YMp+Ylu0lpTeoI0aot0AnzLDV9\np3uZlj88CSaIzDfREG6lPaYs+fVgJszbgOmwnju4OET2Ou8NzKMSV3yIUQqY\nD8KP+M7ZuieS6ueqAt0XU3Nde2LlInJz6PPuK5ntUrNa9x/gKyIkwjYfRvmB\ndRkniI+hq35yer8loKdj7a7j36Y2K7s1RT3mh5tSqanvM3Sise5PEVIPsZOl\ntD1D\r\n=PZ4s\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"preset":"ts-jest","automock":false,"testMatch":["**/__tests__/**/*.ts?(x)","**/?(*.)+(spec|test).ts?(x)"],"setupFiles":["../../setupJest.ts"],"collectCoverage":true,"coverageDirectory":"./coverage/"},"main":"lib/index.js","readme":"# @ice/stark-module\n\n[![NPM version](https://img.shields.io/npm/v/@ice/stark-module.svg?style=flat)](https://npmjs.org/package/@ice/stark-module) [![Package Quality](https://npm.packagequality.com/shield/@ice%2Fstark-module.svg)](https://packagequality.com/#?package=@ice%2Fstark-module) [![build status](https://img.shields.io/travis/ice-lab/icestark.svg?style=flat-square)](https://travis-ci.org/ice-lab/icestark) [![Test coverage](https://img.shields.io/codecov/c/github/ice-lab/icestark.svg?style=flat-square)](https://codecov.io/gh/ice-lab/icestark) [![NPM downloads](http://img.shields.io/npm/dm/@ice/stark-module.svg?style=flat)](https://npmjs.org/package/@ice/stark-module) [![David deps](https://img.shields.io/david/ice-lab/icestark.svg?style=flat-square)](https://david-dm.org/ice-lab/icestark)\n\n## Installation\n\n```bash\n$ npm install @ice/stark-module --save\n```\n\n## Module LifeCycle\n\nspecify module lifeCycle when pack code as a micro module\n\n```js\nconst SampleComponent = () => {\n  return <div>Sample</div>;\n}\n\n// mount function will be trigger when mount micro module\nexport function mount(ModuleComponent, targetNode, props) {\n  ReactDOM.render(<ModuleComponent {...props} />, targetNode);\n}\n\n// unmount function will be trigger when unmount micro module\nexport function unmount(targetNode) {\n  ReactDOM.unmountComponentAtNode(targetNode);\n}\n\nexport default SampleComponent;\n```\n\n> pack module with module spec UMD\n\n## Usage\n\n### Basic Usage\n\n```jsx\nimport { MicroModule } from '@ice/stark-module';\n\nconst App = () => {\n  const moduleInfo = {\n    name: 'moduleName',\n    url: 'https://localhost/module.js',\n  }\n  return <MicroModule moduleInfo={moduleInfo} />;\n}\n```\n\n### Register Modules\n\n```jsx\nimport { MicroModule, registerModule, registerModules, getModules } from '@ice/stark-module';\n\n// register single module\nregisterModule({\n  url: 'https://localhost/module-a.js',\n  name: 'module-a',\n});\n\n// register multiple modules at once\nregisterModules([\n  {\n    url: 'https://localhost/module-b.js',\n    name: 'module-b',\n  },\n  {\n    url: 'https://localhost/module-c.js',\n    name: 'module-c',\n  },\n]);\n\n// get module info registered by API registerModules\nconst moduleInfo = getModules();\n\nconst App = () => {\n  // after registerMdoules, use micro module by specify module name\n  return (\n    <div>\n      <MicroModule moduleName=\"module-a\" />\n      <MicroModule moduleName=\"module-b\" />\n      <MicroModule moduleName=\"module-c\" />\n    </div>\n  );\n}\n```\n\n### Registration Merging\n\nIf more than one modules are registered with the same name, only the last one will be kept.\n\n```jsx\nimport { registerModule, registerModules, getModules } from '@ice/stark-module';\n\nregisterModules([\n  {\n    url: 'https://localhost/module-a.js',\n    name: 'module-a',\n  },\n  {\n    url: 'https://localhost/module-b.js',\n    name: 'module-a',\n  },\n]);\n\nconst modules = getModules();\n/** the modules will be:\n[{\n  url: 'https://localhost/module-b.js',\n  name: 'module-a',\n}]\n*/\n\nregisterModule({\n  url: 'https://localhost/module-c.js',\n  name: 'module-a',\n});\n\nconst modules = getModules();\n/** the modules will be:\n[{\n  url: 'https://localhost/module-c.js',\n  name: 'module-a',\n}]\n*/\n```\n\n### Clear Modules\n\n```js\nimport { registerModules, clearModules } from '@ice/stark-module';\n\nregisterModules([\n  {\n    url: 'https://localhost/module-a.js',\n    name: 'module-a',\n  },\n  {\n    url: 'https://localhost/module-b.js',\n    name: 'module-b',\n  },\n]);\n\n// clear all modules information and content cache.\nclearModules();\n```\n\n### Custom Lifecyle\n\n```jsx\nimport { MicroModule } from '@ice/stark-module';\n\nconst App = () => {\n  const moduleInfo = {\n    name: 'moduleName',\n    url: 'https://localhost/module.js',\n    mount: (ModuleComponent, mountNode) => {\n      console.log('custom mount');\n      ReactDOM.render(<ModuleComponent />, mountNode);\n    },\n  }\n  return <MicroModule moduleInfo={moduleInfo} />;\n}\n```\n\n### Custom mount component\n\n```jsx\nimport { mountModule, unmoutModule } from '@ice/stark-module';\n\nconst moduleInfo = {\n  name: 'moduleName',\n  url: 'https://localhost/module.js',\n};\n\nconst ModuleComponent = () => {\n  const renderNode = useRef(null);\n  useEffect(() => {\n    mountModule(moduleInfo, renderNode, {});\n    return () => {\n      unmoutModule(moduleInfo, renderNode);\n    }\n  }, []);\n  return (<div ref={renderNode}></div>);\n};\n```\n\n### Register Local Modules\n\nIn some scenarios, it is necessary to support the built-in components. In this case, one can use `render` property to render a local module.\n\n```jsx\nimport LocalComponent from './localComponent';\n\nregisterModules([{\n  name: 'moduleName',\n  render: () => LocalComponent,\n}]);\n\nconst App = () => {\n  return (\n    <div>\n      <MicroModule moduleName=\"moduleName\" />\n    </div>\n  );\n}\n```\n\n## Contributors\n\nFeel free to report any questions as an [issue](https://github.com/ice-lab/icestark/issues/new), we'd love to have your helping hand on `icestark`.\n\nIf you're interested in `icestark`, see [CONTRIBUTING.md](https://github.com/alibaba/ice/blob/master/.github/CONTRIBUTING.md) for more information to learn how to get started.\n\n## License\n\n[MIT](LICENSE)","scripts":{"lint":"pnpm eslint --ext .js,.jsx,.ts,.tsx ./","test":"NODE_ENV=unittest pnpm jest","build":"rm -rf lib && tsc","watch":"tsc -w","prepublishOnly":"pnpm run-s lint test build"},"_npmUser":{"name":"maoxiaoke","email":"thebigyellowbee@qq.com"},"repository":{"url":"git+https://github.com/ice-lab/icestark.git","type":"git"},"_npmVersion":"6.14.8","description":"toolkit for load standard micro-module","directories":{},"_nodeVersion":"14.15.0","dependencies":{"@ice/sandbox":"^1.1.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"react":"^16.13.1","react-dom":"^16.13.1","typescript":"^3.8.3"},"peerDependencies":{"react":">=15.0.0","react-dom":">=15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/stark-module_1.5.1-0_1640227252322_0.5944157836075132","host":"s3://npm-registry-packages"}},"1.5.0-1":{"name":"@ice/stark-module","version":"1.5.0-1","keywords":["modules","icestark"],"author":"","license":"MIT","_id":"@ice/stark-module@1.5.0-1","maintainers":[{"name":"luhengchang228","email":"luhengchang228@126.com"},{"name":"sobear","email":"sobear.me@gmail.com"},{"name":"clarkxia","email":"xiawenwu41@gmail.com"},{"name":"yuanyan","email":"yuanyan.cao@gmail.com"},{"name":"rax-publisher","email":"rax-public@alibaba-inc.com"},{"name":"solojiang","email":"feifeishen1996@gmail.com"},{"name":"chenbin93","email":"chenbinad@gmail.com"},{"name":"maoxiaoke","email":"thebigyellowbee@qq.com"}],"homepage":"https://github.com/ice-lab/icestark#readme","bugs":{"url":"https://github.com/ice-lab/icestark/issues"},"dist":{"shasum":"0b8672687e2385b4dc363aa4b91f2ec176555be6","tarball":"https://registry.npmjs.org/@ice/stark-module/-/stark-module-1.5.0-1.tgz","fileCount":19,"integrity":"sha512-Wammd+PAtOWn39BeneK7SDufr/9fsK2ABY5Ps30aNblxYkHHWHgnABvqvskm5aTTYx8HHSq2WVuTSgiy9eS4dw==","signatures":[{"sig":"MEQCIF/IFUwmYJk4cHqou+GSGyEaRoaKSsdztvy094tCrFA0AiB4dYQP+ynjiZTqk/ydzwdwQgBxxdJsD282ZXNny/Ut2w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":52824,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhw+tgCRA9TVsSAnZWagAA0CgP/274Dl6Si183vFQ4Ji3R\nIdsFEPwRT/gqTEB1DvvSnUnZx9AAzBjqqKfGrfTz9J54Zw+yUNDPd7E4AU3y\nKKYcDn2LAnU0dBwKswBnuoxAKwTC0mQuxQKl7YgjuJuFXLEBs+2BS/DFIs4u\nqUiqVq9njVexdZz+ApSvVUK2Mn1XM8nCJ5Y6Bb6fan9cXSPDpTjA83FePHsp\nOEkj8pBurFgtcbY5hPb2/+78zbdGRbkeW1fuOBVllnv8qdchuVev6h8eMYiG\njYst6fhw3t5CYSK2sHtWhGwLuHGkiOhL+t9UWGz+3L3eMv2cZCAth0Bl6dqx\n6An2e+yJicSKAxq/En9Qt0IaDqVqWK9MpMcdmyw6T+x/K8oFAA9MgNFLjX/O\njQQLytON6V9S+FMP5dR7/csOdEmRIyfhklzzYyp2dreU/VKewdmvygH5Cw+2\naeiR9kcWOO9itHSgUSsU5VMGhGqtKrHuzbatdyafv2aZd6xfXaoxS76riKoO\nTh7YkSZbL+07fkYliCbQv3pufbPkVjFS/WnL2IW29Ux+sh9TU6Pc365dOEZy\nQJZSTYD9/PRvDSTR0zF4G5DJyKOHBn4PNMHcYvCgTDVfvdXrxmeN3Jk53AxR\nlVjjBntPmBK/6nGT7tUMIg9PwEU+N5v9vTxb+A5pYxJod++9Me9uIkb6Lpxj\nUx+t\r\n=znI0\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"preset":"ts-jest","automock":false,"testMatch":["**/__tests__/**/*.ts?(x)","**/?(*.)+(spec|test).ts?(x)"],"setupFiles":["../../setupJest.ts"],"collectCoverage":true,"coverageDirectory":"./coverage/"},"main":"lib/index.js","readme":"# @ice/stark-module\n\n[![NPM version](https://img.shields.io/npm/v/@ice/stark-module.svg?style=flat)](https://npmjs.org/package/@ice/stark-module) [![Package Quality](https://npm.packagequality.com/shield/@ice%2Fstark-module.svg)](https://packagequality.com/#?package=@ice%2Fstark-module) [![build status](https://img.shields.io/travis/ice-lab/icestark.svg?style=flat-square)](https://travis-ci.org/ice-lab/icestark) [![Test coverage](https://img.shields.io/codecov/c/github/ice-lab/icestark.svg?style=flat-square)](https://codecov.io/gh/ice-lab/icestark) [![NPM downloads](http://img.shields.io/npm/dm/@ice/stark-module.svg?style=flat)](https://npmjs.org/package/@ice/stark-module) [![David deps](https://img.shields.io/david/ice-lab/icestark.svg?style=flat-square)](https://david-dm.org/ice-lab/icestark)\n\n## Installation\n\n```bash\n$ npm install @ice/stark-module --save\n```\n\n## Module LifeCycle\n\nspecify module lifeCycle when pack code as a micro module\n\n```js\nconst SampleComponent = () => {\n  return <div>Sample</div>;\n}\n\n// mount function will be trigger when mount micro module\nexport function mount(ModuleComponent, targetNode, props) {\n  ReactDOM.render(<ModuleComponent {...props} />, targetNode);\n}\n\n// unmount function will be trigger when unmount micro module\nexport function unmount(targetNode) {\n  ReactDOM.unmountComponentAtNode(targetNode);\n}\n\nexport default SampleComponent;\n```\n\n> pack module with module spec UMD\n\n## Usage\n\n### Basic Usage\n\n```jsx\nimport { MicroModule } from '@ice/stark-module';\n\nconst App = () => {\n  const moduleInfo = {\n    name: 'moduleName',\n    url: 'https://localhost/module.js',\n  }\n  return <MicroModule moduleInfo={moduleInfo} />;\n}\n```\n\n### Register Modules\n\n```jsx\nimport { MicroModule, registerModule, registerModules, getModules } from '@ice/stark-module';\n\n// register single module\nregisterModule({\n  url: 'https://localhost/module-a.js',\n  name: 'module-a',\n});\n\n// register multiple modules at once\nregisterModules([\n  {\n    url: 'https://localhost/module-b.js',\n    name: 'module-b',\n  },\n  {\n    url: 'https://localhost/module-c.js',\n    name: 'module-c',\n  },\n]);\n\n// get module info registered by API registerModules\nconst moduleInfo = getModules();\n\nconst App = () => {\n  // after registerMdoules, use micro module by specify module name\n  return (\n    <div>\n      <MicroModule moduleName=\"module-a\" />\n      <MicroModule moduleName=\"module-b\" />\n      <MicroModule moduleName=\"module-c\" />\n    </div>\n  );\n}\n```\n\n### Registration Merging\n\nIf more than one modules are registered with the same name, only the last one will be kept.\n\n```jsx\nimport { registerModule, registerModules, getModules } from '@ice/stark-module';\n\nregisterModules([\n  {\n    url: 'https://localhost/module-a.js',\n    name: 'module-a',\n  },\n  {\n    url: 'https://localhost/module-b.js',\n    name: 'module-a',\n  },\n]);\n\nconst modules = getModules();\n/** the modules will be:\n[{\n  url: 'https://localhost/module-b.js',\n  name: 'module-a',\n}]\n*/\n\nregisterModule({\n  url: 'https://localhost/module-c.js',\n  name: 'module-a',\n});\n\nconst modules = getModules();\n/** the modules will be:\n[{\n  url: 'https://localhost/module-c.js',\n  name: 'module-a',\n}]\n*/\n```\n\n### Clear Modules\n\n```js\nimport { registerModules, clearModules } from '@ice/stark-module';\n\nregisterModules([\n  {\n    url: 'https://localhost/module-a.js',\n    name: 'module-a',\n  },\n  {\n    url: 'https://localhost/module-b.js',\n    name: 'module-b',\n  },\n]);\n\n// clear all modules information and content cache.\nclearModules();\n```\n\n### Custom Lifecyle\n\n```jsx\nimport { MicroModule } from '@ice/stark-module';\n\nconst App = () => {\n  const moduleInfo = {\n    name: 'moduleName',\n    url: 'https://localhost/module.js',\n    mount: (ModuleComponent, mountNode) => {\n      console.log('custom mount');\n      ReactDOM.render(<ModuleComponent />, mountNode);\n    },\n  }\n  return <MicroModule moduleInfo={moduleInfo} />;\n}\n```\n\n### Custom mount component\n\n```jsx\nimport { mountModule, unmoutModule } from '@ice/stark-module';\n\nconst moduleInfo = {\n  name: 'moduleName',\n  url: 'https://localhost/module.js',\n};\n\nconst ModuleComponent = () => {\n  const renderNode = useRef(null);\n  useEffect(() => {\n    mountModule(moduleInfo, renderNode, {});\n    return () => {\n      unmoutModule(moduleInfo, renderNode);\n    }\n  }, []);\n  return (<div ref={renderNode}></div>);\n};\n```\n\n### Register Local Modules\n\nIn some scenarios, it is necessary to support the built-in components. In this case, one can use `render` property to render a local module.\n\n```jsx\nimport LocalComponent from './localComponent';\n\nregisterModules([{\n  name: 'moduleName',\n  render: () => LocalComponent,\n}]);\n\nconst App = () => {\n  return (\n    <div>\n      <MicroModule moduleName=\"moduleName\" />\n    </div>\n  );\n}\n```\n\n## Contributors\n\nFeel free to report any questions as an [issue](https://github.com/ice-lab/icestark/issues/new), we'd love to have your helping hand on `icestark`.\n\nIf you're interested in `icestark`, see [CONTRIBUTING.md](https://github.com/alibaba/ice/blob/master/.github/CONTRIBUTING.md) for more information to learn how to get started.\n\n## License\n\n[MIT](LICENSE)","scripts":{"lint":"pnpm eslint --ext .js,.jsx,.ts,.tsx ./","test":"NODE_ENV=unittest pnpm jest","build":"rm -rf lib && tsc","watch":"tsc -w","prepublishOnly":"pnpm run-s lint test build"},"_npmUser":{"name":"maoxiaoke","email":"thebigyellowbee@qq.com"},"repository":{"url":"git+https://github.com/ice-lab/icestark.git","type":"git"},"_npmVersion":"6.14.8","description":"toolkit for load standard micro-module","directories":{},"_nodeVersion":"14.15.0","dependencies":{"@ice/sandbox":"^1.1.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"react":"^16.13.1","react-dom":"^16.13.1","typescript":"^3.8.3"},"peerDependencies":{"react":">=15.0.0","react-dom":">=15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/stark-module_1.5.0-1_1640229728009_0.1581013525884627","host":"s3://npm-registry-packages"}},"1.4.5-0":{"name":"@ice/stark-module","version":"1.4.5-0","keywords":["modules","icestark"],"author":"","license":"MIT","_id":"@ice/stark-module@1.4.5-0","maintainers":[{"name":"luhengchang228","email":"luhengchang228@126.com"},{"name":"sobear","email":"sobear.me@gmail.com"},{"name":"clarkxia","email":"xiawenwu41@gmail.com"},{"name":"yuanyan","email":"yuanyan.cao@gmail.com"},{"name":"rax-publisher","email":"rax-public@alibaba-inc.com"},{"name":"solojiang","email":"feifeishen1996@gmail.com"},{"name":"chenbin93","email":"chenbinad@gmail.com"},{"name":"maoxiaoke","email":"thebigyellowbee@qq.com"}],"homepage":"https://github.com/ice-lab/icestark#readme","bugs":{"url":"https://github.com/ice-lab/icestark/issues"},"dist":{"shasum":"843c477b4787ea6e1b2dd38162d7a2f6a634df06","tarball":"https://registry.npmjs.org/@ice/stark-module/-/stark-module-1.4.5-0.tgz","fileCount":19,"integrity":"sha512-knosYXcSkT49MhE10LOS4pZ59Tl9svZnN1ixm8UE82EVv8UXnIkVyKxqb4OFbP1XEAeBrbW6U+ji3ZLb4netvA==","signatures":[{"sig":"MEUCIQCh9/7/4tFDB56PM06x+ti1RwnAuYwPJM1lxV1g/IpZWQIgfAoJIXOaNKw5Yy5knB6tBcXAYhZQZMf58SZyE4vUfW8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51944,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhxB+7CRA9TVsSAnZWagAAxsoP/2w0amHBmSyGkr/eAge0\nljzATnSGPIpkqvzpGXwPtThrrzgsa16ivP1WC0fq4Vcfg6tKGtDRsYQ2A9jY\nHS6zGfDkmm6uHr1G4pDTF+acfu0uOv4CkBHVZDuapRcEWTRilUEf6SdObGg+\np+Chw9OxHe+SU4GL6wb6Dj798jgQgw/bLwFoXFTrpCybHFFgu3DTekZycokF\nS7yANoll2xk2HI7m3DJJcVzZFgVYrF8syViD9CxFpVGPcR5mivisfu0LPtHq\nbeKuTSW4X74Ee5FXjnlCYBE9jEIAM/voAxWPhro4ALQCGrN52mqki3Edk0fa\nMU3muz9bl8AdztcEYDi2rjKRLzTlNn1lOeRNt5/LOok0rEHaiITzeSHam/Ig\nz1rhHoexj5I/JKf1f/2/z4VFGXO5nBbK56D9zEiYsFEl5KKq/d5hmwi9+JGt\nHaYHnzYoHNUghBAUHbdVhFdT9iwIF8eXlVSi7Vjity/FSDSXS5zxCIvr7g23\nKu7JH4FHo+StYe3Ixm0ZsVy/7mMsU7JYU7IQrpaiuwxLPXC5hrUcPRzNBlqT\nSNVEfJ2dIYMvGeWw4IZfDnhF4t+hftHNY1ElVwnG1EmG61CTXncZEH/mzxuz\nyOEpn/x4hYWSkrYzWtto3LdHK8tX+zjpJwS8l8uAJbrtJG4H6idOzneU8D51\nYVqJ\r\n=tnFI\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"preset":"ts-jest","automock":false,"testMatch":["**/__tests__/**/*.ts?(x)","**/?(*.)+(spec|test).ts?(x)"],"setupFiles":["../../setupJest.ts"],"collectCoverage":true,"coverageDirectory":"./coverage/"},"main":"lib/index.js","readme":"# @ice/stark-module\n\n[![NPM version](https://img.shields.io/npm/v/@ice/stark-module.svg?style=flat)](https://npmjs.org/package/@ice/stark-module) [![Package Quality](https://npm.packagequality.com/shield/@ice%2Fstark-module.svg)](https://packagequality.com/#?package=@ice%2Fstark-module) [![build status](https://img.shields.io/travis/ice-lab/icestark.svg?style=flat-square)](https://travis-ci.org/ice-lab/icestark) [![Test coverage](https://img.shields.io/codecov/c/github/ice-lab/icestark.svg?style=flat-square)](https://codecov.io/gh/ice-lab/icestark) [![NPM downloads](http://img.shields.io/npm/dm/@ice/stark-module.svg?style=flat)](https://npmjs.org/package/@ice/stark-module) [![David deps](https://img.shields.io/david/ice-lab/icestark.svg?style=flat-square)](https://david-dm.org/ice-lab/icestark)\n\n## Installation\n\n```bash\n$ npm install @ice/stark-module --save\n```\n\n## Module LifeCycle\n\nspecify module lifeCycle when pack code as a micro module\n\n```js\nconst SampleComponent = () => {\n  return <div>Sample</div>;\n}\n\n// mount function will be trigger when mount micro module\nexport function mount(ModuleComponent, targetNode, props) {\n  ReactDOM.render(<ModuleComponent {...props} />, targetNode);\n}\n\n// unmount function will be trigger when unmount micro module\nexport function unmount(targetNode) {\n  ReactDOM.unmountComponentAtNode(targetNode);\n}\n\nexport default SampleComponent;\n```\n\n> pack module with module spec UMD\n\n## Usage\n\n### Basic Usage\n\n```jsx\nimport { MicroModule } from '@ice/stark-module';\n\nconst App = () => {\n  const moduleInfo = {\n    name: 'moduleName',\n    url: 'https://localhost/module.js',\n  }\n  return <MicroModule moduleInfo={moduleInfo} />;\n}\n```\n\n### Register Modules\n\n```jsx\nimport { MicroModule, registerModule, registerModules, getModules } from '@ice/stark-module';\n\n// register single module\nregisterModule({\n  url: 'https://localhost/module-a.js',\n  name: 'module-a',\n});\n\n// register multiple modules at once\nregisterModules([\n  {\n    url: 'https://localhost/module-b.js',\n    name: 'module-b',\n  },\n  {\n    url: 'https://localhost/module-c.js',\n    name: 'module-c',\n  },\n]);\n\n// get module info registered by API registerModules\nconst moduleInfo = getModules();\n\nconst App = () => {\n  // after registerMdoules, use micro module by specify module name\n  return (\n    <div>\n      <MicroModule moduleName=\"module-a\" />\n      <MicroModule moduleName=\"module-b\" />\n      <MicroModule moduleName=\"module-c\" />\n    </div>\n  );\n}\n```\n\n### Registration Merging\n\nIf more than one modules are registered with the same name, only the last one will be kept.\n\n```jsx\nimport { registerModule, registerModules, getModules } from '@ice/stark-module';\n\nregisterModules([\n  {\n    url: 'https://localhost/module-a.js',\n    name: 'module-a',\n  },\n  {\n    url: 'https://localhost/module-b.js',\n    name: 'module-a',\n  },\n]);\n\nconst modules = getModules();\n/** the modules will be:\n[{\n  url: 'https://localhost/module-b.js',\n  name: 'module-a',\n}]\n*/\n\nregisterModule({\n  url: 'https://localhost/module-c.js',\n  name: 'module-a',\n});\n\nconst modules = getModules();\n/** the modules will be:\n[{\n  url: 'https://localhost/module-c.js',\n  name: 'module-a',\n}]\n*/\n```\n\n### Clear Modules\n\n```js\nimport { registerModules, clearModules } from '@ice/stark-module';\n\nregisterModules([\n  {\n    url: 'https://localhost/module-a.js',\n    name: 'module-a',\n  },\n  {\n    url: 'https://localhost/module-b.js',\n    name: 'module-b',\n  },\n]);\n\n// clear all modules information and content cache.\nclearModules();\n```\n\n### Custom Lifecyle\n\n```jsx\nimport { MicroModule } from '@ice/stark-module';\n\nconst App = () => {\n  const moduleInfo = {\n    name: 'moduleName',\n    url: 'https://localhost/module.js',\n    mount: (ModuleComponent, mountNode) => {\n      console.log('custom mount');\n      ReactDOM.render(<ModuleComponent />, mountNode);\n    },\n  }\n  return <MicroModule moduleInfo={moduleInfo} />;\n}\n```\n\n### Custom mount component\n\n```jsx\nimport { mountModule, unmoutModule } from '@ice/stark-module';\n\nconst moduleInfo = {\n  name: 'moduleName',\n  url: 'https://localhost/module.js',\n};\n\nconst ModuleComponent = () => {\n  const renderNode = useRef(null);\n  useEffect(() => {\n    mountModule(moduleInfo, renderNode, {});\n    return () => {\n      unmoutModule(moduleInfo, renderNode);\n    }\n  }, []);\n  return (<div ref={renderNode}></div>);\n};\n```\n\n### Register Local Modules\n\nIn some scenarios, it is necessary to support the built-in components. In this case, one can use `render` property to render a local module.\n\n```jsx\nimport LocalComponent from './localComponent';\n\nregisterModules([{\n  name: 'moduleName',\n  render: () => LocalComponent,\n}]);\n\nconst App = () => {\n  return (\n    <div>\n      <MicroModule moduleName=\"moduleName\" />\n    </div>\n  );\n}\n```\n\n## Contributors\n\nFeel free to report any questions as an [issue](https://github.com/ice-lab/icestark/issues/new), we'd love to have your helping hand on `icestark`.\n\nIf you're interested in `icestark`, see [CONTRIBUTING.md](https://github.com/alibaba/ice/blob/master/.github/CONTRIBUTING.md) for more information to learn how to get started.\n\n## License\n\n[MIT](LICENSE)","scripts":{"lint":"pnpm eslint --ext .js,.jsx,.ts,.tsx ./","test":"NODE_ENV=unittest pnpm jest","build":"rm -rf lib && tsc","watch":"tsc -w","prepublishOnly":"pnpm run-s lint test build"},"_npmUser":{"name":"maoxiaoke","email":"thebigyellowbee@qq.com"},"repository":{"url":"git+https://github.com/ice-lab/icestark.git","type":"git"},"_npmVersion":"6.14.8","description":"toolkit for load standard micro-module","directories":{},"_nodeVersion":"14.15.0","dependencies":{"@ice/sandbox":"^1.1.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"react":"^16.13.1","react-dom":"^16.13.1","typescript":"^3.8.3"},"peerDependencies":{"react":">=15.0.0","react-dom":">=15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/stark-module_1.4.5-0_1640243131443_0.12902097255040013","host":"s3://npm-registry-packages"}},"1.5.0":{"name":"@ice/stark-module","version":"1.5.0","keywords":["modules","icestark"],"author":"","license":"MIT","_id":"@ice/stark-module@1.5.0","maintainers":[{"name":"luhengchang228","email":"luhengchang228@126.com"},{"name":"sobear","email":"sobear.me@gmail.com"},{"name":"clarkxia","email":"xiawenwu41@gmail.com"},{"name":"yuanyan","email":"yuanyan.cao@gmail.com"},{"name":"rax-publisher","email":"rax-public@alibaba-inc.com"},{"name":"solojiang","email":"feifeishen1996@gmail.com"},{"name":"chenbin93","email":"chenbinad@gmail.com"},{"name":"maoxiaoke","email":"thebigyellowbee@qq.com"}],"homepage":"https://github.com/ice-lab/icestark#readme","bugs":{"url":"https://github.com/ice-lab/icestark/issues"},"dist":{"shasum":"228a34e3bbb787cb22a93e86ff0d7b9046e78de6","tarball":"https://registry.npmjs.org/@ice/stark-module/-/stark-module-1.5.0.tgz","fileCount":19,"integrity":"sha512-vUingWAb9lElOxuZ2yg+L0TI4/RDd7iTPkcAeCLhfe/gqSm87utpxb24nqAzjLOFrbwuYXyd8ZMisQFN6e6LiA==","signatures":[{"sig":"MEQCIHjck5bSXXyFRJSb3YEXwrfJLhqYab3XrboL4IKPzCvHAiAPslORrtG0Ssw/LEpyXdfpInHVvyEGyONWMHLo8bgl7A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":52822,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhxCJcCRA9TVsSAnZWagAANNEP/Ak6B/RYR+OX1e69mpD7\nBQfrkEvf9jmlVT/DDgLt/rGJMWNZ2dOuJKfPTkBod/V4Hia8TiEzTuXFa9Ej\nOshHpgjaBcrvSCIPYxZXha41dDpnRueog0Sj0MVdJIaC5r9tW9t2eRO7mNRc\nlV4iOu87ekj4iSNi++eupmUNrow3uQZhdZR4O/nXcDVV3x1NWOLF6A6k1jDm\nZKHrlWra3mr3J6rdzcX7pKF3IoRWdC+qphl+xVHZDWFW1Zi/QC+HrS6IyUQ2\nfQeJZ6BuYV1hBBwVc0JqSlIGsUgUzHetzzaHDZqIOAaRqVFuSGpitfXxU9a7\n7waj7FiE5n9BcyRikLQoxbl4iK9l1C0km6mHIvt/+wPDNth+rz+WIwy1qRfk\nb7wzE4l2BLfUfWoSAug7u0e5J+FqsrPmjaoKI6cx+bqj7i/0iz2PvYNfYIc1\n/7441t/MyL71mTY1JRoZns47J+eU+HFQeXN6+OzCH39/D3/0y8uyrE8/jq8g\ng3up7HxaKmVYvV+tt9dl8iuaxAhTuNyUGVtYNADu5S4KNR/rUwiHBvldrJXT\nPIy1cE5joquBWRpuVhyUIMrbaU2U2NEUbCRIHeRA6O7qNCTRGGpXVAkghTYc\noziYcPhB+xeNTE5Z2lxMDvL2d/qfkqdiWzLhUXo0PTE7wwLGeWyUoZg/GHBB\nxpBX\r\n=LWsm\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"preset":"ts-jest","automock":false,"testMatch":["**/__tests__/**/*.ts?(x)","**/?(*.)+(spec|test).ts?(x)"],"setupFiles":["../../setupJest.ts"],"collectCoverage":true,"coverageDirectory":"./coverage/"},"main":"lib/index.js","scripts":{"lint":"pnpm eslint --ext .js,.jsx,.ts,.tsx ./","test":"NODE_ENV=unittest pnpm jest","build":"rm -rf lib && tsc","watch":"tsc -w","prepublishOnly":"pnpm run-s lint test build"},"_npmUser":{"name":"rax-publisher","email":"rax-public@alibaba-inc.com"},"repository":{"url":"git+https://github.com/ice-lab/icestark.git","type":"git"},"_npmVersion":"6.14.15","description":"toolkit for load standard micro-module","directories":{},"_nodeVersion":"12.22.8","dependencies":{"@ice/sandbox":"^1.1.0"},"_hasShrinkwrap":false,"devDependencies":{"react":"^16.13.1","react-dom":"^16.13.1","typescript":"^3.8.3"},"peerDependencies":{"react":">=15.0.0","react-dom":">=15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/stark-module_1.5.0_1640243804067_0.24865588079408285","host":"s3://npm-registry-packages"}},"1.4.5-1":{"name":"@ice/stark-module","version":"1.4.5-1","keywords":["modules","icestark"],"author":"","license":"MIT","_id":"@ice/stark-module@1.4.5-1","maintainers":[{"name":"luhengchang228","email":"luhengchang228@126.com"},{"name":"sobear","email":"sobear.me@gmail.com"},{"name":"clarkxia","email":"xiawenwu41@gmail.com"},{"name":"yuanyan","email":"yuanyan.cao@gmail.com"},{"name":"rax-publisher","email":"rax-public@alibaba-inc.com"},{"name":"solojiang","email":"feifeishen1996@gmail.com"},{"name":"chenbin93","email":"chenbinad@gmail.com"},{"name":"maoxiaoke","email":"thebigyellowbee@qq.com"}],"homepage":"https://github.com/ice-lab/icestark#readme","bugs":{"url":"https://github.com/ice-lab/icestark/issues"},"dist":{"shasum":"a5e1e38c4770c290c6d9adecb53c29a70c238f29","tarball":"https://registry.npmjs.org/@ice/stark-module/-/stark-module-1.4.5-1.tgz","fileCount":19,"integrity":"sha512-bBePMkUIT+h04UimqZAd95ExusuIu7YdUkRZSpFMuGEAvn05PtYCex6EQHMlX+gnU7rqIsnwFIaAsl+pExxnMA==","signatures":[{"sig":"MEUCIGt/LZYEZsvEKtjJpc2bVsS82/GqXXBEpwi6SVGlzIvKAiEAmtkFvn4d9UbH9SWEMe/MHtOq+xLeytUiVNRZfryPIfY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":53474,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhywr+CRA9TVsSAnZWagAA+KwP+wRgPt9o3dhkon85kljj\nttjFODd5ts8q8SDHqDNiJCNtOJlIqB53Alw2kEazEwZ1PmBZYg3ekqF+dH/f\nZM8LpJzrr0jl8/vX2Bd06SkaM+TyjhEkuW1M8Cgvg2TVckEVtC3SRfpun4Mh\n3w9iO/UoR3WYdCUHBC1t4NMWOFKmcQt/JUpHhWnXFAfzqhCzA/pnKSvQ0Gdz\nIo5hOs9YQyGF0FUeL4AIU2U7X1rViHszdi7LDxCDW36rTiiplMnTyu/W9aHb\nh2GlaTxmGCtv9swmqC36FQvBv3RTziaAopn4QDFYugjtJsePQgAbER6LbdaK\njgTvaeaeO9+dQoqmIPq//Jq4/6S+ohgQOfm/6yl0NvxYKOfJ5/reZ+kq+SRf\nlrvKgM5/yGCY3FK29D9eHcePSoEjsYGunONF4PUAf2xD42dOO7F/6KtO3dmh\nvyIwRDxBNVbBQCtSn8RO0WDmYFQkHsPVbETa2zPlHpRlwBQl1oFEmIg0tCYy\nVoEtBr45M9CZraxPPZ+41lTYoDxhKuhs81UGtW/JF206D8/1Ey/3nvB/CVlP\nlx5HsQAUTbFeVvQ0UB4dkaH5DqZ+6E+tR23LlyQrRjqs0IeERjrnUeTSAtRo\n+r/Xvr8NKzn/++PK2K6gL5xb89cMxO0xzswMubCkLnbNdsWOp74HWYNb+K4q\nXHYP\r\n=Ei8P\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"preset":"ts-jest","automock":false,"testMatch":["**/__tests__/**/*.ts?(x)","**/?(*.)+(spec|test).ts?(x)"],"setupFiles":["../../setupJest.ts"],"collectCoverage":true,"coverageDirectory":"./coverage/"},"main":"lib/index.js","readme":"# @ice/stark-module\n\n[![NPM version](https://img.shields.io/npm/v/@ice/stark-module.svg?style=flat)](https://npmjs.org/package/@ice/stark-module) [![Package Quality](https://npm.packagequality.com/shield/@ice%2Fstark-module.svg)](https://packagequality.com/#?package=@ice%2Fstark-module) [![build status](https://img.shields.io/travis/ice-lab/icestark.svg?style=flat-square)](https://travis-ci.org/ice-lab/icestark) [![Test coverage](https://img.shields.io/codecov/c/github/ice-lab/icestark.svg?style=flat-square)](https://codecov.io/gh/ice-lab/icestark) [![NPM downloads](http://img.shields.io/npm/dm/@ice/stark-module.svg?style=flat)](https://npmjs.org/package/@ice/stark-module) [![David deps](https://img.shields.io/david/ice-lab/icestark.svg?style=flat-square)](https://david-dm.org/ice-lab/icestark)\n\n## Installation\n\n```bash\n$ npm install @ice/stark-module --save\n```\n\n## Module LifeCycle\n\nspecify module lifeCycle when pack code as a micro module\n\n```js\nconst SampleComponent = () => {\n  return <div>Sample</div>;\n}\n\n// mount function will be trigger when mount micro module\nexport function mount(ModuleComponent, targetNode, props) {\n  ReactDOM.render(<ModuleComponent {...props} />, targetNode);\n}\n\n// unmount function will be trigger when unmount micro module\nexport function unmount(targetNode) {\n  ReactDOM.unmountComponentAtNode(targetNode);\n}\n\nexport default SampleComponent;\n```\n\n> pack module with module spec UMD\n\n## Usage\n\n### Basic Usage\n\n```jsx\nimport { MicroModule } from '@ice/stark-module';\n\nconst App = () => {\n  const moduleInfo = {\n    name: 'moduleName',\n    url: 'https://localhost/module.js',\n  }\n  return <MicroModule moduleInfo={moduleInfo} />;\n}\n```\n\n### Register Modules\n\n```jsx\nimport { MicroModule, registerModule, registerModules, getModules } from '@ice/stark-module';\n\n// register single module\nregisterModule({\n  url: 'https://localhost/module-a.js',\n  name: 'module-a',\n});\n\n// register multiple modules at once\nregisterModules([\n  {\n    url: 'https://localhost/module-b.js',\n    name: 'module-b',\n  },\n  {\n    url: 'https://localhost/module-c.js',\n    name: 'module-c',\n  },\n]);\n\n// get module info registered by API registerModules\nconst moduleInfo = getModules();\n\nconst App = () => {\n  // after registerMdoules, use micro module by specify module name\n  return (\n    <div>\n      <MicroModule moduleName=\"module-a\" />\n      <MicroModule moduleName=\"module-b\" />\n      <MicroModule moduleName=\"module-c\" />\n    </div>\n  );\n}\n```\n\n### Registration Merging\n\nIf more than one modules are registered with the same name, only the last one will be kept.\n\n```jsx\nimport { registerModule, registerModules, getModules } from '@ice/stark-module';\n\nregisterModules([\n  {\n    url: 'https://localhost/module-a.js',\n    name: 'module-a',\n  },\n  {\n    url: 'https://localhost/module-b.js',\n    name: 'module-a',\n  },\n]);\n\nconst modules = getModules();\n/** the modules will be:\n[{\n  url: 'https://localhost/module-b.js',\n  name: 'module-a',\n}]\n*/\n\nregisterModule({\n  url: 'https://localhost/module-c.js',\n  name: 'module-a',\n});\n\nconst modules = getModules();\n/** the modules will be:\n[{\n  url: 'https://localhost/module-c.js',\n  name: 'module-a',\n}]\n*/\n```\n\n### Clear Modules\n\n```js\nimport { registerModules, clearModules } from '@ice/stark-module';\n\nregisterModules([\n  {\n    url: 'https://localhost/module-a.js',\n    name: 'module-a',\n  },\n  {\n    url: 'https://localhost/module-b.js',\n    name: 'module-b',\n  },\n]);\n\n// clear all modules information and content cache.\nclearModules();\n```\n\n### Custom Lifecyle\n\n```jsx\nimport { MicroModule } from '@ice/stark-module';\n\nconst App = () => {\n  const moduleInfo = {\n    name: 'moduleName',\n    url: 'https://localhost/module.js',\n    mount: (ModuleComponent, mountNode) => {\n      console.log('custom mount');\n      ReactDOM.render(<ModuleComponent />, mountNode);\n    },\n  }\n  return <MicroModule moduleInfo={moduleInfo} />;\n}\n```\n\n### Custom mount component\n\n```jsx\nimport { mountModule, unmoutModule } from '@ice/stark-module';\n\nconst moduleInfo = {\n  name: 'moduleName',\n  url: 'https://localhost/module.js',\n};\n\nconst ModuleComponent = () => {\n  const renderNode = useRef(null);\n  useEffect(() => {\n    mountModule(moduleInfo, renderNode, {});\n    return () => {\n      unmoutModule(moduleInfo, renderNode);\n    }\n  }, []);\n  return (<div ref={renderNode}></div>);\n};\n```\n\n### Register Local Modules\n\nIn some scenarios, it is necessary to support the built-in components. In this case, one can use `render` property to render a local module.\n\n```jsx\nimport LocalComponent from './localComponent';\n\nregisterModules([{\n  name: 'moduleName',\n  render: () => LocalComponent,\n}]);\n\nconst App = () => {\n  return (\n    <div>\n      <MicroModule moduleName=\"moduleName\" />\n    </div>\n  );\n}\n```\n\n## Contributors\n\nFeel free to report any questions as an [issue](https://github.com/ice-lab/icestark/issues/new), we'd love to have your helping hand on `icestark`.\n\nIf you're interested in `icestark`, see [CONTRIBUTING.md](https://github.com/alibaba/ice/blob/master/.github/CONTRIBUTING.md) for more information to learn how to get started.\n\n## License\n\n[MIT](LICENSE)","scripts":{"lint":"pnpm eslint --ext .js,.jsx,.ts,.tsx ./","test":"NODE_ENV=unittest pnpm jest","build":"rm -rf lib && tsc","watch":"tsc -w","prepublishOnly":"pnpm run-s lint test build"},"_npmUser":{"name":"maoxiaoke","email":"thebigyellowbee@qq.com"},"repository":{"url":"git+https://github.com/ice-lab/icestark.git","type":"git"},"_npmVersion":"6.14.8","description":"toolkit for load standard micro-module","directories":{},"_nodeVersion":"14.15.0","dependencies":{"@ice/sandbox":"^1.1.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"react":"^16.13.1","react-dom":"^16.13.1","typescript":"^3.8.3"},"peerDependencies":{"react":">=15.0.0","react-dom":">=15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/stark-module_1.4.5-1_1640696574255_0.8310389259262152","host":"s3://npm-registry-packages"}},"1.5.1-1":{"name":"@ice/stark-module","version":"1.5.1-1","keywords":["modules","icestark"],"author":"","license":"MIT","_id":"@ice/stark-module@1.5.1-1","maintainers":[{"name":"luhengchang228","email":"luhengchang228@126.com"},{"name":"sobear","email":"sobear.me@gmail.com"},{"name":"clarkxia","email":"xiawenwu41@gmail.com"},{"name":"yuanyan","email":"yuanyan.cao@gmail.com"},{"name":"rax-publisher","email":"rax-public@alibaba-inc.com"},{"name":"solojiang","email":"feifeishen1996@gmail.com"},{"name":"chenbin93","email":"chenbinad@gmail.com"},{"name":"maoxiaoke","email":"thebigyellowbee@qq.com"}],"homepage":"https://github.com/ice-lab/icestark#readme","bugs":{"url":"https://github.com/ice-lab/icestark/issues"},"dist":{"shasum":"d094fdb9fcdc55c5a8f19ba7f3431f20251cd0d5","tarball":"https://registry.npmjs.org/@ice/stark-module/-/stark-module-1.5.1-1.tgz","fileCount":19,"integrity":"sha512-h3jZbiFkJoGcvR6d55QJJwCHpZFdRI3i6rnA88aPZ6rwYZQMHR7DKMdfihXTfbG6iv6EVBdi9VtSdB5CnFRF1A==","signatures":[{"sig":"MEUCIQCtiCivPjo8nF6S1czYmiEmgJCB9fIAXYFN9PNtBR3tZwIgAKo3dHgV5xphHQmA6Ym0+kWjyJhaEYlmGITKBpoJwp4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":53316,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh1UoKCRA9TVsSAnZWagAAanMP/jtMjS8wK0TXRaJaeJUP\nzeuJBqVfzghezHwX84nsimtjdFGGfndj+eMvEgJA91FyHPNTPqg4sUTn9eCg\nck+f2JZsIuWGHjczVEeCsTs4AThxXyfZOqULgb2IlJ4Wmsj2ILq/LV+v4BKs\nrXLZKOJXTWghhnuiXpay1ZvVv+oe46q3Z3VN8MbXC8h1oO/SUstRqP7HxOie\nwULXFxVVcxukuh12ZEf7I0sHbHaihFRMKZUDeeKEx1JrTv0XPf4ibfhKzId/\n6gOBNmMeRuGqu/2Vm3rs6Bur3BaeRpw+SW95qjzvNcgqyiMiDlEUQ+NaRDsJ\nNzDjYfUrWtdcxIYZ7oSRGWSF20CQXftijYaLaJYQdlQCCKLFA1jtxdakAkLN\nnnauZQTslrPX8+/hr6pM3d28it2ameMfGSvRoLTzJs56SPphifyyyAXLFwIW\nZCsdjfcOKVzKnt4bkLIcGx4L991erPHLK/NDjTJH1bQ6wQBhW/e5N4QriVxE\nlEtf0ffzk+2z7A8GFk7jkLB1B2ynTwzKxXEmQEFc1HJYjC+BNidGUO3b18m1\nI2aj4rewKHg3rVL7Hh8t9/IGv/8AVJeSeoQypt/ygQeauqRdwPNL5O73cjMB\nKsCpLtC/pvVlvISLrVWNgwEDQ9v5lfHpy0xUu0j49bKx6zVwLJuepipvy1sk\negoo\r\n=NyqN\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"preset":"ts-jest","automock":false,"testMatch":["**/__tests__/**/*.ts?(x)","**/?(*.)+(spec|test).ts?(x)"],"setupFiles":["../../setupJest.ts"],"collectCoverage":true,"coverageDirectory":"./coverage/"},"main":"lib/index.js","readme":"# @ice/stark-module\n\n[![NPM version](https://img.shields.io/npm/v/@ice/stark-module.svg?style=flat)](https://npmjs.org/package/@ice/stark-module) [![Package Quality](https://npm.packagequality.com/shield/@ice%2Fstark-module.svg)](https://packagequality.com/#?package=@ice%2Fstark-module) [![build status](https://img.shields.io/travis/ice-lab/icestark.svg?style=flat-square)](https://travis-ci.org/ice-lab/icestark) [![Test coverage](https://img.shields.io/codecov/c/github/ice-lab/icestark.svg?style=flat-square)](https://codecov.io/gh/ice-lab/icestark) [![NPM downloads](http://img.shields.io/npm/dm/@ice/stark-module.svg?style=flat)](https://npmjs.org/package/@ice/stark-module) [![David deps](https://img.shields.io/david/ice-lab/icestark.svg?style=flat-square)](https://david-dm.org/ice-lab/icestark)\n\n## Installation\n\n```bash\n$ npm install @ice/stark-module --save\n```\n\n## Module LifeCycle\n\nspecify module lifeCycle when pack code as a micro module\n\n```js\nconst SampleComponent = () => {\n  return <div>Sample</div>;\n}\n\n// mount function will be trigger when mount micro module\nexport function mount(ModuleComponent, targetNode, props) {\n  ReactDOM.render(<ModuleComponent {...props} />, targetNode);\n}\n\n// unmount function will be trigger when unmount micro module\nexport function unmount(targetNode) {\n  ReactDOM.unmountComponentAtNode(targetNode);\n}\n\nexport default SampleComponent;\n```\n\n> pack module with module spec UMD\n\n## Usage\n\n### Basic Usage\n\n```jsx\nimport { MicroModule } from '@ice/stark-module';\n\nconst App = () => {\n  const moduleInfo = {\n    name: 'moduleName',\n    url: 'https://localhost/module.js',\n  }\n  return <MicroModule moduleInfo={moduleInfo} />;\n}\n```\n\n### Register Modules\n\n```jsx\nimport { MicroModule, registerModule, registerModules, getModules } from '@ice/stark-module';\n\n// register single module\nregisterModule({\n  url: 'https://localhost/module-a.js',\n  name: 'module-a',\n});\n\n// register multiple modules at once\nregisterModules([\n  {\n    url: 'https://localhost/module-b.js',\n    name: 'module-b',\n  },\n  {\n    url: 'https://localhost/module-c.js',\n    name: 'module-c',\n  },\n]);\n\n// get module info registered by API registerModules\nconst moduleInfo = getModules();\n\nconst App = () => {\n  // after registerMdoules, use micro module by specify module name\n  return (\n    <div>\n      <MicroModule moduleName=\"module-a\" />\n      <MicroModule moduleName=\"module-b\" />\n      <MicroModule moduleName=\"module-c\" />\n    </div>\n  );\n}\n```\n\n### Registration Merging\n\nIf more than one modules are registered with the same name, only the last one will be kept.\n\n```jsx\nimport { registerModule, registerModules, getModules } from '@ice/stark-module';\n\nregisterModules([\n  {\n    url: 'https://localhost/module-a.js',\n    name: 'module-a',\n  },\n  {\n    url: 'https://localhost/module-b.js',\n    name: 'module-a',\n  },\n]);\n\nconst modules = getModules();\n/** the modules will be:\n[{\n  url: 'https://localhost/module-b.js',\n  name: 'module-a',\n}]\n*/\n\nregisterModule({\n  url: 'https://localhost/module-c.js',\n  name: 'module-a',\n});\n\nconst modules = getModules();\n/** the modules will be:\n[{\n  url: 'https://localhost/module-c.js',\n  name: 'module-a',\n}]\n*/\n```\n\n### Clear Modules\n\n```js\nimport { registerModules, clearModules } from '@ice/stark-module';\n\nregisterModules([\n  {\n    url: 'https://localhost/module-a.js',\n    name: 'module-a',\n  },\n  {\n    url: 'https://localhost/module-b.js',\n    name: 'module-b',\n  },\n]);\n\n// clear all modules information and content cache.\nclearModules();\n```\n\n### Custom Lifecyle\n\n```jsx\nimport { MicroModule } from '@ice/stark-module';\n\nconst App = () => {\n  const moduleInfo = {\n    name: 'moduleName',\n    url: 'https://localhost/module.js',\n    mount: (ModuleComponent, mountNode) => {\n      console.log('custom mount');\n      ReactDOM.render(<ModuleComponent />, mountNode);\n    },\n  }\n  return <MicroModule moduleInfo={moduleInfo} />;\n}\n```\n\n### Custom mount component\n\n```jsx\nimport { mountModule, unmoutModule } from '@ice/stark-module';\n\nconst moduleInfo = {\n  name: 'moduleName',\n  url: 'https://localhost/module.js',\n};\n\nconst ModuleComponent = () => {\n  const renderNode = useRef(null);\n  useEffect(() => {\n    mountModule(moduleInfo, renderNode, {});\n    return () => {\n      unmoutModule(moduleInfo, renderNode);\n    }\n  }, []);\n  return (<div ref={renderNode}></div>);\n};\n```\n\n### Register Local Modules\n\nIn some scenarios, it is necessary to support the built-in components. In this case, one can use `render` property to render a local module.\n\n```jsx\nimport LocalComponent from './localComponent';\n\nregisterModules([{\n  name: 'moduleName',\n  render: () => LocalComponent,\n}]);\n\nconst App = () => {\n  return (\n    <div>\n      <MicroModule moduleName=\"moduleName\" />\n    </div>\n  );\n}\n```\n\n## Contributors\n\nFeel free to report any questions as an [issue](https://github.com/ice-lab/icestark/issues/new), we'd love to have your helping hand on `icestark`.\n\nIf you're interested in `icestark`, see [CONTRIBUTING.md](https://github.com/alibaba/ice/blob/master/.github/CONTRIBUTING.md) for more information to learn how to get started.\n\n## License\n\n[MIT](LICENSE)","scripts":{"lint":"pnpm eslint --ext .js,.jsx,.ts,.tsx ./","test":"NODE_ENV=unittest pnpm jest","build":"rm -rf lib && tsc","watch":"tsc -w","prepublishOnly":"pnpm run-s lint test build"},"_npmUser":{"name":"maoxiaoke","email":"thebigyellowbee@qq.com"},"repository":{"url":"git+https://github.com/ice-lab/icestark.git","type":"git"},"_npmVersion":"6.14.8","description":"toolkit for load standard micro-module","directories":{},"_nodeVersion":"14.15.0","dependencies":{"@ice/sandbox":"^1.1.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"react":"^16.13.1","react-dom":"^16.13.1","typescript":"^3.8.3"},"peerDependencies":{"react":">=15.0.0","react-dom":">=15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/stark-module_1.5.1-1_1641368073849_0.23713946138271225","host":"s3://npm-registry-packages"}},"1.5.1-2":{"name":"@ice/stark-module","version":"1.5.1-2","keywords":["modules","icestark"],"author":"","license":"MIT","_id":"@ice/stark-module@1.5.1-2","maintainers":[{"name":"luhengchang228","email":"luhengchang228@126.com"},{"name":"sobear","email":"sobear.me@gmail.com"},{"name":"clarkxia","email":"xiawenwu41@gmail.com"},{"name":"yuanyan","email":"yuanyan.cao@gmail.com"},{"name":"rax-publisher","email":"rax-public@alibaba-inc.com"},{"name":"solojiang","email":"feifeishen1996@gmail.com"},{"name":"chenbin93","email":"chenbinad@gmail.com"},{"name":"maoxiaoke","email":"thebigyellowbee@qq.com"}],"homepage":"https://github.com/ice-lab/icestark#readme","bugs":{"url":"https://github.com/ice-lab/icestark/issues"},"dist":{"shasum":"89e8f089365560b6ff5dca1df0efb09f1cf4957a","tarball":"https://registry.npmjs.org/@ice/stark-module/-/stark-module-1.5.1-2.tgz","fileCount":19,"integrity":"sha512-OP26M3Trf5yAx9R1EwtHVrkte/zS5UdcYG1VfHeMILOzlVoRZA27zuuLg/v+Ntvl4952AaiqQ04RYuya+3sqyw==","signatures":[{"sig":"MEYCIQCKNSLYG7Q9R/eafZCnSiKQKUe7K9LFGCyiKVTJOqiZiwIhANCKMKuJlcSl2PyzrBS8xCqKt/mFCM7mXcskVerQNFLn","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":53377,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh6nPWCRA9TVsSAnZWagAAOcQP/j5ieQwS6T5fFXO8hanh\nSnkiD6XDTgtFA22pRUlPSk/xB6DL91A03oULC7Oel8QJoJQmfjrNw9K1OJy+\nw9oqmhyxWQfPuQpUqaxc9dMSojAyJ6gCHrWHwmJEIVKa7J+EVTV2INWR6Vbf\npFG9bA//s4Q77NsKQ4Edyz4c5qvnFb+eOWhZciOhwVo8EFhBGd78mu57Hvnp\na4rzGEdMlVCd6H5GenB2zqltPjLtyE97QFMXKP0+VJs1qnCLrO2tluVgNaA+\ngyuS3oiABmnsZEoJ4iUAqVcd5H8O1TtJApjLGYM9G6BFYU3NTZSJTNXPzrEj\nM8GkyL/YzCB2PbK3RlTZqpqNYTUKsAPYCjU85vnCvpYKG8UreOoLWNYqmIVv\n0a+e3KHhTb7ckhHIACc1TdRicbBFwy8H/6i1/u9APLDM7BEGy+mnew7OmYBW\nQVnXwUFptwmp7fzt8jZ8KBq0tqmULnaXXlK+LMqxc0l9og2WIj5qQ9I99zZp\nGAd/PEOJLRhb2KZmg/I/gFdbTDdiPAfL7hQOiry+TD8ppbAZkkEa1jlvPyCM\ngOfrKKEI5ZyL20+wNT53LjaIkqaRiXpw6yzrFMflZ9C1f53qF9Adec5AdWb7\ng2exBptV7V0qzymgDVVu7u+oShqMfCpESgm1F80rvD4UZYJBbqb4FMmE30r4\nafTD\r\n=RLSl\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"preset":"ts-jest","automock":false,"testMatch":["**/__tests__/**/*.ts?(x)","**/?(*.)+(spec|test).ts?(x)"],"setupFiles":["../../setupJest.ts"],"collectCoverage":true,"coverageDirectory":"./coverage/"},"main":"lib/index.js","readme":"# @ice/stark-module\n\n[![NPM version](https://img.shields.io/npm/v/@ice/stark-module.svg?style=flat)](https://npmjs.org/package/@ice/stark-module) [![Package Quality](https://npm.packagequality.com/shield/@ice%2Fstark-module.svg)](https://packagequality.com/#?package=@ice%2Fstark-module) [![build status](https://img.shields.io/travis/ice-lab/icestark.svg?style=flat-square)](https://travis-ci.org/ice-lab/icestark) [![Test coverage](https://img.shields.io/codecov/c/github/ice-lab/icestark.svg?style=flat-square)](https://codecov.io/gh/ice-lab/icestark) [![NPM downloads](http://img.shields.io/npm/dm/@ice/stark-module.svg?style=flat)](https://npmjs.org/package/@ice/stark-module) [![David deps](https://img.shields.io/david/ice-lab/icestark.svg?style=flat-square)](https://david-dm.org/ice-lab/icestark)\n\n## Installation\n\n```bash\n$ npm install @ice/stark-module --save\n```\n\n## Module LifeCycle\n\nspecify module lifeCycle when pack code as a micro module\n\n```js\nconst SampleComponent = () => {\n  return <div>Sample</div>;\n}\n\n// mount function will be trigger when mount micro module\nexport function mount(ModuleComponent, targetNode, props) {\n  ReactDOM.render(<ModuleComponent {...props} />, targetNode);\n}\n\n// unmount function will be trigger when unmount micro module\nexport function unmount(targetNode) {\n  ReactDOM.unmountComponentAtNode(targetNode);\n}\n\nexport default SampleComponent;\n```\n\n> pack module with module spec UMD\n\n## Usage\n\n### Basic Usage\n\n```jsx\nimport { MicroModule } from '@ice/stark-module';\n\nconst App = () => {\n  const moduleInfo = {\n    name: 'moduleName',\n    url: 'https://localhost/module.js',\n  }\n  return <MicroModule moduleInfo={moduleInfo} />;\n}\n```\n\n### Register Modules\n\n```jsx\nimport { MicroModule, registerModule, registerModules, getModules } from '@ice/stark-module';\n\n// register single module\nregisterModule({\n  url: 'https://localhost/module-a.js',\n  name: 'module-a',\n});\n\n// register multiple modules at once\nregisterModules([\n  {\n    url: 'https://localhost/module-b.js',\n    name: 'module-b',\n  },\n  {\n    url: 'https://localhost/module-c.js',\n    name: 'module-c',\n  },\n]);\n\n// get module info registered by API registerModules\nconst moduleInfo = getModules();\n\nconst App = () => {\n  // after registerMdoules, use micro module by specify module name\n  return (\n    <div>\n      <MicroModule moduleName=\"module-a\" />\n      <MicroModule moduleName=\"module-b\" />\n      <MicroModule moduleName=\"module-c\" />\n    </div>\n  );\n}\n```\n\n### Registration Merging\n\nIf more than one modules are registered with the same name, only the last one will be kept.\n\n```jsx\nimport { registerModule, registerModules, getModules } from '@ice/stark-module';\n\nregisterModules([\n  {\n    url: 'https://localhost/module-a.js',\n    name: 'module-a',\n  },\n  {\n    url: 'https://localhost/module-b.js',\n    name: 'module-a',\n  },\n]);\n\nconst modules = getModules();\n/** the modules will be:\n[{\n  url: 'https://localhost/module-b.js',\n  name: 'module-a',\n}]\n*/\n\nregisterModule({\n  url: 'https://localhost/module-c.js',\n  name: 'module-a',\n});\n\nconst modules = getModules();\n/** the modules will be:\n[{\n  url: 'https://localhost/module-c.js',\n  name: 'module-a',\n}]\n*/\n```\n\n### Clear Modules\n\n```js\nimport { registerModules, clearModules } from '@ice/stark-module';\n\nregisterModules([\n  {\n    url: 'https://localhost/module-a.js',\n    name: 'module-a',\n  },\n  {\n    url: 'https://localhost/module-b.js',\n    name: 'module-b',\n  },\n]);\n\n// clear all modules information and content cache.\nclearModules();\n```\n\n### Custom Lifecyle\n\n```jsx\nimport { MicroModule } from '@ice/stark-module';\n\nconst App = () => {\n  const moduleInfo = {\n    name: 'moduleName',\n    url: 'https://localhost/module.js',\n    mount: (ModuleComponent, mountNode) => {\n      console.log('custom mount');\n      ReactDOM.render(<ModuleComponent />, mountNode);\n    },\n  }\n  return <MicroModule moduleInfo={moduleInfo} />;\n}\n```\n\n### Custom mount component\n\n```jsx\nimport { mountModule, unmoutModule } from '@ice/stark-module';\n\nconst moduleInfo = {\n  name: 'moduleName',\n  url: 'https://localhost/module.js',\n};\n\nconst ModuleComponent = () => {\n  const renderNode = useRef(null);\n  useEffect(() => {\n    mountModule(moduleInfo, renderNode, {});\n    return () => {\n      unmoutModule(moduleInfo, renderNode);\n    }\n  }, []);\n  return (<div ref={renderNode}></div>);\n};\n```\n\n### Register Local Modules\n\nIn some scenarios, it is necessary to support the built-in components. In this case, one can use `render` property to render a local module.\n\n```jsx\nimport LocalComponent from './localComponent';\n\nregisterModules([{\n  name: 'moduleName',\n  render: () => LocalComponent,\n}]);\n\nconst App = () => {\n  return (\n    <div>\n      <MicroModule moduleName=\"moduleName\" />\n    </div>\n  );\n}\n```\n\n## Contributors\n\nFeel free to report any questions as an [issue](https://github.com/ice-lab/icestark/issues/new), we'd love to have your helping hand on `icestark`.\n\nIf you're interested in `icestark`, see [CONTRIBUTING.md](https://github.com/alibaba/ice/blob/master/.github/CONTRIBUTING.md) for more information to learn how to get started.\n\n## License\n\n[MIT](LICENSE)","scripts":{"lint":"pnpm eslint --ext .js,.jsx,.ts,.tsx ./","test":"NODE_ENV=unittest pnpm jest","build":"rm -rf lib && tsc","watch":"tsc -w","prepublishOnly":"pnpm run-s lint test build"},"_npmUser":{"name":"maoxiaoke","email":"thebigyellowbee@qq.com"},"repository":{"url":"git+https://github.com/ice-lab/icestark.git","type":"git"},"_npmVersion":"6.14.8","description":"toolkit for load standard micro-module","directories":{},"_nodeVersion":"14.15.0","dependencies":{"@ice/sandbox":"^1.1.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"react":"^16.13.1","react-dom":"^16.13.1","typescript":"^3.8.3"},"peerDependencies":{"react":">=15.0.0","react-dom":">=15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/stark-module_1.5.1-2_1642755030219_0.2291402485770695","host":"s3://npm-registry-packages"}},"1.5.1-3":{"name":"@ice/stark-module","version":"1.5.1-3","keywords":["modules","icestark"],"author":"","license":"MIT","_id":"@ice/stark-module@1.5.1-3","maintainers":[{"name":"luhengchang228","email":"luhengchang228@126.com"},{"name":"sobear","email":"sobear.me@gmail.com"},{"name":"clarkxia","email":"xiawenwu41@gmail.com"},{"name":"yuanyan","email":"yuanyan.cao@gmail.com"},{"name":"rax-publisher","email":"rax-public@alibaba-inc.com"},{"name":"solojiang","email":"feifeishen1996@gmail.com"},{"name":"chenbin93","email":"chenbinad@gmail.com"},{"name":"maoxiaoke","email":"thebigyellowbee@qq.com"}],"homepage":"https://github.com/ice-lab/icestark#readme","bugs":{"url":"https://github.com/ice-lab/icestark/issues"},"dist":{"shasum":"fc690d62e10f52c3e268c45f1ea6fc8f11d5aa0e","tarball":"https://registry.npmjs.org/@ice/stark-module/-/stark-module-1.5.1-3.tgz","fileCount":23,"integrity":"sha512-Gfk0gfQpHMdCR0hTNS+7ydUvFuXyEtxZG/6OdadgYXyAKA4utUOdYCGfpzIocl4Yzoj5H6H3FXlVujdP9/fCoA==","signatures":[{"sig":"MEYCIQDUa0TLU7Mqj6kaUDVpCzeAqrPpaZTA6p514IhUU+TqRQIhAPVuXJFN9TA2jngo9IsqlhLItN6Fe7nQ+hPLmIYK6sVz","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":58286,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiEzMyACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrwHxAAmBbr/w1h49StmExQfGm8ZH08yIMTHaB9RhadqJKjE8MRtXxZ\r\nUpga+4Gn2Uh02nYpTXoNB2sK32pcsyY1pDD0F/jD9WRE4dzs2AQ6TdvHQdh2\r\nZPXiGT2j2IcONBM/iHfF7qCZEZQ10ysIzgVdS/+SX9vuhFhz/9O/1Es6FqJS\r\ndygY1TR59hMk1XW4mSV98stJTLvEvgaALgSm30Tu5HU70pikeX0GMjZ29ZpG\r\nlOdDcb7Y92la/y/dltb5QMg2PgeC6eed8ENmRRLkgh/WmYmdAFmQIx0wEigP\r\n+Kx4Z4NtI5nSEu+iJgZgpp+DNHZXUWMmx4IaAB1Gldj8ErqxT4ahOT51iSga\r\nUueW6kmCC3kZmoFnqHfbI6U254GSjHFTCnOv9eDT++MQl2/PFzob0/4etW6h\r\ny6pidT9btAZjiUU2jE79jqnsMNOpeB58kHjRKK+wxHjmFKP3/xNJy+G58OI2\r\nqX/jrxO5Jj6Y1k7svsU+dq6tchScLF2jjlgbnR9MEnRFzuzUmOHxnisk6Yu4\r\nVtp4/GzPcab/1oLwUZcSJSvKVStvaQL2fHws+9c55GFdS+eMy5x8iWgcdMns\r\n7Phgel/LuiCar0qOVnAX5VvNAoXSOLVkY7iZBvdTu98/jJOW8tbsyObVTNtK\r\nlhzn2hGIKGf10VPiFotoQl1Lom2o1LE6Nyk=\r\n=zkdC\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"preset":"ts-jest","automock":false,"testMatch":["**/__tests__/**/*.ts?(x)","**/?(*.)+(spec|test).ts?(x)"],"setupFiles":["../../setupJest.ts"],"collectCoverage":true,"coverageDirectory":"./coverage/"},"main":"lib/index.js","readme":"# @ice/stark-module\n\n[![NPM version](https://img.shields.io/npm/v/@ice/stark-module.svg?style=flat)](https://npmjs.org/package/@ice/stark-module) [![Package Quality](https://npm.packagequality.com/shield/@ice%2Fstark-module.svg)](https://packagequality.com/#?package=@ice%2Fstark-module) [![build status](https://img.shields.io/travis/ice-lab/icestark.svg?style=flat-square)](https://travis-ci.org/ice-lab/icestark) [![Test coverage](https://img.shields.io/codecov/c/github/ice-lab/icestark.svg?style=flat-square)](https://codecov.io/gh/ice-lab/icestark) [![NPM downloads](http://img.shields.io/npm/dm/@ice/stark-module.svg?style=flat)](https://npmjs.org/package/@ice/stark-module) [![David deps](https://img.shields.io/david/ice-lab/icestark.svg?style=flat-square)](https://david-dm.org/ice-lab/icestark)\n\n## Installation\n\n```bash\n$ npm install @ice/stark-module --save\n```\n\n## Module LifeCycle\n\nspecify module lifeCycle when pack code as a micro module\n\n```js\nconst SampleComponent = () => {\n  return <div>Sample</div>;\n}\n\n// mount function will be trigger when mount micro module\nexport function mount(ModuleComponent, targetNode, props) {\n  ReactDOM.render(<ModuleComponent {...props} />, targetNode);\n}\n\n// unmount function will be trigger when unmount micro module\nexport function unmount(targetNode) {\n  ReactDOM.unmountComponentAtNode(targetNode);\n}\n\nexport default SampleComponent;\n```\n\n> pack module with module spec UMD\n\n## Usage\n\n### Basic Usage\n\n```jsx\nimport { MicroModule } from '@ice/stark-module';\n\nconst App = () => {\n  const moduleInfo = {\n    name: 'moduleName',\n    url: 'https://localhost/module.js',\n  }\n  return <MicroModule moduleInfo={moduleInfo} />;\n}\n```\n\n### Register Modules\n\n```jsx\nimport { MicroModule, registerModule, registerModules, getModules } from '@ice/stark-module';\n\n// register single module\nregisterModule({\n  url: 'https://localhost/module-a.js',\n  name: 'module-a',\n});\n\n// register multiple modules at once\nregisterModules([\n  {\n    url: 'https://localhost/module-b.js',\n    name: 'module-b',\n  },\n  {\n    url: 'https://localhost/module-c.js',\n    name: 'module-c',\n  },\n]);\n\n// get module info registered by API registerModules\nconst moduleInfo = getModules();\n\nconst App = () => {\n  // after registerMdoules, use micro module by specify module name\n  return (\n    <div>\n      <MicroModule moduleName=\"module-a\" />\n      <MicroModule moduleName=\"module-b\" />\n      <MicroModule moduleName=\"module-c\" />\n    </div>\n  );\n}\n```\n\n### Registration Merging\n\nIf more than one modules are registered with the same name, only the last one will be kept.\n\n```jsx\nimport { registerModule, registerModules, getModules } from '@ice/stark-module';\n\nregisterModules([\n  {\n    url: 'https://localhost/module-a.js',\n    name: 'module-a',\n  },\n  {\n    url: 'https://localhost/module-b.js',\n    name: 'module-a',\n  },\n]);\n\nconst modules = getModules();\n/** the modules will be:\n[{\n  url: 'https://localhost/module-b.js',\n  name: 'module-a',\n}]\n*/\n\nregisterModule({\n  url: 'https://localhost/module-c.js',\n  name: 'module-a',\n});\n\nconst modules = getModules();\n/** the modules will be:\n[{\n  url: 'https://localhost/module-c.js',\n  name: 'module-a',\n}]\n*/\n```\n\n### Clear Modules\n\n```js\nimport { registerModules, clearModules } from '@ice/stark-module';\n\nregisterModules([\n  {\n    url: 'https://localhost/module-a.js',\n    name: 'module-a',\n  },\n  {\n    url: 'https://localhost/module-b.js',\n    name: 'module-b',\n  },\n]);\n\n// clear all modules information and content cache.\nclearModules();\n```\n\n### Custom Lifecyle\n\n```jsx\nimport { MicroModule } from '@ice/stark-module';\n\nconst App = () => {\n  const moduleInfo = {\n    name: 'moduleName',\n    url: 'https://localhost/module.js',\n    mount: (ModuleComponent, mountNode) => {\n      console.log('custom mount');\n      ReactDOM.render(<ModuleComponent />, mountNode);\n    },\n  }\n  return <MicroModule moduleInfo={moduleInfo} />;\n}\n```\n\n### Custom mount component\n\n```jsx\nimport { mountModule, unmoutModule } from '@ice/stark-module';\n\nconst moduleInfo = {\n  name: 'moduleName',\n  url: 'https://localhost/module.js',\n};\n\nconst ModuleComponent = () => {\n  const renderNode = useRef(null);\n  useEffect(() => {\n    mountModule(moduleInfo, renderNode, {});\n    return () => {\n      unmoutModule(moduleInfo, renderNode);\n    }\n  }, []);\n  return (<div ref={renderNode}></div>);\n};\n```\n\n### Register Local Modules\n\nIn some scenarios, it is necessary to support the built-in components. In this case, one can use `render` property to render a local module.\n\n```jsx\nimport LocalComponent from './localComponent';\n\nregisterModules([{\n  name: 'moduleName',\n  render: () => LocalComponent,\n}]);\n\nconst App = () => {\n  return (\n    <div>\n      <MicroModule moduleName=\"moduleName\" />\n    </div>\n  );\n}\n```\n\n## Contributors\n\nFeel free to report any questions as an [issue](https://github.com/ice-lab/icestark/issues/new), we'd love to have your helping hand on `icestark`.\n\nIf you're interested in `icestark`, see [CONTRIBUTING.md](https://github.com/alibaba/ice/blob/master/.github/CONTRIBUTING.md) for more information to learn how to get started.\n\n## License\n\n[MIT](LICENSE)","scripts":{"lint":"pnpm eslint --ext .js,.jsx,.ts,.tsx ./","test":"NODE_ENV=unittest pnpm jest","build":"rm -rf lib && tsc","watch":"tsc -w","prepublishOnly":"pnpm run-s lint test build"},"_npmUser":{"name":"maoxiaoke","email":"thebigyellowbee@qq.com"},"repository":{"url":"git+https://github.com/ice-lab/icestark.git","type":"git"},"_npmVersion":"6.14.13","description":"toolkit for load standard micro-module","directories":{},"_nodeVersion":"14.17.0","dependencies":{"@ice/sandbox":"^1.1.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"react":"^16.13.1","react-dom":"^16.13.1","typescript":"^3.8.3"},"peerDependencies":{"react":">=15.0.0","react-dom":">=15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/stark-module_1.5.1-3_1645425457845_0.5806052690010546","host":"s3://npm-registry-packages"}},"1.5.1-4":{"name":"@ice/stark-module","version":"1.5.1-4","keywords":["modules","icestark"],"author":"","license":"MIT","_id":"@ice/stark-module@1.5.1-4","maintainers":[{"name":"luhengchang228","email":"luhengchang228@126.com"},{"name":"sobear","email":"sobear.me@gmail.com"},{"name":"clarkxia","email":"xiawenwu41@gmail.com"},{"name":"yuanyan","email":"yuanyan.cao@gmail.com"},{"name":"rax-publisher","email":"rax-public@alibaba-inc.com"},{"name":"solojiang","email":"feifeishen1996@gmail.com"},{"name":"chenbin93","email":"chenbinad@gmail.com"},{"name":"maoxiaoke","email":"thebigyellowbee@qq.com"}],"homepage":"https://github.com/ice-lab/icestark#readme","bugs":{"url":"https://github.com/ice-lab/icestark/issues"},"dist":{"shasum":"901e1674346618afd7d22ff7c47d1b2a48d4b30d","tarball":"https://registry.npmjs.org/@ice/stark-module/-/stark-module-1.5.1-4.tgz","fileCount":23,"integrity":"sha512-2mAw0aaIO6J/STTv0Q8KU1emBe/yeMv1ddW0nkIxgtW9qHnByUK1yU28hgQhcs5HlnsctMZ62CSS6sPkmlkceg==","signatures":[{"sig":"MEYCIQCe6pVj0EqqUWR646l1igkrOSh+H7j1b3SIi3dMeykyjAIhAKZuaSMp/sHg/Z+ectpsx3X/lM2logq/LLSESMDLz6if","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":58351,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiMsorACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmpdeg/6AoMzKV23sVHY59U/LubZcxyVe21cYu82zYbO0hFI44hmS4/I\r\n28madcsmBHzOFnpM5pcS3AEAUzyRaBszZbx6dlh2fOy8NcJc9mB2ORUBiT4o\r\n3os743TEQh357Oh6QlDOX+egoRGTHY7Jw7CB1oZrqCI2/p0VWBD2ptvfYcCF\r\nsff/5CTtlpkJlwGPvWbciG3Ykk8pzXRKLGCAEVg/nVK2YGzB0rN4hYQ544hh\r\nAie6OXR/sC5qfWEomFkF9H854dqsGCL+eoC3p5jp5z98+gcTZ3Cfgc+/fTNS\r\njP8L9WftZGMCL4sRe5pD6FGD1vccSiyhun8seFSkhPGiV1PtD5VfF/06j04O\r\nYgbaU1LdCnRQwte6Ssmu9BmEWdUn6l5nwteODJsZG2PaRFThstrCbxNroAcQ\r\norR31Fm69olpFAexpJJx6Tm6i2hgj5XlJnpkuxm+6LAbQCwQCA77nVZW6BQi\r\nDEdgeiyhiECe4+44+gjojqi9ZV+kN6eZkhNGvJpUXAG7ejZ4VXpDy/JBSmse\r\n5CvDBOiTFk3VmR3ue7QTSC7nxYiXPajct+Jg0aFuDJjSNaO8CXHdM+Gn94eh\r\nh/3+U6tG9YRWh4qW32Yu9aUxhi2M5gvqmxoXzXIL546x8iZpllIuI9FB/4e4\r\nGWa7r3L/CWJdnXXoWMutPUMqEWlxKPNS9tk=\r\n=YyjB\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"preset":"ts-jest","automock":false,"testMatch":["**/__tests__/**/*.ts?(x)","**/?(*.)+(spec|test).ts?(x)"],"setupFiles":["../../setupJest.ts"],"collectCoverage":true,"coverageDirectory":"./coverage/"},"main":"lib/index.js","readme":"# @ice/stark-module\n\n[![NPM version](https://img.shields.io/npm/v/@ice/stark-module.svg?style=flat)](https://npmjs.org/package/@ice/stark-module) [![Package Quality](https://npm.packagequality.com/shield/@ice%2Fstark-module.svg)](https://packagequality.com/#?package=@ice%2Fstark-module) [![build status](https://img.shields.io/travis/ice-lab/icestark.svg?style=flat-square)](https://travis-ci.org/ice-lab/icestark) [![Test coverage](https://img.shields.io/codecov/c/github/ice-lab/icestark.svg?style=flat-square)](https://codecov.io/gh/ice-lab/icestark) [![NPM downloads](http://img.shields.io/npm/dm/@ice/stark-module.svg?style=flat)](https://npmjs.org/package/@ice/stark-module) [![David deps](https://img.shields.io/david/ice-lab/icestark.svg?style=flat-square)](https://david-dm.org/ice-lab/icestark)\n\n## Installation\n\n```bash\n$ npm install @ice/stark-module --save\n```\n\n## Module LifeCycle\n\nspecify module lifeCycle when pack code as a micro module\n\n```js\nconst SampleComponent = () => {\n  return <div>Sample</div>;\n}\n\n// mount function will be trigger when mount micro module\nexport function mount(ModuleComponent, targetNode, props) {\n  ReactDOM.render(<ModuleComponent {...props} />, targetNode);\n}\n\n// unmount function will be trigger when unmount micro module\nexport function unmount(targetNode) {\n  ReactDOM.unmountComponentAtNode(targetNode);\n}\n\nexport default SampleComponent;\n```\n\n> pack module with module spec UMD\n\n## Usage\n\n### Basic Usage\n\n```jsx\nimport { MicroModule } from '@ice/stark-module';\n\nconst App = () => {\n  const moduleInfo = {\n    name: 'moduleName',\n    url: 'https://localhost/module.js',\n  }\n  return <MicroModule moduleInfo={moduleInfo} />;\n}\n```\n\n### Register Modules\n\n```jsx\nimport { MicroModule, registerModule, registerModules, getModules } from '@ice/stark-module';\n\n// register single module\nregisterModule({\n  url: 'https://localhost/module-a.js',\n  name: 'module-a',\n});\n\n// register multiple modules at once\nregisterModules([\n  {\n    url: 'https://localhost/module-b.js',\n    name: 'module-b',\n  },\n  {\n    url: 'https://localhost/module-c.js',\n    name: 'module-c',\n  },\n]);\n\n// get module info registered by API registerModules\nconst moduleInfo = getModules();\n\nconst App = () => {\n  // after registerMdoules, use micro module by specify module name\n  return (\n    <div>\n      <MicroModule moduleName=\"module-a\" />\n      <MicroModule moduleName=\"module-b\" />\n      <MicroModule moduleName=\"module-c\" />\n    </div>\n  );\n}\n```\n\n### Registration Merging\n\nIf more than one modules are registered with the same name, only the last one will be kept.\n\n```jsx\nimport { registerModule, registerModules, getModules } from '@ice/stark-module';\n\nregisterModules([\n  {\n    url: 'https://localhost/module-a.js',\n    name: 'module-a',\n  },\n  {\n    url: 'https://localhost/module-b.js',\n    name: 'module-a',\n  },\n]);\n\nconst modules = getModules();\n/** the modules will be:\n[{\n  url: 'https://localhost/module-b.js',\n  name: 'module-a',\n}]\n*/\n\nregisterModule({\n  url: 'https://localhost/module-c.js',\n  name: 'module-a',\n});\n\nconst modules = getModules();\n/** the modules will be:\n[{\n  url: 'https://localhost/module-c.js',\n  name: 'module-a',\n}]\n*/\n```\n\n### Clear Modules\n\n```js\nimport { registerModules, clearModules } from '@ice/stark-module';\n\nregisterModules([\n  {\n    url: 'https://localhost/module-a.js',\n    name: 'module-a',\n  },\n  {\n    url: 'https://localhost/module-b.js',\n    name: 'module-b',\n  },\n]);\n\n// clear all modules information and content cache.\nclearModules();\n```\n\n### Custom Lifecyle\n\n```jsx\nimport { MicroModule } from '@ice/stark-module';\n\nconst App = () => {\n  const moduleInfo = {\n    name: 'moduleName',\n    url: 'https://localhost/module.js',\n    mount: (ModuleComponent, mountNode) => {\n      console.log('custom mount');\n      ReactDOM.render(<ModuleComponent />, mountNode);\n    },\n  }\n  return <MicroModule moduleInfo={moduleInfo} />;\n}\n```\n\n### Custom mount component\n\n```jsx\nimport { mountModule, unmoutModule } from '@ice/stark-module';\n\nconst moduleInfo = {\n  name: 'moduleName',\n  url: 'https://localhost/module.js',\n};\n\nconst ModuleComponent = () => {\n  const renderNode = useRef(null);\n  useEffect(() => {\n    mountModule(moduleInfo, renderNode, {});\n    return () => {\n      unmoutModule(moduleInfo, renderNode);\n    }\n  }, []);\n  return (<div ref={renderNode}></div>);\n};\n```\n\n### Register Local Modules\n\nIn some scenarios, it is necessary to support the built-in components. In this case, one can use `render` property to render a local module.\n\n```jsx\nimport LocalComponent from './localComponent';\n\nregisterModules([{\n  name: 'moduleName',\n  render: () => LocalComponent,\n}]);\n\nconst App = () => {\n  return (\n    <div>\n      <MicroModule moduleName=\"moduleName\" />\n    </div>\n  );\n}\n```\n\n## Contributors\n\nFeel free to report any questions as an [issue](https://github.com/ice-lab/icestark/issues/new), we'd love to have your helping hand on `icestark`.\n\nIf you're interested in `icestark`, see [CONTRIBUTING.md](https://github.com/alibaba/ice/blob/master/.github/CONTRIBUTING.md) for more information to learn how to get started.\n\n## License\n\n[MIT](LICENSE)","scripts":{"lint":"pnpm eslint --ext .js,.jsx,.ts,.tsx ./","test":"NODE_ENV=unittest pnpm jest","build":"rm -rf lib && tsc","watch":"tsc -w","prepublishOnly":"pnpm run-s lint test build"},"_npmUser":{"name":"maoxiaoke","email":"thebigyellowbee@qq.com"},"repository":{"url":"git+https://github.com/ice-lab/icestark.git","type":"git"},"_npmVersion":"6.14.13","description":"toolkit for load standard micro-module","directories":{},"_nodeVersion":"14.17.0","dependencies":{"@ice/sandbox":"^1.1.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"react":"^16.13.1","react-dom":"^16.13.1","typescript":"^3.8.3"},"peerDependencies":{"react":">=15.0.0","react-dom":">=15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/stark-module_1.5.1-4_1647495723604_0.6154347444242885","host":"s3://npm-registry-packages"}},"1.5.1-5":{"name":"@ice/stark-module","version":"1.5.1-5","keywords":["modules","icestark"],"author":"","license":"MIT","_id":"@ice/stark-module@1.5.1-5","maintainers":[{"name":"luhengchang228","email":"luhengchang228@126.com"},{"name":"sobear","email":"sobear.me@gmail.com"},{"name":"clarkxia","email":"xiawenwu41@gmail.com"},{"name":"yuanyan","email":"yuanyan.cao@gmail.com"},{"name":"rax-publisher","email":"rax-public@alibaba-inc.com"},{"name":"solojiang","email":"feifeishen1996@gmail.com"},{"name":"chenbin93","email":"chenbinad@gmail.com"},{"name":"maoxiaoke","email":"thebigyellowbee@qq.com"}],"homepage":"https://github.com/ice-lab/icestark#readme","bugs":{"url":"https://github.com/ice-lab/icestark/issues"},"dist":{"shasum":"e49579df8424c04b126044a0e93aa2a5bfc1a0da","tarball":"https://registry.npmjs.org/@ice/stark-module/-/stark-module-1.5.1-5.tgz","fileCount":18,"integrity":"sha512-TgDbOHImz8FwzI0lS5oDVLdo8ti6X8KDVBLJ4frQaAzU7BAraEwQIj/xe0eniiALxSMO3rXAA24u4kPrxY+LOg==","signatures":[{"sig":"MEYCIQDilOjejyvgkaccrUIjrFT9LqJREWq3MNi7umCzY/EGEAIhAL25TuZoO+X9UcEOIs2kTJ4dKVa3ceU1MwEVHA+fBy79","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":52325,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJilYekACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo8Qg/8C5PDW3isUgQYvOwhEvGOTcsJvJxJXB4YBefZhOB9oFO3dU12\r\ngtFig8M+dQMQQLFsqCMTN7BhTex9KYUMyrjZVJfevFqFuSZE34WdweMmjemw\r\nYFqXbeeqTG8mxIzaQZ3AA3a87qf7c6UQrnvJ9mEQbyW50JpedHpWqGzyN1+t\r\n8u/MzleFrMC/zlGrgMR/Eac5lAn2r+zLG1v4K2rVRa7SJisACnU+Ajxmo0mD\r\n1iKDL1I0iq28a1Zn6ap7OLi0Gcp/qGtUkqwDkpS96zPAnvz8yDbZvdhPJ/5R\r\nM9HWy+3JX3/Yw3+31Dl8U3OBdxf8KwZM41CqKkBq1VFkO9U96wjLKvljZ+YB\r\nz/l82APHGMMZ0e9pEK8IoqTzVxOF4jaJnX/fHg2VZixGKCNe1kpw+rfICjP9\r\nhpyzPJwlQ6uMri6K3fUTUUtLTyXfA1pfMi0IbkEKm8Wg36Ftsz72Q3EQvmYE\r\niM6z/b+gwIiJg13GjeNB3HXyznHSSowp+2WoC/W8V5R7B7+J7ajpMzNNbd4+\r\n6QAV/6OrFVPbS76pU1jyaEqub/t0w1EDdrVSSonUJY9pLZtbuVo7r25T6ROC\r\n4fGjd2NGkAZYDPDbFjFm2C9SCKQOMX9g4o58aj7yExTWnEY14g9WrLbFUVr8\r\nADDxiF/YWRIiF7YTyU6ERcoEpusRtC9UnxA=\r\n=KiIR\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"preset":"ts-jest","automock":false,"testMatch":["**/__tests__/**/*.ts?(x)","**/?(*.)+(spec|test).ts?(x)"],"setupFiles":["../../setupJest.ts"],"collectCoverage":true,"coverageDirectory":"./coverage/"},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# @ice/stark-module\n\n[![NPM version](https://img.shields.io/npm/v/@ice/stark-module.svg?style=flat)](https://npmjs.org/package/@ice/stark-module) [![Package Quality](https://npm.packagequality.com/shield/@ice%2Fstark-module.svg)](https://packagequality.com/#?package=@ice%2Fstark-module) [![build status](https://img.shields.io/travis/ice-lab/icestark.svg?style=flat-square)](https://travis-ci.org/ice-lab/icestark) [![Test coverage](https://img.shields.io/codecov/c/github/ice-lab/icestark.svg?style=flat-square)](https://codecov.io/gh/ice-lab/icestark) [![NPM downloads](http://img.shields.io/npm/dm/@ice/stark-module.svg?style=flat)](https://npmjs.org/package/@ice/stark-module) [![David deps](https://img.shields.io/david/ice-lab/icestark.svg?style=flat-square)](https://david-dm.org/ice-lab/icestark)\n\n## Installation\n\n```bash\n$ npm install @ice/stark-module --save\n```\n\n## Module LifeCycle\n\nspecify module lifeCycle when pack code as a micro module\n\n```js\nconst SampleComponent = () => {\n  return <div>Sample</div>;\n}\n\n// mount function will be trigger when mount micro module\nexport function mount(ModuleComponent, targetNode, props) {\n  ReactDOM.render(<ModuleComponent {...props} />, targetNode);\n}\n\n// unmount function will be trigger when unmount micro module\nexport function unmount(targetNode) {\n  ReactDOM.unmountComponentAtNode(targetNode);\n}\n\nexport default SampleComponent;\n```\n\n> pack module with module spec UMD\n\n## Usage\n\n### Basic Usage\n\n```jsx\nimport { MicroModule } from '@ice/stark-module';\n\nconst App = () => {\n  const moduleInfo = {\n    name: 'moduleName',\n    url: 'https://localhost/module.js',\n  }\n  return <MicroModule moduleInfo={moduleInfo} />;\n}\n```\n\n### Register Modules\n\n```jsx\nimport { MicroModule, registerModule, registerModules, getModules } from '@ice/stark-module';\n\n// register single module\nregisterModule({\n  url: 'https://localhost/module-a.js',\n  name: 'module-a',\n});\n\n// register multiple modules at once\nregisterModules([\n  {\n    url: 'https://localhost/module-b.js',\n    name: 'module-b',\n  },\n  {\n    url: 'https://localhost/module-c.js',\n    name: 'module-c',\n  },\n]);\n\n// get module info registered by API registerModules\nconst moduleInfo = getModules();\n\nconst App = () => {\n  // after registerMdoules, use micro module by specify module name\n  return (\n    <div>\n      <MicroModule moduleName=\"module-a\" />\n      <MicroModule moduleName=\"module-b\" />\n      <MicroModule moduleName=\"module-c\" />\n    </div>\n  );\n}\n```\n\n### Registration Merging\n\nIf more than one modules are registered with the same name, only the last one will be kept.\n\n```jsx\nimport { registerModule, registerModules, getModules } from '@ice/stark-module';\n\nregisterModules([\n  {\n    url: 'https://localhost/module-a.js',\n    name: 'module-a',\n  },\n  {\n    url: 'https://localhost/module-b.js',\n    name: 'module-a',\n  },\n]);\n\nconst modules = getModules();\n/** the modules will be:\n[{\n  url: 'https://localhost/module-b.js',\n  name: 'module-a',\n}]\n*/\n\nregisterModule({\n  url: 'https://localhost/module-c.js',\n  name: 'module-a',\n});\n\nconst modules = getModules();\n/** the modules will be:\n[{\n  url: 'https://localhost/module-c.js',\n  name: 'module-a',\n}]\n*/\n```\n\n### Clear Modules\n\n```js\nimport { registerModules, clearModules } from '@ice/stark-module';\n\nregisterModules([\n  {\n    url: 'https://localhost/module-a.js',\n    name: 'module-a',\n  },\n  {\n    url: 'https://localhost/module-b.js',\n    name: 'module-b',\n  },\n]);\n\n// clear all modules information and content cache.\nclearModules();\n```\n\n### Custom Lifecyle\n\n```jsx\nimport { MicroModule } from '@ice/stark-module';\n\nconst App = () => {\n  const moduleInfo = {\n    name: 'moduleName',\n    url: 'https://localhost/module.js',\n    mount: (ModuleComponent, mountNode) => {\n      console.log('custom mount');\n      ReactDOM.render(<ModuleComponent />, mountNode);\n    },\n  }\n  return <MicroModule moduleInfo={moduleInfo} />;\n}\n```\n\n### Custom mount component\n\n```jsx\nimport { mountModule, unmoutModule } from '@ice/stark-module';\n\nconst moduleInfo = {\n  name: 'moduleName',\n  url: 'https://localhost/module.js',\n};\n\nconst ModuleComponent = () => {\n  const renderNode = useRef(null);\n  useEffect(() => {\n    mountModule(moduleInfo, renderNode, {});\n    return () => {\n      unmoutModule(moduleInfo, renderNode);\n    }\n  }, []);\n  return (<div ref={renderNode}></div>);\n};\n```\n\n### Register Local Modules\n\nIn some scenarios, it is necessary to support the built-in components. In this case, one can use `render` property to render a local module.\n\n```jsx\nimport LocalComponent from './localComponent';\n\nregisterModules([{\n  name: 'moduleName',\n  render: () => LocalComponent,\n}]);\n\nconst App = () => {\n  return (\n    <div>\n      <MicroModule moduleName=\"moduleName\" />\n    </div>\n  );\n}\n```\n\n## Contributors\n\nFeel free to report any questions as an [issue](https://github.com/ice-lab/icestark/issues/new), we'd love to have your helping hand on `icestark`.\n\nIf you're interested in `icestark`, see [CONTRIBUTING.md](https://github.com/alibaba/ice/blob/master/.github/CONTRIBUTING.md) for more information to learn how to get started.\n\n## License\n\n[MIT](LICENSE)","gitHead":"11ed4940a4346cd8fde9ea7d0cab67ac028924d9","scripts":{"lint":"pnpm eslint --ext .js,.jsx,.ts,.tsx ./","test":"NODE_ENV=unittest pnpm jest","build":"rm -rf lib && tsc","watch":"tsc -w","prepublishOnly":"pnpm run-s lint test build"},"_npmUser":{"name":"clarkxia","email":"xiawenwu41@gmail.com"},"repository":{"url":"git+https://github.com/ice-lab/icestark.git","type":"git"},"_npmVersion":"8.1.3","description":"toolkit for load standard micro-module","directories":{},"_nodeVersion":"14.19.1","dependencies":{"@ice/sandbox":"^1.1.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"react":"^16.13.1","react-dom":"^16.13.1","typescript":"^3.8.3"},"peerDependencies":{"react":">=15.0.0","react-dom":">=15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/stark-module_1.5.1-5_1653966756095_0.12041625381559573","host":"s3://npm-registry-packages"}},"1.6.0-1":{"name":"@ice/stark-module","version":"1.6.0-1","keywords":["modules","icestark"],"author":"","license":"MIT","_id":"@ice/stark-module@1.6.0-1","maintainers":[{"name":"answershuto","email":"answershuto@gmail.com"},{"name":"chenjun1011","email":"chenjun1011@gmail.com"},{"name":"luhengchang228","email":"luhengchang228@126.com"},{"name":"sobear","email":"sobear.me@gmail.com"},{"name":"clarkxia","email":"xiawenwu41@gmail.com"},{"name":"rax-publisher","email":"rax-public@alibaba-inc.com"}],"homepage":"https://github.com/ice-lab/icestark#readme","bugs":{"url":"https://github.com/ice-lab/icestark/issues"},"dist":{"shasum":"2d40fd1605a54cf9defe7c530d127ed45c753c84","tarball":"https://registry.npmjs.org/@ice/stark-module/-/stark-module-1.6.0-1.tgz","fileCount":18,"integrity":"sha512-piRs0Nyxw9yRYL4gyq15GUDGWwpuM2TI0TrgWDCF7scONPuxIX3fumN4aATAvKm9fHDbJpQrvqqquPpgq0tExg==","signatures":[{"sig":"MEUCIQDC8op1EOxA/ehHZLyADy5HjuFaaYy+1KGEfXyAIa8TBQIgGB6dxiP4rldEXuaCJk7eFxGz6KtRki56BoK+w/46lFY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":52920,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi18tqACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqwUg/5AB91FGgU76BmgOtAywE5Q4o8OFXjJ29ksQkcA16SnPaXsoys\r\nbHPpBJQQAsl1p3vliluSYJDf6KMm/j+8hcLUP6t24EmuItVoYSOi1uE8UxBO\r\nVt58ZAvX0NITJf3p3/Y6FpOJm6e2zEe0GnNdOtVmA2VZb6DJg4LuFYhgrktr\r\n0CzdS1e1Ddesdi4UjQcqGbfvvZzhv1J/at8Kwb4iivIdARS1N+v1xhoNamVy\r\n6GvuOxZ0CQ4MZe9CQCcZL1po4uGz8OmSVjubrci54sfnm8e9zCwgKFVPzFOU\r\n6yjGF8pbyDcCmMg7IlXjih+GnjscckFyYa1U4gI0l7lBIaRxyU7apQvYhxLc\r\nb9saT8ntgJj3q54F6DUPKdoQ2AGKxPk2bTGGOH4V1zqV96p2OsBEGX5MzEqd\r\njx0mEoYYaHlRqRSiiGut5SPsZNcA7XSUDMr/oBze3lZoJurSiV/mbUtFen8p\r\n0Ekyb0yGzHBBZTAEBRYDJkxki2+Gj5lM4luPUZ3q+GxRrTpmjShz8tw2Fr28\r\nm8ydDLrMm6ojpek47Y1LO9gMu0qiMF/XXMPtKE+oX8bjQa7YbkYF2PUgqLuK\r\ncbnz5oXJYg/Ft8XMGFdOeZiyC7G/0d4dGWdYhjmAx1Ok+OazRl7fa2OsDKWW\r\nVNbchAkrEuXAlRXEmFCSXawpkQWWFtz+iK0=\r\n=mMxW\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"preset":"ts-jest","automock":false,"testMatch":["**/__tests__/**/*.ts?(x)","**/?(*.)+(spec|test).ts?(x)"],"setupFiles":["../../setupJest.ts"],"collectCoverage":true,"coverageDirectory":"./coverage/"},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# @ice/stark-module\n\n[![NPM version](https://img.shields.io/npm/v/@ice/stark-module.svg?style=flat)](https://npmjs.org/package/@ice/stark-module) [![Package Quality](https://npm.packagequality.com/shield/@ice%2Fstark-module.svg)](https://packagequality.com/#?package=@ice%2Fstark-module) [![build status](https://img.shields.io/travis/ice-lab/icestark.svg?style=flat-square)](https://travis-ci.org/ice-lab/icestark) [![Test coverage](https://img.shields.io/codecov/c/github/ice-lab/icestark.svg?style=flat-square)](https://codecov.io/gh/ice-lab/icestark) [![NPM downloads](http://img.shields.io/npm/dm/@ice/stark-module.svg?style=flat)](https://npmjs.org/package/@ice/stark-module) [![David deps](https://img.shields.io/david/ice-lab/icestark.svg?style=flat-square)](https://david-dm.org/ice-lab/icestark)\n\n## Installation\n\n```bash\n$ npm install @ice/stark-module --save\n```\n\n## Module LifeCycle\n\nspecify module lifeCycle when pack code as a micro module\n\n```js\nconst SampleComponent = () => {\n  return <div>Sample</div>;\n}\n\n// mount function will be trigger when mount micro module\nexport function mount(ModuleComponent, targetNode, props) {\n  ReactDOM.render(<ModuleComponent {...props} />, targetNode);\n}\n\n// unmount function will be trigger when unmount micro module\nexport function unmount(targetNode) {\n  ReactDOM.unmountComponentAtNode(targetNode);\n}\n\nexport default SampleComponent;\n```\n\n> pack module with module spec UMD\n\n## Usage\n\n### Basic Usage\n\n```jsx\nimport { MicroModule } from '@ice/stark-module';\n\nconst App = () => {\n  const moduleInfo = {\n    name: 'moduleName',\n    url: 'https://localhost/module.js',\n  }\n  return <MicroModule moduleInfo={moduleInfo} />;\n}\n```\n\n### Register Modules\n\n```jsx\nimport { MicroModule, registerModule, registerModules, getModules } from '@ice/stark-module';\n\n// register single module\nregisterModule({\n  url: 'https://localhost/module-a.js',\n  name: 'module-a',\n});\n\n// register multiple modules at once\nregisterModules([\n  {\n    url: 'https://localhost/module-b.js',\n    name: 'module-b',\n  },\n  {\n    url: 'https://localhost/module-c.js',\n    name: 'module-c',\n  },\n]);\n\n// get module info registered by API registerModules\nconst moduleInfo = getModules();\n\nconst App = () => {\n  // after registerMdoules, use micro module by specify module name\n  return (\n    <div>\n      <MicroModule moduleName=\"module-a\" />\n      <MicroModule moduleName=\"module-b\" />\n      <MicroModule moduleName=\"module-c\" />\n    </div>\n  );\n}\n```\n\n### Registration Merging\n\nIf more than one modules are registered with the same name, only the last one will be kept.\n\n```jsx\nimport { registerModule, registerModules, getModules } from '@ice/stark-module';\n\nregisterModules([\n  {\n    url: 'https://localhost/module-a.js',\n    name: 'module-a',\n  },\n  {\n    url: 'https://localhost/module-b.js',\n    name: 'module-a',\n  },\n]);\n\nconst modules = getModules();\n/** the modules will be:\n[{\n  url: 'https://localhost/module-b.js',\n  name: 'module-a',\n}]\n*/\n\nregisterModule({\n  url: 'https://localhost/module-c.js',\n  name: 'module-a',\n});\n\nconst modules = getModules();\n/** the modules will be:\n[{\n  url: 'https://localhost/module-c.js',\n  name: 'module-a',\n}]\n*/\n```\n\n### Clear Modules\n\n```js\nimport { registerModules, clearModules } from '@ice/stark-module';\n\nregisterModules([\n  {\n    url: 'https://localhost/module-a.js',\n    name: 'module-a',\n  },\n  {\n    url: 'https://localhost/module-b.js',\n    name: 'module-b',\n  },\n]);\n\n// clear all modules information and content cache.\nclearModules();\n```\n\n### Custom Lifecyle\n\n```jsx\nimport { MicroModule } from '@ice/stark-module';\n\nconst App = () => {\n  const moduleInfo = {\n    name: 'moduleName',\n    url: 'https://localhost/module.js',\n    mount: (ModuleComponent, mountNode) => {\n      console.log('custom mount');\n      ReactDOM.render(<ModuleComponent />, mountNode);\n    },\n  }\n  return <MicroModule moduleInfo={moduleInfo} />;\n}\n```\n\n### Custom mount component\n\n```jsx\nimport { mountModule, unmoutModule } from '@ice/stark-module';\n\nconst moduleInfo = {\n  name: 'moduleName',\n  url: 'https://localhost/module.js',\n};\n\nconst ModuleComponent = () => {\n  const renderNode = useRef(null);\n  useEffect(() => {\n    mountModule(moduleInfo, renderNode, {});\n    return () => {\n      unmoutModule(moduleInfo, renderNode);\n    }\n  }, []);\n  return (<div ref={renderNode}></div>);\n};\n```\n\n### Register Local Modules\n\nIn some scenarios, it is necessary to support the built-in components. In this case, one can use `render` property to render a local module.\n\n```jsx\nimport LocalComponent from './localComponent';\n\nregisterModules([{\n  name: 'moduleName',\n  render: () => LocalComponent,\n}]);\n\nconst App = () => {\n  return (\n    <div>\n      <MicroModule moduleName=\"moduleName\" />\n    </div>\n  );\n}\n```\n\n## Contributors\n\nFeel free to report any questions as an [issue](https://github.com/ice-lab/icestark/issues/new), we'd love to have your helping hand on `icestark`.\n\nIf you're interested in `icestark`, see [CONTRIBUTING.md](https://github.com/alibaba/ice/blob/master/.github/CONTRIBUTING.md) for more information to learn how to get started.\n\n## License\n\n[MIT](LICENSE)","gitHead":"6690cdfab388e537cf372a1544e72b87ed9d8e68","scripts":{"lint":"pnpm eslint --ext .js,.jsx,.ts,.tsx ./","test":"NODE_ENV=unittest pnpm jest","build":"rm -rf lib && tsc","watch":"tsc -w"},"_npmUser":{"name":"clarkxia","email":"xiawenwu41@gmail.com"},"repository":{"url":"git+https://github.com/ice-lab/icestark.git","type":"git"},"_npmVersion":"8.1.3","description":"toolkit for load standard micro-module","directories":{},"_nodeVersion":"14.19.1","dependencies":{"@ice/sandbox":"^1.1.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"react":"^16.13.1","react-dom":"^16.13.1","typescript":"^3.8.3"},"peerDependencies":{"react":">=15.0.0","react-dom":">=15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/stark-module_1.6.0-1_1658309481875_0.4979667785266093","host":"s3://npm-registry-packages"}},"1.5.2-1":{"name":"@ice/stark-module","version":"1.5.2-1","keywords":["modules","icestark"],"author":"","license":"MIT","_id":"@ice/stark-module@1.5.2-1","maintainers":[{"name":"answershuto","email":"answershuto@gmail.com"},{"name":"chenjun1011","email":"chenjun1011@gmail.com"},{"name":"luhengchang228","email":"luhengchang228@126.com"},{"name":"sobear","email":"sobear.me@gmail.com"},{"name":"clarkxia","email":"xiawenwu41@gmail.com"},{"name":"rax-publisher","email":"rax-public@alibaba-inc.com"}],"homepage":"https://github.com/ice-lab/icestark#readme","bugs":{"url":"https://github.com/ice-lab/icestark/issues"},"dist":{"shasum":"3f716463cc0773e2a91581787ce6e2d4cde928d2","tarball":"https://registry.npmjs.org/@ice/stark-module/-/stark-module-1.5.2-1.tgz","fileCount":18,"integrity":"sha512-VKIIX+v5NEF8Q5lY+rfxt4CqYPxYitAewqilh2b+YzVZi4ngVS5pS1FfyrWAVJEQVuacouoEaVCWIF6XRpgV2A==","signatures":[{"sig":"MEQCIDhq0lCqzrkT8WJjt/ESj5kCruglD/B2B3OKHF0ki3NjAiABkrUn2BeqinVOCy0QiWT8EF/eLC7Iu+0IqfosOt3IdQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":52303,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjFXKiACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpRog/7BVDzvQAEMwalDzAH2/dQStUea0RVGHrKc4iHmMEAnlOKxbv+\r\n3Wu+6P9aFLEfbLHRaxcGSGfP8YZiXLrckq8pb+2vb4u18YuBeU4qSlcV83Xz\r\nYjZc0WA6uH2JsArp3SqsrPrZuREAF8LJ+0GUlxFmrjTQvgwC9jN9/wx2mgv2\r\nYcGRVABhx4i+igYGVOTxBBECuJjHw5C7yHixT+w6y7kIrrgJV0WejhUQSU8+\r\ngXMatdwbZ3xnENCODqi3zi+k7IUv9HW9YoXXfku+9J0OLkxZybRBU+3yYYwo\r\nzCdbsas49WMtjW3tB6O9kNtHxCtDfpdEOfoNKK61s1BJYahNSKB6S2+n/EtX\r\nKqRcE/Mtl2RUJE84UcqcHYBHW4iCSbHJrEcEaqmdeYR+sYQtD+bd8dcF0fLo\r\nQ4LcsMv6bpv9jcB7luI/dEgqFDpQnIZK6wRKF4AkkMzI8+WcY//sArvfXfr3\r\n6yOlm2KLoD0teIYUwP369xYgbJyx4Z9eX8a6Y+eM42nJvKUO9C8Bxh7mj/Cr\r\nqFXlbpJBYGAEYFsYWZTG2I1Oj88suDPZB4QS40Ocf18vd3Skroo1zWRuZRhn\r\nhM8OlGvI4yG5j2KeMuXElfQjK1HWCFQHrGY+WOj9qfgGDD5FZY2BCmUBAFRb\r\npzbv3XzQJ4bpO4rdaZu73W5sbVFJHlEVM0c=\r\n=OumZ\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"preset":"ts-jest","automock":false,"testMatch":["**/__tests__/**/*.ts?(x)","**/?(*.)+(spec|test).ts?(x)"],"setupFiles":["../../setupJest.ts"],"collectCoverage":true,"coverageDirectory":"./coverage/"},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# @ice/stark-module\n\n[![NPM version](https://img.shields.io/npm/v/@ice/stark-module.svg?style=flat)](https://npmjs.org/package/@ice/stark-module) [![Package Quality](https://npm.packagequality.com/shield/@ice%2Fstark-module.svg)](https://packagequality.com/#?package=@ice%2Fstark-module) [![build status](https://img.shields.io/travis/ice-lab/icestark.svg?style=flat-square)](https://travis-ci.org/ice-lab/icestark) [![Test coverage](https://img.shields.io/codecov/c/github/ice-lab/icestark.svg?style=flat-square)](https://codecov.io/gh/ice-lab/icestark) [![NPM downloads](http://img.shields.io/npm/dm/@ice/stark-module.svg?style=flat)](https://npmjs.org/package/@ice/stark-module) [![David deps](https://img.shields.io/david/ice-lab/icestark.svg?style=flat-square)](https://david-dm.org/ice-lab/icestark)\n\n## Installation\n\n```bash\n$ npm install @ice/stark-module --save\n```\n\n## Module LifeCycle\n\nspecify module lifeCycle when pack code as a micro module\n\n```js\nconst SampleComponent = () => {\n  return <div>Sample</div>;\n}\n\n// mount function will be trigger when mount micro module\nexport function mount(ModuleComponent, targetNode, props) {\n  ReactDOM.render(<ModuleComponent {...props} />, targetNode);\n}\n\n// unmount function will be trigger when unmount micro module\nexport function unmount(targetNode) {\n  ReactDOM.unmountComponentAtNode(targetNode);\n}\n\nexport default SampleComponent;\n```\n\n> pack module with module spec UMD\n\n## Usage\n\n### Basic Usage\n\n```jsx\nimport { MicroModule } from '@ice/stark-module';\n\nconst App = () => {\n  const moduleInfo = {\n    name: 'moduleName',\n    url: 'https://localhost/module.js',\n  }\n  return <MicroModule moduleInfo={moduleInfo} />;\n}\n```\n\n### Register Modules\n\n```jsx\nimport { MicroModule, registerModule, registerModules, getModules } from '@ice/stark-module';\n\n// register single module\nregisterModule({\n  url: 'https://localhost/module-a.js',\n  name: 'module-a',\n});\n\n// register multiple modules at once\nregisterModules([\n  {\n    url: 'https://localhost/module-b.js',\n    name: 'module-b',\n  },\n  {\n    url: 'https://localhost/module-c.js',\n    name: 'module-c',\n  },\n]);\n\n// get module info registered by API registerModules\nconst moduleInfo = getModules();\n\nconst App = () => {\n  // after registerMdoules, use micro module by specify module name\n  return (\n    <div>\n      <MicroModule moduleName=\"module-a\" />\n      <MicroModule moduleName=\"module-b\" />\n      <MicroModule moduleName=\"module-c\" />\n    </div>\n  );\n}\n```\n\n### Registration Merging\n\nIf more than one modules are registered with the same name, only the last one will be kept.\n\n```jsx\nimport { registerModule, registerModules, getModules } from '@ice/stark-module';\n\nregisterModules([\n  {\n    url: 'https://localhost/module-a.js',\n    name: 'module-a',\n  },\n  {\n    url: 'https://localhost/module-b.js',\n    name: 'module-a',\n  },\n]);\n\nconst modules = getModules();\n/** the modules will be:\n[{\n  url: 'https://localhost/module-b.js',\n  name: 'module-a',\n}]\n*/\n\nregisterModule({\n  url: 'https://localhost/module-c.js',\n  name: 'module-a',\n});\n\nconst modules = getModules();\n/** the modules will be:\n[{\n  url: 'https://localhost/module-c.js',\n  name: 'module-a',\n}]\n*/\n```\n\n### Clear Modules\n\n```js\nimport { registerModules, clearModules } from '@ice/stark-module';\n\nregisterModules([\n  {\n    url: 'https://localhost/module-a.js',\n    name: 'module-a',\n  },\n  {\n    url: 'https://localhost/module-b.js',\n    name: 'module-b',\n  },\n]);\n\n// clear all modules information and content cache.\nclearModules();\n```\n\n### Custom Lifecyle\n\n```jsx\nimport { MicroModule } from '@ice/stark-module';\n\nconst App = () => {\n  const moduleInfo = {\n    name: 'moduleName',\n    url: 'https://localhost/module.js',\n    mount: (ModuleComponent, mountNode) => {\n      console.log('custom mount');\n      ReactDOM.render(<ModuleComponent />, mountNode);\n    },\n  }\n  return <MicroModule moduleInfo={moduleInfo} />;\n}\n```\n\n### Custom mount component\n\n```jsx\nimport { mountModule, unmoutModule } from '@ice/stark-module';\n\nconst moduleInfo = {\n  name: 'moduleName',\n  url: 'https://localhost/module.js',\n};\n\nconst ModuleComponent = () => {\n  const renderNode = useRef(null);\n  useEffect(() => {\n    mountModule(moduleInfo, renderNode, {});\n    return () => {\n      unmoutModule(moduleInfo, renderNode);\n    }\n  }, []);\n  return (<div ref={renderNode}></div>);\n};\n```\n\n### Register Local Modules\n\nIn some scenarios, it is necessary to support the built-in components. In this case, one can use `render` property to render a local module.\n\n```jsx\nimport LocalComponent from './localComponent';\n\nregisterModules([{\n  name: 'moduleName',\n  render: () => LocalComponent,\n}]);\n\nconst App = () => {\n  return (\n    <div>\n      <MicroModule moduleName=\"moduleName\" />\n    </div>\n  );\n}\n```\n\n## Contributors\n\nFeel free to report any questions as an [issue](https://github.com/ice-lab/icestark/issues/new), we'd love to have your helping hand on `icestark`.\n\nIf you're interested in `icestark`, see [CONTRIBUTING.md](https://github.com/alibaba/ice/blob/master/.github/CONTRIBUTING.md) for more information to learn how to get started.\n\n## License\n\n[MIT](LICENSE)","gitHead":"bc7ecc2697ffa4b63a39010c87060c2a0ee7699f","scripts":{"lint":"pnpm eslint --ext .js,.jsx,.ts,.tsx ./","test":"NODE_ENV=unittest pnpm jest","build":"rm -rf lib && tsc","watch":"tsc -w","prepublishOnly":"pnpm run-s lint test build"},"_npmUser":{"name":"clarkxia","email":"xiawenwu41@gmail.com"},"repository":{"url":"git+https://github.com/ice-lab/icestark.git","type":"git"},"_npmVersion":"8.1.3","description":"toolkit for load standard micro-module","directories":{},"_nodeVersion":"14.20.0","dependencies":{"@ice/sandbox":"^1.1.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"react":"^16.13.1","react-dom":"^16.13.1","typescript":"^3.8.3"},"peerDependencies":{"react":">=15.0.0","react-dom":">=15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/stark-module_1.5.2-1_1662349986722_0.5769644500771605","host":"s3://npm-registry-packages"}},"1.6.0-2":{"name":"@ice/stark-module","version":"1.6.0-2","keywords":["modules","icestark"],"author":"","license":"MIT","_id":"@ice/stark-module@1.6.0-2","maintainers":[{"name":"answershuto","email":"answershuto@gmail.com"},{"name":"chenjun1011","email":"chenjun1011@gmail.com"},{"name":"luhengchang228","email":"luhengchang228@126.com"},{"name":"sobear","email":"sobear.me@gmail.com"},{"name":"clarkxia","email":"xiawenwu41@gmail.com"},{"name":"rax-publisher","email":"rax-public@alibaba-inc.com"}],"homepage":"https://github.com/ice-lab/icestark#readme","bugs":{"url":"https://github.com/ice-lab/icestark/issues"},"dist":{"shasum":"f27391814315fd724d519d21a6b158d85b069a88","tarball":"https://registry.npmjs.org/@ice/stark-module/-/stark-module-1.6.0-2.tgz","fileCount":22,"integrity":"sha512-1/J0bgmtdealE3j2SngdLpAeO8/ICEX7zNFXK4DJKg1P7U1MeSeEWfkQ3AFiexSb0JdlqLt9PlP/s4pbIwAYTw==","signatures":[{"sig":"MEYCIQDsYftKApQhyKyj0V4CBIhz0qW/yX12MFpY9sQyIVm2FQIhAI+gK4kIf4Ki6ns7uMZKQvwCp1bo+wEfdD1hxxBHOZYL","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":59233,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJju3uAACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpFLQ/+MYxADyPouNmwWqkSvMLNat1CbFSd4iRhFVC+5RNsduLlyGHR\r\n7/ivg6980AQciAtNXKDWDVINHbfmENu6HUNPoGV3OiYA5gdNkXj89XXjsAr8\r\n74xuun2/OGEqzKxUkC9KUAIPMGPIsm75vfR6LmC3bKqymfwHFuh5zYPI4bHn\r\n7wVdJ4zFw0IT4cP/zdvVuOSqSYz9zqnGvonY2ZfOnRhV3iilk76GGQMuXU/W\r\nawVep3R+XT2KDJ7qo15hF/tXy4UWSVOMwROG08GxEvSom/ZbJvhDViQ8b0c8\r\n9LzpuBDr2a6KmXBc8wzuMkplRlO6+uzYlZMV8iIj9SIat/YXlA9qwsCUoCNv\r\nBO1vGebqHS3i521OJ0t8Ry03qKPA/VzTPU7JsizyUX/QHJwqA1ULeZ/ol+SD\r\noO65StRG8gu+lXbUMiZ7kgFSOdKOhHx3rx7IQrKwnMTUR4DyjgEzdX08kfLo\r\nDAEQxF1YBl6vTrE0qVc8qxP2PW5+GmvlUZSNfrwZ8a5Bf1C0hCx/R3f1+Q65\r\nlmaqVfyHCQuBT80Ed4f0ahG9l1GCgeXHROXw0Be8Ccs+y7NYLAhxzbf0g/zr\r\nA4tXJcaF/i/iYb18g3Ps1A6wodH3YfYUBJAKcYli/7K1FvwTPAcH89jVFtW9\r\n3E/WqaAjrMTJbCvI1b2xLN5xaPPMIJZs6jg=\r\n=xwM4\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"preset":"ts-jest","automock":false,"testMatch":["**/__tests__/**/*.ts?(x)","**/?(*.)+(spec|test).ts?(x)"],"setupFiles":["../../setupJest.ts"],"collectCoverage":true,"coverageDirectory":"./coverage/"},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# @ice/stark-module\n\n[![NPM version](https://img.shields.io/npm/v/@ice/stark-module.svg?style=flat)](https://npmjs.org/package/@ice/stark-module) [![Package Quality](https://npm.packagequality.com/shield/@ice%2Fstark-module.svg)](https://packagequality.com/#?package=@ice%2Fstark-module) [![build status](https://img.shields.io/travis/ice-lab/icestark.svg?style=flat-square)](https://travis-ci.org/ice-lab/icestark) [![Test coverage](https://img.shields.io/codecov/c/github/ice-lab/icestark.svg?style=flat-square)](https://codecov.io/gh/ice-lab/icestark) [![NPM downloads](http://img.shields.io/npm/dm/@ice/stark-module.svg?style=flat)](https://npmjs.org/package/@ice/stark-module) [![David deps](https://img.shields.io/david/ice-lab/icestark.svg?style=flat-square)](https://david-dm.org/ice-lab/icestark)\n\n## Installation\n\n```bash\n$ npm install @ice/stark-module --save\n```\n\n## Module LifeCycle\n\nspecify module lifeCycle when pack code as a micro module\n\n```js\nconst SampleComponent = () => {\n  return <div>Sample</div>;\n}\n\n// mount function will be trigger when mount micro module\nexport function mount(ModuleComponent, targetNode, props) {\n  ReactDOM.render(<ModuleComponent {...props} />, targetNode);\n}\n\n// unmount function will be trigger when unmount micro module\nexport function unmount(targetNode) {\n  ReactDOM.unmountComponentAtNode(targetNode);\n}\n\nexport default SampleComponent;\n```\n\n> pack module with module spec UMD\n\n## Usage\n\n### Basic Usage\n\n```jsx\nimport { MicroModule } from '@ice/stark-module';\n\nconst App = () => {\n  const moduleInfo = {\n    name: 'moduleName',\n    url: 'https://localhost/module.js',\n  }\n  return <MicroModule moduleInfo={moduleInfo} />;\n}\n```\n\n### Register Modules\n\n```jsx\nimport { MicroModule, registerModule, registerModules, getModules } from '@ice/stark-module';\n\n// register single module\nregisterModule({\n  url: 'https://localhost/module-a.js',\n  name: 'module-a',\n});\n\n// register multiple modules at once\nregisterModules([\n  {\n    url: 'https://localhost/module-b.js',\n    name: 'module-b',\n  },\n  {\n    url: 'https://localhost/module-c.js',\n    name: 'module-c',\n  },\n]);\n\n// get module info registered by API registerModules\nconst moduleInfo = getModules();\n\nconst App = () => {\n  // after registerMdoules, use micro module by specify module name\n  return (\n    <div>\n      <MicroModule moduleName=\"module-a\" />\n      <MicroModule moduleName=\"module-b\" />\n      <MicroModule moduleName=\"module-c\" />\n    </div>\n  );\n}\n```\n\n### Registration Merging\n\nIf more than one modules are registered with the same name, only the last one will be kept.\n\n```jsx\nimport { registerModule, registerModules, getModules } from '@ice/stark-module';\n\nregisterModules([\n  {\n    url: 'https://localhost/module-a.js',\n    name: 'module-a',\n  },\n  {\n    url: 'https://localhost/module-b.js',\n    name: 'module-a',\n  },\n]);\n\nconst modules = getModules();\n/** the modules will be:\n[{\n  url: 'https://localhost/module-b.js',\n  name: 'module-a',\n}]\n*/\n\nregisterModule({\n  url: 'https://localhost/module-c.js',\n  name: 'module-a',\n});\n\nconst modules = getModules();\n/** the modules will be:\n[{\n  url: 'https://localhost/module-c.js',\n  name: 'module-a',\n}]\n*/\n```\n\n### Clear Modules\n\n```js\nimport { registerModules, clearModules } from '@ice/stark-module';\n\nregisterModules([\n  {\n    url: 'https://localhost/module-a.js',\n    name: 'module-a',\n  },\n  {\n    url: 'https://localhost/module-b.js',\n    name: 'module-b',\n  },\n]);\n\n// clear all modules information and content cache.\nclearModules();\n```\n\n### Custom Lifecyle\n\n```jsx\nimport { MicroModule } from '@ice/stark-module';\n\nconst App = () => {\n  const moduleInfo = {\n    name: 'moduleName',\n    url: 'https://localhost/module.js',\n    mount: (ModuleComponent, mountNode) => {\n      console.log('custom mount');\n      ReactDOM.render(<ModuleComponent />, mountNode);\n    },\n  }\n  return <MicroModule moduleInfo={moduleInfo} />;\n}\n```\n\n### Custom mount component\n\n```jsx\nimport { mountModule, unmoutModule } from '@ice/stark-module';\n\nconst moduleInfo = {\n  name: 'moduleName',\n  url: 'https://localhost/module.js',\n};\n\nconst ModuleComponent = () => {\n  const renderNode = useRef(null);\n  useEffect(() => {\n    mountModule(moduleInfo, renderNode, {});\n    return () => {\n      unmoutModule(moduleInfo, renderNode);\n    }\n  }, []);\n  return (<div ref={renderNode}></div>);\n};\n```\n\n### Register Local Modules\n\nIn some scenarios, it is necessary to support the built-in components. In this case, one can use `render` property to render a local module.\n\n```jsx\nimport LocalComponent from './localComponent';\n\nregisterModules([{\n  name: 'moduleName',\n  render: () => LocalComponent,\n}]);\n\nconst App = () => {\n  return (\n    <div>\n      <MicroModule moduleName=\"moduleName\" />\n    </div>\n  );\n}\n```\n\n## Contributors\n\nFeel free to report any questions as an [issue](https://github.com/ice-lab/icestark/issues/new), we'd love to have your helping hand on `icestark`.\n\nIf you're interested in `icestark`, see [CONTRIBUTING.md](https://github.com/alibaba/ice/blob/master/.github/CONTRIBUTING.md) for more information to learn how to get started.\n\n## License\n\n[MIT](LICENSE)","gitHead":"2a7ecd229f3d9ca264ed05a28178433185a28640","scripts":{"lint":"pnpm eslint --ext .js,.jsx,.ts,.tsx ./","test":"NODE_ENV=unittest pnpm jest","build":"rm -rf lib && tsc","watch":"tsc -w","prepublishOnly":"pnpm run-s lint test build"},"_npmUser":{"name":"clarkxia","email":"xiawenwu41@gmail.com"},"repository":{"url":"git+https://github.com/ice-lab/icestark.git","type":"git"},"_npmVersion":"8.1.3","description":"toolkit for load standard micro-module","directories":{},"_nodeVersion":"16.19.0","dependencies":{"@ice/sandbox":"^1.1.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"react":"^16.13.1","react-dom":"^16.13.1","typescript":"^4.3.5","@types/react":"^16.0.0","@types/react-dom":"^16.0.0"},"peerDependencies":{"react":">=15.0.0","react-dom":">=15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/stark-module_1.6.0-2_1673231232230_0.8989896297309734","host":"s3://npm-registry-packages"}},"1.6.0-3":{"name":"@ice/stark-module","version":"1.6.0-3","keywords":["modules","icestark"],"author":"","license":"MIT","_id":"@ice/stark-module@1.6.0-3","maintainers":[{"name":"answershuto","email":"answershuto@gmail.com"},{"name":"chenjun1011","email":"chenjun1011@gmail.com"},{"name":"luhengchang228","email":"luhengchang228@126.com"},{"name":"sobear","email":"sobear.me@gmail.com"},{"name":"clarkxia","email":"xiawenwu41@gmail.com"},{"name":"rax-publisher","email":"rax-public@alibaba-inc.com"}],"homepage":"https://github.com/ice-lab/icestark#readme","bugs":{"url":"https://github.com/ice-lab/icestark/issues"},"dist":{"shasum":"92854d78584c8e4b42f002b33e31e8f2cecc19fb","tarball":"https://registry.npmjs.org/@ice/stark-module/-/stark-module-1.6.0-3.tgz","fileCount":22,"integrity":"sha512-IQ0OliQ8G9WmuFpoEcEDUyinSm2oPhGfIyT73HFH59NCTO/GXwBPGnmYP7r/h3i7QkaE8QkXG3DfdUjGnEhlZg==","signatures":[{"sig":"MEYCIQDp/+Lr/2E/oDPP8sTRA+1THtf0uiwo3FAg3Jb6SkUGZwIhAL90kbEBnUqzDEL9qRj0mCJ663yoHNEbiXo+XGXmgDnJ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":59548,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj/d/lACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpgtA/7B688VKGc71uMpTkQdXLgPHbMGkAbzKDqfLvxGn9UTpuYztSM\r\njHrlA2J/JGRsSISTnxZz99oDZ4hvEc5ec7cuaDLRE9uT2FPQzXGGd2jVW1Hs\r\nVgyZnHTEaIm5FAELn6EE7eU63iE/xliVVDC4qyCapBsvTFxJFqaC4/Sgu+CF\r\nyZ3d4wKJc60YSACslByh68XXnd5tXe9YmBYBfVWoq1TyL+1NOUaJY3gqMRvE\r\nukMdhGeynnvcjDLSPo4ogGD9UlbNmIEwqXYOvTbMKnwt60jOk9exuRjBzGAh\r\nLzLvNBJzJIfVWGGYTOXKPCsTFJEm3dxC9iMyL25DMPDrgcRWiFf3gaES0aga\r\neQl4TLfTG8Nm9IuxYDG8bT5XHJGkc5vHK30bCofEyytkLAXouq5rpXVsOPg0\r\nvZtB2a/5cf0rJOvb925g4ZBH0EgStNBtqIpfIIeONzEBcvs038O7KnJxoMux\r\nkKs74OIkQzelMCsuB/LBw66ibaY4oI7BeKdCgUFOXccwMxSCM3/OS/DL/8WF\r\nR5OElxymNHNJh1sjDvbf4O/jaVb/FjGf8LAPuI8e9SW60lv6u+rvk6+QmnyD\r\nCL3EBspX/U0aiicG8dlK66C1BwT0VTuja9G5GxloaVPS/pmNqa5q2fXQEq6V\r\ng2ePziz8wZ6x5zhFthGRZJYHktqHGvI9pag=\r\n=15WR\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"preset":"ts-jest","automock":false,"testMatch":["**/__tests__/**/*.ts?(x)","**/?(*.)+(spec|test).ts?(x)"],"setupFiles":["../../setupJest.ts"],"collectCoverage":true,"coverageDirectory":"./coverage/"},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# @ice/stark-module\n\n[![NPM version](https://img.shields.io/npm/v/@ice/stark-module.svg?style=flat)](https://npmjs.org/package/@ice/stark-module) [![Package Quality](https://npm.packagequality.com/shield/@ice%2Fstark-module.svg)](https://packagequality.com/#?package=@ice%2Fstark-module) [![build status](https://img.shields.io/travis/ice-lab/icestark.svg?style=flat-square)](https://travis-ci.org/ice-lab/icestark) [![Test coverage](https://img.shields.io/codecov/c/github/ice-lab/icestark.svg?style=flat-square)](https://codecov.io/gh/ice-lab/icestark) [![NPM downloads](http://img.shields.io/npm/dm/@ice/stark-module.svg?style=flat)](https://npmjs.org/package/@ice/stark-module) [![David deps](https://img.shields.io/david/ice-lab/icestark.svg?style=flat-square)](https://david-dm.org/ice-lab/icestark)\n\n## Installation\n\n```bash\n$ npm install @ice/stark-module --save\n```\n\n## Module LifeCycle\n\nspecify module lifeCycle when pack code as a micro module\n\n```js\nconst SampleComponent = () => {\n  return <div>Sample</div>;\n}\n\n// mount function will be trigger when mount micro module\nexport function mount(ModuleComponent, targetNode, props) {\n  ReactDOM.render(<ModuleComponent {...props} />, targetNode);\n}\n\n// unmount function will be trigger when unmount micro module\nexport function unmount(targetNode) {\n  ReactDOM.unmountComponentAtNode(targetNode);\n}\n\nexport default SampleComponent;\n```\n\n> pack module with module spec UMD\n\n## Usage\n\n### Basic Usage\n\n```jsx\nimport { MicroModule } from '@ice/stark-module';\n\nconst App = () => {\n  const moduleInfo = {\n    name: 'moduleName',\n    url: 'https://localhost/module.js',\n  }\n  return <MicroModule moduleInfo={moduleInfo} />;\n}\n```\n\n### Register Modules\n\n```jsx\nimport { MicroModule, registerModule, registerModules, getModules } from '@ice/stark-module';\n\n// register single module\nregisterModule({\n  url: 'https://localhost/module-a.js',\n  name: 'module-a',\n});\n\n// register multiple modules at once\nregisterModules([\n  {\n    url: 'https://localhost/module-b.js',\n    name: 'module-b',\n  },\n  {\n    url: 'https://localhost/module-c.js',\n    name: 'module-c',\n  },\n]);\n\n// get module info registered by API registerModules\nconst moduleInfo = getModules();\n\nconst App = () => {\n  // after registerMdoules, use micro module by specify module name\n  return (\n    <div>\n      <MicroModule moduleName=\"module-a\" />\n      <MicroModule moduleName=\"module-b\" />\n      <MicroModule moduleName=\"module-c\" />\n    </div>\n  );\n}\n```\n\n### Registration Merging\n\nIf more than one modules are registered with the same name, only the last one will be kept.\n\n```jsx\nimport { registerModule, registerModules, getModules } from '@ice/stark-module';\n\nregisterModules([\n  {\n    url: 'https://localhost/module-a.js',\n    name: 'module-a',\n  },\n  {\n    url: 'https://localhost/module-b.js',\n    name: 'module-a',\n  },\n]);\n\nconst modules = getModules();\n/** the modules will be:\n[{\n  url: 'https://localhost/module-b.js',\n  name: 'module-a',\n}]\n*/\n\nregisterModule({\n  url: 'https://localhost/module-c.js',\n  name: 'module-a',\n});\n\nconst modules = getModules();\n/** the modules will be:\n[{\n  url: 'https://localhost/module-c.js',\n  name: 'module-a',\n}]\n*/\n```\n\n### Clear Modules\n\n```js\nimport { registerModules, clearModules } from '@ice/stark-module';\n\nregisterModules([\n  {\n    url: 'https://localhost/module-a.js',\n    name: 'module-a',\n  },\n  {\n    url: 'https://localhost/module-b.js',\n    name: 'module-b',\n  },\n]);\n\n// clear all modules information and content cache.\nclearModules();\n```\n\n### Custom Lifecyle\n\n```jsx\nimport { MicroModule } from '@ice/stark-module';\n\nconst App = () => {\n  const moduleInfo = {\n    name: 'moduleName',\n    url: 'https://localhost/module.js',\n    mount: (ModuleComponent, mountNode) => {\n      console.log('custom mount');\n      ReactDOM.render(<ModuleComponent />, mountNode);\n    },\n  }\n  return <MicroModule moduleInfo={moduleInfo} />;\n}\n```\n\n### Custom mount component\n\n```jsx\nimport { mountModule, unmoutModule } from '@ice/stark-module';\n\nconst moduleInfo = {\n  name: 'moduleName',\n  url: 'https://localhost/module.js',\n};\n\nconst ModuleComponent = () => {\n  const renderNode = useRef(null);\n  useEffect(() => {\n    mountModule(moduleInfo, renderNode, {});\n    return () => {\n      unmoutModule(moduleInfo, renderNode);\n    }\n  }, []);\n  return (<div ref={renderNode}></div>);\n};\n```\n\n### Register Local Modules\n\nIn some scenarios, it is necessary to support the built-in components. In this case, one can use `render` property to render a local module.\n\n```jsx\nimport LocalComponent from './localComponent';\n\nregisterModules([{\n  name: 'moduleName',\n  render: () => LocalComponent,\n}]);\n\nconst App = () => {\n  return (\n    <div>\n      <MicroModule moduleName=\"moduleName\" />\n    </div>\n  );\n}\n```\n\n## Contributors\n\nFeel free to report any questions as an [issue](https://github.com/ice-lab/icestark/issues/new), we'd love to have your helping hand on `icestark`.\n\nIf you're interested in `icestark`, see [CONTRIBUTING.md](https://github.com/alibaba/ice/blob/master/.github/CONTRIBUTING.md) for more information to learn how to get started.\n\n## License\n\n[MIT](LICENSE)","gitHead":"50522b5ea67de73f489b56a0a708651eddbc6e3f","scripts":{"lint":"pnpm eslint --ext .js,.jsx,.ts,.tsx ./","test":"NODE_ENV=unittest pnpm jest","build":"rm -rf lib && tsc","watch":"tsc -w","prepublishOnly":"pnpm run-s lint test build"},"_npmUser":{"name":"clarkxia","email":"xiawenwu41@gmail.com"},"repository":{"url":"git+https://github.com/ice-lab/icestark.git","type":"git"},"_npmVersion":"8.1.3","description":"toolkit for load standard micro-module","directories":{},"_nodeVersion":"16.19.0","dependencies":{"@ice/sandbox":"^1.1.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"react":"^16.13.1","react-dom":"^16.13.1","typescript":"^4.3.5","@types/react":"^16.0.0","@types/react-dom":"^16.0.0"},"peerDependencies":{"react":">=15.0.0","react-dom":">=15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/stark-module_1.6.0-3_1677582309232_0.15189473610074788","host":"s3://npm-registry-packages"}},"1.5.1-6":{"name":"@ice/stark-module","version":"1.5.1-6","keywords":["modules","icestark"],"author":"","license":"MIT","_id":"@ice/stark-module@1.5.1-6","maintainers":[{"name":"answershuto","email":"answershuto@gmail.com"},{"name":"chenjun1011","email":"chenjun1011@gmail.com"},{"name":"luhengchang228","email":"luhengchang228@126.com"},{"name":"sobear","email":"sobear.me@gmail.com"},{"name":"clarkxia","email":"xiawenwu41@gmail.com"},{"name":"rax-publisher","email":"rax-public@alibaba-inc.com"}],"homepage":"https://github.com/ice-lab/icestark#readme","bugs":{"url":"https://github.com/ice-lab/icestark/issues"},"dist":{"shasum":"ac27a814cd312290ce398e77ade4c307ef7f80ef","tarball":"https://registry.npmjs.org/@ice/stark-module/-/stark-module-1.5.1-6.tgz","fileCount":18,"integrity":"sha512-TGphkEBpw0eYP3mEWjDThDNguh86/NUJCBQ4tsbDnmj72kpcX6P/uP87Vh3HSMwWnxbNNR9zDg6A9TWuni2W+A==","signatures":[{"sig":"MEUCIQD1V6zwFQSj0TpKmPUe1C1ZBGf20WWzMgubPkkiJ2bWpQIgezp23p5mrNCjHw6mxLGvofOP5ajARqoWNJA0nZzV7Zg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":53150},"jest":{"preset":"ts-jest","automock":false,"testMatch":["**/__tests__/**/*.ts?(x)","**/?(*.)+(spec|test).ts?(x)"],"setupFiles":["../../setupJest.ts"],"collectCoverage":true,"coverageDirectory":"./coverage/"},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# @ice/stark-module\n\n[![NPM version](https://img.shields.io/npm/v/@ice/stark-module.svg?style=flat)](https://npmjs.org/package/@ice/stark-module) [![Package Quality](https://npm.packagequality.com/shield/@ice%2Fstark-module.svg)](https://packagequality.com/#?package=@ice%2Fstark-module) [![build status](https://img.shields.io/travis/ice-lab/icestark.svg?style=flat-square)](https://travis-ci.org/ice-lab/icestark) [![Test coverage](https://img.shields.io/codecov/c/github/ice-lab/icestark.svg?style=flat-square)](https://codecov.io/gh/ice-lab/icestark) [![NPM downloads](http://img.shields.io/npm/dm/@ice/stark-module.svg?style=flat)](https://npmjs.org/package/@ice/stark-module) [![David deps](https://img.shields.io/david/ice-lab/icestark.svg?style=flat-square)](https://david-dm.org/ice-lab/icestark)\n\n## Installation\n\n```bash\n$ npm install @ice/stark-module --save\n```\n\n## Module LifeCycle\n\nspecify module lifeCycle when pack code as a micro module\n\n```js\nconst SampleComponent = () => {\n  return <div>Sample</div>;\n}\n\n// mount function will be trigger when mount micro module\nexport function mount(ModuleComponent, targetNode, props) {\n  ReactDOM.render(<ModuleComponent {...props} />, targetNode);\n}\n\n// unmount function will be trigger when unmount micro module\nexport function unmount(targetNode) {\n  ReactDOM.unmountComponentAtNode(targetNode);\n}\n\nexport default SampleComponent;\n```\n\n> pack module with module spec UMD\n\n## Usage\n\n### Basic Usage\n\n```jsx\nimport { MicroModule } from '@ice/stark-module';\n\nconst App = () => {\n  const moduleInfo = {\n    name: 'moduleName',\n    url: 'https://localhost/module.js',\n  }\n  return <MicroModule moduleInfo={moduleInfo} />;\n}\n```\n\n### Register Modules\n\n```jsx\nimport { MicroModule, registerModule, registerModules, getModules } from '@ice/stark-module';\n\n// register single module\nregisterModule({\n  url: 'https://localhost/module-a.js',\n  name: 'module-a',\n});\n\n// register multiple modules at once\nregisterModules([\n  {\n    url: 'https://localhost/module-b.js',\n    name: 'module-b',\n  },\n  {\n    url: 'https://localhost/module-c.js',\n    name: 'module-c',\n  },\n]);\n\n// get module info registered by API registerModules\nconst moduleInfo = getModules();\n\nconst App = () => {\n  // after registerMdoules, use micro module by specify module name\n  return (\n    <div>\n      <MicroModule moduleName=\"module-a\" />\n      <MicroModule moduleName=\"module-b\" />\n      <MicroModule moduleName=\"module-c\" />\n    </div>\n  );\n}\n```\n\n### Registration Merging\n\nIf more than one modules are registered with the same name, only the last one will be kept.\n\n```jsx\nimport { registerModule, registerModules, getModules } from '@ice/stark-module';\n\nregisterModules([\n  {\n    url: 'https://localhost/module-a.js',\n    name: 'module-a',\n  },\n  {\n    url: 'https://localhost/module-b.js',\n    name: 'module-a',\n  },\n]);\n\nconst modules = getModules();\n/** the modules will be:\n[{\n  url: 'https://localhost/module-b.js',\n  name: 'module-a',\n}]\n*/\n\nregisterModule({\n  url: 'https://localhost/module-c.js',\n  name: 'module-a',\n});\n\nconst modules = getModules();\n/** the modules will be:\n[{\n  url: 'https://localhost/module-c.js',\n  name: 'module-a',\n}]\n*/\n```\n\n### Clear Modules\n\n```js\nimport { registerModules, clearModules } from '@ice/stark-module';\n\nregisterModules([\n  {\n    url: 'https://localhost/module-a.js',\n    name: 'module-a',\n  },\n  {\n    url: 'https://localhost/module-b.js',\n    name: 'module-b',\n  },\n]);\n\n// clear all modules information and content cache.\nclearModules();\n```\n\n### Custom Lifecyle\n\n```jsx\nimport { MicroModule } from '@ice/stark-module';\n\nconst App = () => {\n  const moduleInfo = {\n    name: 'moduleName',\n    url: 'https://localhost/module.js',\n    mount: (ModuleComponent, mountNode) => {\n      console.log('custom mount');\n      ReactDOM.render(<ModuleComponent />, mountNode);\n    },\n  }\n  return <MicroModule moduleInfo={moduleInfo} />;\n}\n```\n\n### Custom mount component\n\n```jsx\nimport { mountModule, unmoutModule } from '@ice/stark-module';\n\nconst moduleInfo = {\n  name: 'moduleName',\n  url: 'https://localhost/module.js',\n};\n\nconst ModuleComponent = () => {\n  const renderNode = useRef(null);\n  useEffect(() => {\n    mountModule(moduleInfo, renderNode, {});\n    return () => {\n      unmoutModule(moduleInfo, renderNode);\n    }\n  }, []);\n  return (<div ref={renderNode}></div>);\n};\n```\n\n### Register Local Modules\n\nIn some scenarios, it is necessary to support the built-in components. In this case, one can use `render` property to render a local module.\n\n```jsx\nimport LocalComponent from './localComponent';\n\nregisterModules([{\n  name: 'moduleName',\n  render: () => LocalComponent,\n}]);\n\nconst App = () => {\n  return (\n    <div>\n      <MicroModule moduleName=\"moduleName\" />\n    </div>\n  );\n}\n```\n\n## Contributors\n\nFeel free to report any questions as an [issue](https://github.com/ice-lab/icestark/issues/new), we'd love to have your helping hand on `icestark`.\n\nIf you're interested in `icestark`, see [CONTRIBUTING.md](https://github.com/alibaba/ice/blob/master/.github/CONTRIBUTING.md) for more information to learn how to get started.\n\n## License\n\n[MIT](LICENSE)","gitHead":"ec2d44244a2b4ebd7af0e0ff0a10f528b33b8a64","scripts":{"lint":"pnpm eslint --ext .js,.jsx,.ts,.tsx ./","test":"NODE_ENV=unittest pnpm jest","build":"rm -rf lib && tsc","watch":"tsc -w","prepublishOnly":"pnpm run-s lint test build"},"_npmUser":{"name":"clarkxia","email":"xiawenwu41@gmail.com"},"repository":{"url":"git+https://github.com/ice-lab/icestark.git","type":"git"},"_npmVersion":"8.1.3","description":"toolkit for load standard micro-module","directories":{},"_nodeVersion":"16.19.0","dependencies":{"@ice/sandbox":"^1.1.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"react":"^16.13.1","react-dom":"^16.13.1","typescript":"^3.8.3"},"peerDependencies":{"react":">=15.0.0","react-dom":">=15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/stark-module_1.5.1-6_1685432213190_0.22947036065608373","host":"s3://npm-registry-packages"}},"1.5.1-7":{"name":"@ice/stark-module","version":"1.5.1-7","keywords":["modules","icestark"],"author":"","license":"MIT","_id":"@ice/stark-module@1.5.1-7","maintainers":[{"name":"answershuto","email":"answershuto@gmail.com"},{"name":"chenjun1011","email":"chenjun1011@gmail.com"},{"name":"luhengchang228","email":"luhengchang228@126.com"},{"name":"sobear","email":"sobear.me@gmail.com"},{"name":"clarkxia","email":"xiawenwu41@gmail.com"},{"name":"rax-publisher","email":"rax-public@alibaba-inc.com"}],"homepage":"https://github.com/ice-lab/icestark#readme","bugs":{"url":"https://github.com/ice-lab/icestark/issues"},"dist":{"shasum":"fb99570aec21684b72d82c47b4ee280817185c83","tarball":"https://registry.npmjs.org/@ice/stark-module/-/stark-module-1.5.1-7.tgz","fileCount":18,"integrity":"sha512-K+IOBsYweINZ1SitRfjlL/SELTkAXigaLiyLOcT25HEJINLz7gOX+h4W1UX6vDMH16zqZ3fim30JMksDBzn7hg==","signatures":[{"sig":"MEUCIDbBf0sv1palNDf5eqYX+yuDEU55SXfIjY6qbL7y7RJxAiEAlliMMYDtuyo9rNRTdaY1v/wuGm4ypfmK1CIDaj0vupY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":53231},"jest":{"preset":"ts-jest","automock":false,"testMatch":["**/__tests__/**/*.ts?(x)","**/?(*.)+(spec|test).ts?(x)"],"setupFiles":["../../setupJest.ts"],"collectCoverage":true,"coverageDirectory":"./coverage/"},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# @ice/stark-module\n\n[![NPM version](https://img.shields.io/npm/v/@ice/stark-module.svg?style=flat)](https://npmjs.org/package/@ice/stark-module) [![Package Quality](https://npm.packagequality.com/shield/@ice%2Fstark-module.svg)](https://packagequality.com/#?package=@ice%2Fstark-module) [![build status](https://img.shields.io/travis/ice-lab/icestark.svg?style=flat-square)](https://travis-ci.org/ice-lab/icestark) [![Test coverage](https://img.shields.io/codecov/c/github/ice-lab/icestark.svg?style=flat-square)](https://codecov.io/gh/ice-lab/icestark) [![NPM downloads](http://img.shields.io/npm/dm/@ice/stark-module.svg?style=flat)](https://npmjs.org/package/@ice/stark-module) [![David deps](https://img.shields.io/david/ice-lab/icestark.svg?style=flat-square)](https://david-dm.org/ice-lab/icestark)\n\n## Installation\n\n```bash\n$ npm install @ice/stark-module --save\n```\n\n## Module LifeCycle\n\nspecify module lifeCycle when pack code as a micro module\n\n```js\nconst SampleComponent = () => {\n  return <div>Sample</div>;\n}\n\n// mount function will be trigger when mount micro module\nexport function mount(ModuleComponent, targetNode, props) {\n  ReactDOM.render(<ModuleComponent {...props} />, targetNode);\n}\n\n// unmount function will be trigger when unmount micro module\nexport function unmount(targetNode) {\n  ReactDOM.unmountComponentAtNode(targetNode);\n}\n\nexport default SampleComponent;\n```\n\n> pack module with module spec UMD\n\n## Usage\n\n### Basic Usage\n\n```jsx\nimport { MicroModule } from '@ice/stark-module';\n\nconst App = () => {\n  const moduleInfo = {\n    name: 'moduleName',\n    url: 'https://localhost/module.js',\n  }\n  return <MicroModule moduleInfo={moduleInfo} />;\n}\n```\n\n### Register Modules\n\n```jsx\nimport { MicroModule, registerModule, registerModules, getModules } from '@ice/stark-module';\n\n// register single module\nregisterModule({\n  url: 'https://localhost/module-a.js',\n  name: 'module-a',\n});\n\n// register multiple modules at once\nregisterModules([\n  {\n    url: 'https://localhost/module-b.js',\n    name: 'module-b',\n  },\n  {\n    url: 'https://localhost/module-c.js',\n    name: 'module-c',\n  },\n]);\n\n// get module info registered by API registerModules\nconst moduleInfo = getModules();\n\nconst App = () => {\n  // after registerMdoules, use micro module by specify module name\n  return (\n    <div>\n      <MicroModule moduleName=\"module-a\" />\n      <MicroModule moduleName=\"module-b\" />\n      <MicroModule moduleName=\"module-c\" />\n    </div>\n  );\n}\n```\n\n### Registration Merging\n\nIf more than one modules are registered with the same name, only the last one will be kept.\n\n```jsx\nimport { registerModule, registerModules, getModules } from '@ice/stark-module';\n\nregisterModules([\n  {\n    url: 'https://localhost/module-a.js',\n    name: 'module-a',\n  },\n  {\n    url: 'https://localhost/module-b.js',\n    name: 'module-a',\n  },\n]);\n\nconst modules = getModules();\n/** the modules will be:\n[{\n  url: 'https://localhost/module-b.js',\n  name: 'module-a',\n}]\n*/\n\nregisterModule({\n  url: 'https://localhost/module-c.js',\n  name: 'module-a',\n});\n\nconst modules = getModules();\n/** the modules will be:\n[{\n  url: 'https://localhost/module-c.js',\n  name: 'module-a',\n}]\n*/\n```\n\n### Clear Modules\n\n```js\nimport { registerModules, clearModules } from '@ice/stark-module';\n\nregisterModules([\n  {\n    url: 'https://localhost/module-a.js',\n    name: 'module-a',\n  },\n  {\n    url: 'https://localhost/module-b.js',\n    name: 'module-b',\n  },\n]);\n\n// clear all modules information and content cache.\nclearModules();\n```\n\n### Custom Lifecyle\n\n```jsx\nimport { MicroModule } from '@ice/stark-module';\n\nconst App = () => {\n  const moduleInfo = {\n    name: 'moduleName',\n    url: 'https://localhost/module.js',\n    mount: (ModuleComponent, mountNode) => {\n      console.log('custom mount');\n      ReactDOM.render(<ModuleComponent />, mountNode);\n    },\n  }\n  return <MicroModule moduleInfo={moduleInfo} />;\n}\n```\n\n### Custom mount component\n\n```jsx\nimport { mountModule, unmoutModule } from '@ice/stark-module';\n\nconst moduleInfo = {\n  name: 'moduleName',\n  url: 'https://localhost/module.js',\n};\n\nconst ModuleComponent = () => {\n  const renderNode = useRef(null);\n  useEffect(() => {\n    mountModule(moduleInfo, renderNode, {});\n    return () => {\n      unmoutModule(moduleInfo, renderNode);\n    }\n  }, []);\n  return (<div ref={renderNode}></div>);\n};\n```\n\n### Register Local Modules\n\nIn some scenarios, it is necessary to support the built-in components. In this case, one can use `render` property to render a local module.\n\n```jsx\nimport LocalComponent from './localComponent';\n\nregisterModules([{\n  name: 'moduleName',\n  render: () => LocalComponent,\n}]);\n\nconst App = () => {\n  return (\n    <div>\n      <MicroModule moduleName=\"moduleName\" />\n    </div>\n  );\n}\n```\n\n## Contributors\n\nFeel free to report any questions as an [issue](https://github.com/ice-lab/icestark/issues/new), we'd love to have your helping hand on `icestark`.\n\nIf you're interested in `icestark`, see [CONTRIBUTING.md](https://github.com/alibaba/ice/blob/master/.github/CONTRIBUTING.md) for more information to learn how to get started.\n\n## License\n\n[MIT](LICENSE)","gitHead":"ec2d44244a2b4ebd7af0e0ff0a10f528b33b8a64","scripts":{"lint":"pnpm eslint --ext .js,.jsx,.ts,.tsx ./","test":"NODE_ENV=unittest pnpm jest","build":"rm -rf lib && tsc","watch":"tsc -w","prepublishOnly":"pnpm run-s lint test build"},"_npmUser":{"name":"clarkxia","email":"xiawenwu41@gmail.com"},"repository":{"url":"git+https://github.com/ice-lab/icestark.git","type":"git"},"_npmVersion":"8.1.3","description":"toolkit for load standard micro-module","directories":{},"_nodeVersion":"16.19.0","dependencies":{"@ice/sandbox":"^1.1.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"react":"^16.13.1","react-dom":"^16.13.1","typescript":"^3.8.3"},"peerDependencies":{"react":">=15.0.0","react-dom":">=15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/stark-module_1.5.1-7_1685445901642_0.8059801712940575","host":"s3://npm-registry-packages"}},"1.5.1-8":{"name":"@ice/stark-module","version":"1.5.1-8","keywords":["modules","icestark"],"author":"","license":"MIT","_id":"@ice/stark-module@1.5.1-8","maintainers":[{"name":"linbudu","email":"linbudu599@gmail.com"},{"name":"answershuto","email":"answershuto@gmail.com"},{"name":"chenjun1011","email":"chenjun1011@gmail.com"},{"name":"luhengchang228","email":"luhengchang228@126.com"},{"name":"sobear","email":"sobear.me@gmail.com"},{"name":"clarkxia","email":"xiawenwu41@gmail.com"},{"name":"rax-publisher","email":"rax-public@alibaba-inc.com"}],"homepage":"https://github.com/ice-lab/icestark#readme","bugs":{"url":"https://github.com/ice-lab/icestark/issues"},"dist":{"shasum":"20fbf611bb8b3903e8a127a05e19ffbf7e131b0e","tarball":"https://registry.npmjs.org/@ice/stark-module/-/stark-module-1.5.1-8.tgz","fileCount":22,"integrity":"sha512-/QDtLtLtHPpOriic0ZbgCztVLjHbvHGWzAl+qRnnzTQkR9FmBhY2WR6IESReY1HXdb2vmcOC1nmxk02fQeAYCQ==","signatures":[{"sig":"MEQCIE0szdZ6fCfGbgsus42BWHNthTFWqWJE/UUTE21ANGPqAiBCmvenktQxSB7fHTFDvUekFMScozcoJeAJ0g0mIGKyxw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":60137},"jest":{"preset":"ts-jest","automock":false,"testMatch":["**/__tests__/**/*.ts?(x)","**/?(*.)+(spec|test).ts?(x)"],"setupFiles":["../../setupJest.ts"],"collectCoverage":true,"coverageDirectory":"./coverage/"},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# @ice/stark-module\n\n[![NPM version](https://img.shields.io/npm/v/@ice/stark-module.svg?style=flat)](https://npmjs.org/package/@ice/stark-module) [![Package Quality](https://npm.packagequality.com/shield/@ice%2Fstark-module.svg)](https://packagequality.com/#?package=@ice%2Fstark-module) [![build status](https://img.shields.io/travis/ice-lab/icestark.svg?style=flat-square)](https://travis-ci.org/ice-lab/icestark) [![Test coverage](https://img.shields.io/codecov/c/github/ice-lab/icestark.svg?style=flat-square)](https://codecov.io/gh/ice-lab/icestark) [![NPM downloads](http://img.shields.io/npm/dm/@ice/stark-module.svg?style=flat)](https://npmjs.org/package/@ice/stark-module) [![David deps](https://img.shields.io/david/ice-lab/icestark.svg?style=flat-square)](https://david-dm.org/ice-lab/icestark)\n\n## Installation\n\n```bash\n$ npm install @ice/stark-module --save\n```\n\n## Module LifeCycle\n\nspecify module lifeCycle when pack code as a micro module\n\n```js\nconst SampleComponent = () => {\n  return <div>Sample</div>;\n}\n\n// mount function will be trigger when mount micro module\nexport function mount(ModuleComponent, targetNode, props) {\n  ReactDOM.render(<ModuleComponent {...props} />, targetNode);\n}\n\n// unmount function will be trigger when unmount micro module\nexport function unmount(targetNode) {\n  ReactDOM.unmountComponentAtNode(targetNode);\n}\n\nexport default SampleComponent;\n```\n\n> pack module with module spec UMD\n\n## Usage\n\n### Basic Usage\n\n```jsx\nimport { MicroModule } from '@ice/stark-module';\n\nconst App = () => {\n  const moduleInfo = {\n    name: 'moduleName',\n    url: 'https://localhost/module.js',\n  }\n  return <MicroModule moduleInfo={moduleInfo} />;\n}\n```\n\n### Register Modules\n\n```jsx\nimport { MicroModule, registerModule, registerModules, getModules } from '@ice/stark-module';\n\n// register single module\nregisterModule({\n  url: 'https://localhost/module-a.js',\n  name: 'module-a',\n});\n\n// register multiple modules at once\nregisterModules([\n  {\n    url: 'https://localhost/module-b.js',\n    name: 'module-b',\n  },\n  {\n    url: 'https://localhost/module-c.js',\n    name: 'module-c',\n  },\n]);\n\n// get module info registered by API registerModules\nconst moduleInfo = getModules();\n\nconst App = () => {\n  // after registerMdoules, use micro module by specify module name\n  return (\n    <div>\n      <MicroModule moduleName=\"module-a\" />\n      <MicroModule moduleName=\"module-b\" />\n      <MicroModule moduleName=\"module-c\" />\n    </div>\n  );\n}\n```\n\n### Registration Merging\n\nIf more than one modules are registered with the same name, only the last one will be kept.\n\n```jsx\nimport { registerModule, registerModules, getModules } from '@ice/stark-module';\n\nregisterModules([\n  {\n    url: 'https://localhost/module-a.js',\n    name: 'module-a',\n  },\n  {\n    url: 'https://localhost/module-b.js',\n    name: 'module-a',\n  },\n]);\n\nconst modules = getModules();\n/** the modules will be:\n[{\n  url: 'https://localhost/module-b.js',\n  name: 'module-a',\n}]\n*/\n\nregisterModule({\n  url: 'https://localhost/module-c.js',\n  name: 'module-a',\n});\n\nconst modules = getModules();\n/** the modules will be:\n[{\n  url: 'https://localhost/module-c.js',\n  name: 'module-a',\n}]\n*/\n```\n\n### Clear Modules\n\n```js\nimport { registerModules, clearModules } from '@ice/stark-module';\n\nregisterModules([\n  {\n    url: 'https://localhost/module-a.js',\n    name: 'module-a',\n  },\n  {\n    url: 'https://localhost/module-b.js',\n    name: 'module-b',\n  },\n]);\n\n// clear all modules information and content cache.\nclearModules();\n```\n\n### Custom Lifecyle\n\n```jsx\nimport { MicroModule } from '@ice/stark-module';\n\nconst App = () => {\n  const moduleInfo = {\n    name: 'moduleName',\n    url: 'https://localhost/module.js',\n    mount: (ModuleComponent, mountNode) => {\n      console.log('custom mount');\n      ReactDOM.render(<ModuleComponent />, mountNode);\n    },\n  }\n  return <MicroModule moduleInfo={moduleInfo} />;\n}\n```\n\n### Custom mount component\n\n```jsx\nimport { mountModule, unmoutModule } from '@ice/stark-module';\n\nconst moduleInfo = {\n  name: 'moduleName',\n  url: 'https://localhost/module.js',\n};\n\nconst ModuleComponent = () => {\n  const renderNode = useRef(null);\n  useEffect(() => {\n    mountModule(moduleInfo, renderNode, {});\n    return () => {\n      unmoutModule(moduleInfo, renderNode);\n    }\n  }, []);\n  return (<div ref={renderNode}></div>);\n};\n```\n\n### Register Local Modules\n\nIn some scenarios, it is necessary to support the built-in components. In this case, one can use `render` property to render a local module.\n\n```jsx\nimport LocalComponent from './localComponent';\n\nregisterModules([{\n  name: 'moduleName',\n  render: () => LocalComponent,\n}]);\n\nconst App = () => {\n  return (\n    <div>\n      <MicroModule moduleName=\"moduleName\" />\n    </div>\n  );\n}\n```\n\n## Contributors\n\nFeel free to report any questions as an [issue](https://github.com/ice-lab/icestark/issues/new), we'd love to have your helping hand on `icestark`.\n\nIf you're interested in `icestark`, see [CONTRIBUTING.md](https://github.com/alibaba/ice/blob/master/.github/CONTRIBUTING.md) for more information to learn how to get started.\n\n## License\n\n[MIT](LICENSE)","gitHead":"8e1ce9909f777ed02e836323ad04c6c1e5c274db","scripts":{"lint":"pnpm eslint --ext .js,.jsx,.ts,.tsx ./","test":"NODE_ENV=unittest pnpm jest","build":"rm -rf lib && tsc","watch":"tsc -w","prepublishOnly":"pnpm run-s lint test build"},"_npmUser":{"name":"clarkxia","email":"xiawenwu41@gmail.com"},"repository":{"url":"git+https://github.com/ice-lab/icestark.git","type":"git"},"_npmVersion":"8.19.4","description":"toolkit for load standard micro-module","directories":{},"_nodeVersion":"18.19.0","dependencies":{"@ice/sandbox":"^1.1.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"react":"^16.13.1","react-dom":"^16.13.1","typescript":"^4.3.5","@types/react":"^16.0.0","@types/react-dom":"^16.0.0"},"peerDependencies":{"react":">=15.0.0","react-dom":">=15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/stark-module_1.5.1-8_1710214728647_0.2722547133345241","host":"s3://npm-registry-packages"}},"1.5.1-9":{"name":"@ice/stark-module","version":"1.5.1-9","keywords":["modules","icestark"],"author":"","license":"MIT","_id":"@ice/stark-module@1.5.1-9","maintainers":[{"name":"linbudu","email":"linbudu599@gmail.com"},{"name":"answershuto","email":"answershuto@gmail.com"},{"name":"chenjun1011","email":"chenjun1011@gmail.com"},{"name":"luhengchang228","email":"luhengchang228@126.com"},{"name":"sobear","email":"sobear.me@gmail.com"},{"name":"clarkxia","email":"xiawenwu41@gmail.com"},{"name":"rax-publisher","email":"rax-public@alibaba-inc.com"}],"homepage":"https://github.com/ice-lab/icestark#readme","bugs":{"url":"https://github.com/ice-lab/icestark/issues"},"dist":{"shasum":"787614183e74a7db04c712eb89e70939be35ea10","tarball":"https://registry.npmjs.org/@ice/stark-module/-/stark-module-1.5.1-9.tgz","fileCount":22,"integrity":"sha512-NhzKBAylHrBsD+gHOjAWjP+Xfpm9z4KBXUiSQpUzRLE9Vf9qcg8GZDvbjyBCMeRPyh6Dat8fsBS2uoL1j+JHQA==","signatures":[{"sig":"MEUCIDSKC6H83i9QEhF28JZ2FTYs2jBB0EQfWBdpKVNnh5EbAiEA9xRHSZdh0MPoG8Cjp9BacTI7vgDq11M3mPw39O0hiQY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":60213},"jest":{"preset":"ts-jest","automock":false,"testMatch":["**/__tests__/**/*.ts?(x)","**/?(*.)+(spec|test).ts?(x)"],"setupFiles":["../../setupJest.ts"],"collectCoverage":true,"coverageDirectory":"./coverage/"},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# @ice/stark-module\n\n[![NPM version](https://img.shields.io/npm/v/@ice/stark-module.svg?style=flat)](https://npmjs.org/package/@ice/stark-module) [![Package Quality](https://npm.packagequality.com/shield/@ice%2Fstark-module.svg)](https://packagequality.com/#?package=@ice%2Fstark-module) [![build status](https://img.shields.io/travis/ice-lab/icestark.svg?style=flat-square)](https://travis-ci.org/ice-lab/icestark) [![Test coverage](https://img.shields.io/codecov/c/github/ice-lab/icestark.svg?style=flat-square)](https://codecov.io/gh/ice-lab/icestark) [![NPM downloads](http://img.shields.io/npm/dm/@ice/stark-module.svg?style=flat)](https://npmjs.org/package/@ice/stark-module) [![David deps](https://img.shields.io/david/ice-lab/icestark.svg?style=flat-square)](https://david-dm.org/ice-lab/icestark)\n\n## Installation\n\n```bash\n$ npm install @ice/stark-module --save\n```\n\n## Module LifeCycle\n\nspecify module lifeCycle when pack code as a micro module\n\n```js\nconst SampleComponent = () => {\n  return <div>Sample</div>;\n}\n\n// mount function will be trigger when mount micro module\nexport function mount(ModuleComponent, targetNode, props) {\n  ReactDOM.render(<ModuleComponent {...props} />, targetNode);\n}\n\n// unmount function will be trigger when unmount micro module\nexport function unmount(targetNode) {\n  ReactDOM.unmountComponentAtNode(targetNode);\n}\n\nexport default SampleComponent;\n```\n\n> pack module with module spec UMD\n\n## Usage\n\n### Basic Usage\n\n```jsx\nimport { MicroModule } from '@ice/stark-module';\n\nconst App = () => {\n  const moduleInfo = {\n    name: 'moduleName',\n    url: 'https://localhost/module.js',\n  }\n  return <MicroModule moduleInfo={moduleInfo} />;\n}\n```\n\n### Register Modules\n\n```jsx\nimport { MicroModule, registerModule, registerModules, getModules } from '@ice/stark-module';\n\n// register single module\nregisterModule({\n  url: 'https://localhost/module-a.js',\n  name: 'module-a',\n});\n\n// register multiple modules at once\nregisterModules([\n  {\n    url: 'https://localhost/module-b.js',\n    name: 'module-b',\n  },\n  {\n    url: 'https://localhost/module-c.js',\n    name: 'module-c',\n  },\n]);\n\n// get module info registered by API registerModules\nconst moduleInfo = getModules();\n\nconst App = () => {\n  // after registerMdoules, use micro module by specify module name\n  return (\n    <div>\n      <MicroModule moduleName=\"module-a\" />\n      <MicroModule moduleName=\"module-b\" />\n      <MicroModule moduleName=\"module-c\" />\n    </div>\n  );\n}\n```\n\n### Registration Merging\n\nIf more than one modules are registered with the same name, only the last one will be kept.\n\n```jsx\nimport { registerModule, registerModules, getModules } from '@ice/stark-module';\n\nregisterModules([\n  {\n    url: 'https://localhost/module-a.js',\n    name: 'module-a',\n  },\n  {\n    url: 'https://localhost/module-b.js',\n    name: 'module-a',\n  },\n]);\n\nconst modules = getModules();\n/** the modules will be:\n[{\n  url: 'https://localhost/module-b.js',\n  name: 'module-a',\n}]\n*/\n\nregisterModule({\n  url: 'https://localhost/module-c.js',\n  name: 'module-a',\n});\n\nconst modules = getModules();\n/** the modules will be:\n[{\n  url: 'https://localhost/module-c.js',\n  name: 'module-a',\n}]\n*/\n```\n\n### Clear Modules\n\n```js\nimport { registerModules, clearModules } from '@ice/stark-module';\n\nregisterModules([\n  {\n    url: 'https://localhost/module-a.js',\n    name: 'module-a',\n  },\n  {\n    url: 'https://localhost/module-b.js',\n    name: 'module-b',\n  },\n]);\n\n// clear all modules information and content cache.\nclearModules();\n```\n\n### Custom Lifecyle\n\n```jsx\nimport { MicroModule } from '@ice/stark-module';\n\nconst App = () => {\n  const moduleInfo = {\n    name: 'moduleName',\n    url: 'https://localhost/module.js',\n    mount: (ModuleComponent, mountNode) => {\n      console.log('custom mount');\n      ReactDOM.render(<ModuleComponent />, mountNode);\n    },\n  }\n  return <MicroModule moduleInfo={moduleInfo} />;\n}\n```\n\n### Custom mount component\n\n```jsx\nimport { mountModule, unmoutModule } from '@ice/stark-module';\n\nconst moduleInfo = {\n  name: 'moduleName',\n  url: 'https://localhost/module.js',\n};\n\nconst ModuleComponent = () => {\n  const renderNode = useRef(null);\n  useEffect(() => {\n    mountModule(moduleInfo, renderNode, {});\n    return () => {\n      unmoutModule(moduleInfo, renderNode);\n    }\n  }, []);\n  return (<div ref={renderNode}></div>);\n};\n```\n\n### Register Local Modules\n\nIn some scenarios, it is necessary to support the built-in components. In this case, one can use `render` property to render a local module.\n\n```jsx\nimport LocalComponent from './localComponent';\n\nregisterModules([{\n  name: 'moduleName',\n  render: () => LocalComponent,\n}]);\n\nconst App = () => {\n  return (\n    <div>\n      <MicroModule moduleName=\"moduleName\" />\n    </div>\n  );\n}\n```\n\n## Contributors\n\nFeel free to report any questions as an [issue](https://github.com/ice-lab/icestark/issues/new), we'd love to have your helping hand on `icestark`.\n\nIf you're interested in `icestark`, see [CONTRIBUTING.md](https://github.com/alibaba/ice/blob/master/.github/CONTRIBUTING.md) for more information to learn how to get started.\n\n## License\n\n[MIT](LICENSE)","gitHead":"8e1ce9909f777ed02e836323ad04c6c1e5c274db","scripts":{"lint":"pnpm eslint --ext .js,.jsx,.ts,.tsx ./","test":"NODE_ENV=unittest pnpm jest","build":"rm -rf lib && tsc","watch":"tsc -w","prepublishOnly":"pnpm run-s lint test build"},"_npmUser":{"name":"clarkxia","email":"xiawenwu41@gmail.com"},"repository":{"url":"git+https://github.com/ice-lab/icestark.git","type":"git"},"_npmVersion":"8.19.4","description":"toolkit for load standard micro-module","directories":{},"_nodeVersion":"18.19.0","dependencies":{"@ice/sandbox":"^1.1.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"react":"^16.13.1","react-dom":"^16.13.1","typescript":"^4.3.5","@types/react":"^16.0.0","@types/react-dom":"^16.0.0"},"peerDependencies":{"react":">=15.0.0","react-dom":">=15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/stark-module_1.5.1-9_1710214858478_0.724007778195813","host":"s3://npm-registry-packages"}},"1.5.1-10":{"name":"@ice/stark-module","version":"1.5.1-10","keywords":["modules","icestark"],"author":"","license":"MIT","_id":"@ice/stark-module@1.5.1-10","maintainers":[{"name":"linbudu","email":"linbudu599@gmail.com"},{"name":"answershuto","email":"answershuto@gmail.com"},{"name":"chenjun1011","email":"chenjun1011@gmail.com"},{"name":"luhengchang228","email":"luhengchang228@126.com"},{"name":"sobear","email":"sobear.me@gmail.com"},{"name":"clarkxia","email":"xiawenwu41@gmail.com"},{"name":"rax-publisher","email":"rax-public@alibaba-inc.com"}],"homepage":"https://github.com/ice-lab/icestark#readme","bugs":{"url":"https://github.com/ice-lab/icestark/issues"},"dist":{"shasum":"439332f66ae62767c34d483855c2b3eb8550e025","tarball":"https://registry.npmjs.org/@ice/stark-module/-/stark-module-1.5.1-10.tgz","fileCount":18,"integrity":"sha512-iE5tXzj2vMiNVwB33SKJDJbbgvWo2VOX0lq10U2HYmox0tb0doxgWYll74d1kwMYMop044BpZZQauOd5Mu0N1Q==","signatures":[{"sig":"MEUCICXrQexhw0QoUiyqKxDMmHKqdwT9kyj2eJk6pOghb3XYAiEAgYKbhv+kyBe95f/AL49qB42D1OdQc8aEM+6Dz+DQFMc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":53587},"jest":{"preset":"ts-jest","automock":false,"testMatch":["**/__tests__/**/*.ts?(x)","**/?(*.)+(spec|test).ts?(x)"],"setupFiles":["../../setupJest.ts"],"collectCoverage":true,"coverageDirectory":"./coverage/"},"main":"lib/index.js","types":"./lib/index.d.ts","readme":"# @ice/stark-module\n\n[![NPM version](https://img.shields.io/npm/v/@ice/stark-module.svg?style=flat)](https://npmjs.org/package/@ice/stark-module) [![Package Quality](https://npm.packagequality.com/shield/@ice%2Fstark-module.svg)](https://packagequality.com/#?package=@ice%2Fstark-module) [![build status](https://img.shields.io/travis/ice-lab/icestark.svg?style=flat-square)](https://travis-ci.org/ice-lab/icestark) [![Test coverage](https://img.shields.io/codecov/c/github/ice-lab/icestark.svg?style=flat-square)](https://codecov.io/gh/ice-lab/icestark) [![NPM downloads](http://img.shields.io/npm/dm/@ice/stark-module.svg?style=flat)](https://npmjs.org/package/@ice/stark-module) [![David deps](https://img.shields.io/david/ice-lab/icestark.svg?style=flat-square)](https://david-dm.org/ice-lab/icestark)\n\n## Installation\n\n```bash\n$ npm install @ice/stark-module --save\n```\n\n## Module LifeCycle\n\nspecify module lifeCycle when pack code as a micro module\n\n```js\nconst SampleComponent = () => {\n  return <div>Sample</div>;\n}\n\n// mount function will be trigger when mount micro module\nexport function mount(ModuleComponent, targetNode, props) {\n  ReactDOM.render(<ModuleComponent {...props} />, targetNode);\n}\n\n// unmount function will be trigger when unmount micro module\nexport function unmount(targetNode) {\n  ReactDOM.unmountComponentAtNode(targetNode);\n}\n\nexport default SampleComponent;\n```\n\n> pack module with module spec UMD\n\n## Usage\n\n### Basic Usage\n\n```jsx\nimport { MicroModule } from '@ice/stark-module';\n\nconst App = () => {\n  const moduleInfo = {\n    name: 'moduleName',\n    url: 'https://localhost/module.js',\n  }\n  return <MicroModule moduleInfo={moduleInfo} />;\n}\n```\n\n### Register Modules\n\n```jsx\nimport { MicroModule, registerModule, registerModules, getModules } from '@ice/stark-module';\n\n// register single module\nregisterModule({\n  url: 'https://localhost/module-a.js',\n  name: 'module-a',\n});\n\n// register multiple modules at once\nregisterModules([\n  {\n    url: 'https://localhost/module-b.js',\n    name: 'module-b',\n  },\n  {\n    url: 'https://localhost/module-c.js',\n    name: 'module-c',\n  },\n]);\n\n// get module info registered by API registerModules\nconst moduleInfo = getModules();\n\nconst App = () => {\n  // after registerMdoules, use micro module by specify module name\n  return (\n    <div>\n      <MicroModule moduleName=\"module-a\" />\n      <MicroModule moduleName=\"module-b\" />\n      <MicroModule moduleName=\"module-c\" />\n    </div>\n  );\n}\n```\n\n### Registration Merging\n\nIf more than one modules are registered with the same name, only the last one will be kept.\n\n```jsx\nimport { registerModule, registerModules, getModules } from '@ice/stark-module';\n\nregisterModules([\n  {\n    url: 'https://localhost/module-a.js',\n    name: 'module-a',\n  },\n  {\n    url: 'https://localhost/module-b.js',\n    name: 'module-a',\n  },\n]);\n\nconst modules = getModules();\n/** the modules will be:\n[{\n  url: 'https://localhost/module-b.js',\n  name: 'module-a',\n}]\n*/\n\nregisterModule({\n  url: 'https://localhost/module-c.js',\n  name: 'module-a',\n});\n\nconst modules = getModules();\n/** the modules will be:\n[{\n  url: 'https://localhost/module-c.js',\n  name: 'module-a',\n}]\n*/\n```\n\n### Clear Modules\n\n```js\nimport { registerModules, clearModules } from '@ice/stark-module';\n\nregisterModules([\n  {\n    url: 'https://localhost/module-a.js',\n    name: 'module-a',\n  },\n  {\n    url: 'https://localhost/module-b.js',\n    name: 'module-b',\n  },\n]);\n\n// clear all modules information and content cache.\nclearModules();\n```\n\n### Custom Lifecyle\n\n```jsx\nimport { MicroModule } from '@ice/stark-module';\n\nconst App = () => {\n  const moduleInfo = {\n    name: 'moduleName',\n    url: 'https://localhost/module.js',\n    mount: (ModuleComponent, mountNode) => {\n      console.log('custom mount');\n      ReactDOM.render(<ModuleComponent />, mountNode);\n    },\n  }\n  return <MicroModule moduleInfo={moduleInfo} />;\n}\n```\n\n### Custom mount component\n\n```jsx\nimport { mountModule, unmoutModule } from '@ice/stark-module';\n\nconst moduleInfo = {\n  name: 'moduleName',\n  url: 'https://localhost/module.js',\n};\n\nconst ModuleComponent = () => {\n  const renderNode = useRef(null);\n  useEffect(() => {\n    mountModule(moduleInfo, renderNode, {});\n    return () => {\n      unmoutModule(moduleInfo, renderNode);\n    }\n  }, []);\n  return (<div ref={renderNode}></div>);\n};\n```\n\n### Register Local Modules\n\nIn some scenarios, it is necessary to support the built-in components. In this case, one can use `render` property to render a local module.\n\n```jsx\nimport LocalComponent from './localComponent';\n\nregisterModules([{\n  name: 'moduleName',\n  render: () => LocalComponent,\n}]);\n\nconst App = () => {\n  return (\n    <div>\n      <MicroModule moduleName=\"moduleName\" />\n    </div>\n  );\n}\n```\n\n## Contributors\n\nFeel free to report any questions as an [issue](https://github.com/ice-lab/icestark/issues/new), we'd love to have your helping hand on `icestark`.\n\nIf you're interested in `icestark`, see [CONTRIBUTING.md](https://github.com/alibaba/ice/blob/master/.github/CONTRIBUTING.md) for more information to learn how to get started.\n\n## License\n\n[MIT](LICENSE)","gitHead":"e8f45b2a83d01926edb96543f6f6b0991a2650d3","scripts":{"lint":"pnpm eslint --ext .js,.jsx,.ts,.tsx ./","test":"NODE_ENV=unittest pnpm jest","build":"rm -rf lib && tsc","watch":"tsc -w"},"_npmUser":{"name":"clarkxia","email":"xiawenwu41@gmail.com"},"repository":{"url":"git+https://github.com/ice-lab/icestark.git","type":"git"},"_npmVersion":"8.19.4","description":"toolkit for load standard micro-module","directories":{},"_nodeVersion":"18.19.0","dependencies":{"@ice/sandbox":"^1.1.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"react":"^16.13.1","react-dom":"^16.13.1","typescript":"^4.3.5","@types/react":"^16.0.0","@types/react-dom":"^16.0.0"},"peerDependencies":{"react":">=15.0.0","react-dom":">=15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/stark-module_1.5.1-10_1712742935640_0.36899837015322956","host":"s3://npm-registry-packages"}}},"time":{"created":"2020-01-13T13:18:42.441Z","modified":"2026-01-06T10:12:17.675Z","0.1.0":"2020-01-13T13:18:42.792Z","0.1.1":"2020-01-15T10:21:59.066Z","1.0.0-0":"2020-04-20T07:44:33.242Z","1.0.0-1":"2020-04-22T06:39:08.463Z","1.0.0-2":"2020-04-29T02:14:15.661Z","1.0.0-3":"2020-04-29T03:42:49.195Z","1.0.0-4":"2020-04-29T05:14:12.026Z","1.0.0":"2020-04-29T05:33:35.861Z","1.0.1":"2020-04-29T05:41:02.319Z","1.0.2-0":"2020-05-07T03:22:15.975Z","1.0.2-1":"2020-05-08T06:40:34.103Z","1.1.0-0":"2020-05-14T05:28:21.575Z","1.1.0-1":"2020-05-14T05:42:48.455Z","1.1.0":"2020-05-14T05:57:21.186Z","1.1.1-0":"2020-05-19T08:47:52.994Z","1.1.1":"2020-06-09T08:38:52.260Z","1.1.2-0":"2020-08-24T06:15:30.435Z","1.1.2":"2020-09-17T03:21:44.038Z","1.2.0-0":"2020-11-09T06:11:54.040Z","1.2.0-1":"2020-11-17T06:13:05.332Z","1.2.0":"2020-12-14T09:52:50.227Z","1.3.0-0":"2021-02-05T02:34:37.906Z","1.3.0-1":"2021-02-22T13:49:10.434Z","1.3.0-2":"2021-02-23T03:12:18.418Z","1.3.0-3":"2021-02-23T13:10:31.272Z","1.3.0-4":"2021-02-24T03:43:12.951Z","1.3.0":"2021-02-25T07:46:49.744Z","1.3.1-0":"2021-03-01T08:31:41.083Z","1.3.1-1":"2021-03-10T11:07:46.820Z","1.3.1":"2021-03-11T08:09:23.453Z","1.4.0-0":"2021-03-12T04:08:09.325Z","1.3.2-0":"2021-03-17T03:20:29.587Z","1.4.0-1":"2021-03-23T12:52:18.325Z","1.4.0":"2021-03-25T09:47:09.015Z","1.4.1":"2021-05-20T07:34:44.112Z","1.4.2-0":"2021-07-07T12:10:16.480Z","1.4.2":"2021-08-13T03:30:01.541Z","1.4.3-0":"2021-08-23T12:24:30.888Z","1.4.3-1":"2021-09-01T03:45:22.718Z","1.4.3-2":"2021-09-03T06:16:05.757Z","1.4.3-3":"2021-09-03T06:19:23.061Z","1.4.3-4":"2021-09-08T09:46:56.737Z","1.4.3":"2021-09-23T10:01:39.863Z","1.5.0-0":"2021-12-07T06:49:55.795Z","1.4.4-0":"2021-12-10T04:07:04.871Z","1.5.1-0":"2021-12-23T02:40:52.490Z","1.5.0-1":"2021-12-23T03:22:08.176Z","1.4.5-0":"2021-12-23T07:05:31.622Z","1.5.0":"2021-12-23T07:16:44.228Z","1.4.5-1":"2021-12-28T13:02:54.415Z","1.5.1-1":"2022-01-05T07:34:34.029Z","1.5.1-2":"2022-01-21T08:50:30.370Z","1.5.1-3":"2022-02-21T06:37:38.025Z","1.5.1-4":"2022-03-17T05:42:03.742Z","1.5.1-5":"2022-05-31T03:12:36.235Z","1.6.0-1":"2022-07-20T09:31:22.012Z","1.5.2-1":"2022-09-05T03:53:06.886Z","1.6.0-2":"2023-01-09T02:27:12.405Z","1.6.0-3":"2023-02-28T11:05:09.386Z","1.5.1-6":"2023-05-30T07:36:53.358Z","1.5.1-7":"2023-05-30T11:25:01.868Z","1.5.1-8":"2024-03-12T03:38:48.830Z","1.5.1-9":"2024-03-12T03:40:58.621Z","1.5.1-10":"2024-04-10T09:55:35.811Z"},"bugs":{"url":"https://github.com/ice-lab/icestark/issues"},"license":"MIT","homepage":"https://github.com/ice-lab/icestark#readme","keywords":["modules","icestark"],"repository":{"url":"git+https://github.com/ice-lab/icestark.git","type":"git"},"description":"toolkit for load standard micro-module","maintainers":[{"email":"answershuto@gmail.com","name":"answershuto"},{"email":"chenjun1011@gmail.com","name":"chenjun1011"},{"email":"xiawenwu41@gmail.com","name":"clarkxia"},{"email":"rax-public@alibaba-inc.com","name":"rax-publisher"},{"email":"mrgitservice@outlook.com","name":"xkeith"}],"readme":"","readmeFilename":""}