Merge branch 'main-44133d0c9' into pms-dev
This commit is contained in:
commit
33f38f42cc
|
@ -63,7 +63,11 @@ const vueFilePathPlugin = (outputFilePath) => {
|
||||||
return html.replace(
|
return html.replace(
|
||||||
'</body>',
|
'</body>',
|
||||||
`<script>
|
`<script>
|
||||||
|
const isWindowActive = () => !document.hidden;
|
||||||
window.addEventListener('beforeunload', function () {
|
window.addEventListener('beforeunload', function () {
|
||||||
|
if (!isWindowActive()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
fetch('/generate-path-name-map');
|
fetch('/generate-path-name-map');
|
||||||
});
|
});
|
||||||
</script></body>`
|
</script></body>`
|
||||||
|
@ -97,4 +101,4 @@ const vueFilePathPlugin = (outputFilePath) => {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
export default vueFilePathPlugin
|
export default vueFilePathPlugin
|
||||||
|
|
Loading…
Reference in New Issue