- 如何载入已经运行的线上项目, 以下方式无法实现载入?
<script type="systemjs-importmap">
{
"imports": {
"@portal/payroll": "http://192.168.3.184:9999/#/"
}
}
</script>
- 异常信息如下:
VM6614:1 Uncaught SyntaxError: Unexpected token '<'
VM6598 single-spa.config.js:830 The loading function for single-spa application 'payroll' resolved with the following, which does not have bootstrap, mount, and unmount functions ƒ () {
(e[i].q = e[i].q || []).push(arguments)
}
(anonymous) @ VM6598 single-spa.config.js:830
Promise.then (async)
(anonymous) @ VM6598 single-spa.config.js:830
Promise.then (async)
(anonymous) @ VM6598 single-spa.config.js:830
Promise.then (async)
at @ VM6598 single-spa.config.js:830
(anonymous) @ VM6598 single-spa.config.js:830
Promise.then (async)
qt @ VM6598 single-spa.config.js:830
xt @ VM6598 single-spa.config.js:830
./single-spa.config.js @ VM6598 single-spa.config.js:970
__webpack_require__ @ VM6598 single-spa.config.js:710
(anonymous) @ VM6598 single-spa.config.js:762
(anonymous) @ VM6598 single-spa.config.js:765
VM6598 single-spa.config.js:981 payroll: Application 'payroll' died in status LOADING_SOURCE_CODE: "does not export an unmount function or array of functions"
at v (http://localhost:3000/dist/single-spa.config.js:830:4731)
at m (http://localhost:3000/dist/single-spa.config.js:830:3977)
at http://localhost:3000/dist/single-spa.config.js:830:13725
at async Promise.all (index 0)