changes
This commit is contained in:
12
app/plugins/05-artificial-delay.js
Normal file
12
app/plugins/05-artificial-delay.js
Normal file
@@ -0,0 +1,12 @@
|
||||
export default defineNuxtPlugin(async () => {
|
||||
const loadTime = performance.now();
|
||||
const minDuration = 2000;
|
||||
|
||||
if (loadTime < minDuration) {
|
||||
await new Promise((r) => setTimeout(r, minDuration - loadTime));
|
||||
}
|
||||
|
||||
// nuxtApp.hook('app:mounted', () => {
|
||||
// console.log('app.mount() completed at', performance.now())
|
||||
// });
|
||||
});
|
||||
Reference in New Issue
Block a user