From bc7a5de462bee76758a56db64d6c8e1e9ba9b9da Mon Sep 17 00:00:00 2001 From: Sam Carlton Date: Tue, 27 Apr 2021 17:01:46 -0500 Subject: [PATCH] Fix fs import errod --- pages/app/_slug/benchmarks.vue | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/pages/app/_slug/benchmarks.vue b/pages/app/_slug/benchmarks.vue index 233d6c2..0a8f007 100644 --- a/pages/app/_slug/benchmarks.vue +++ b/pages/app/_slug/benchmarks.vue @@ -122,11 +122,8 @@ export default { // Manually get payload as fallback if ( payload === undefined ) { - const { promises: fs } = await import('fs') - // Read back the JSON we just wrote to ensure it exists - const savedListJSON = await fs.readFile('./static/nuxt-endpoints.json', 'utf-8') - const savedList = JSON.parse( savedListJSON ) + const { default: savedList } = await import('~/static/nuxt-endpoints.json') const endpoint = savedList.find( resource => { return resource.route === route.path