Closed kota-yata closed 3 years ago
Since Nuxt Universal(SSR/SSG) create page on server side, openFile function failed in Nuxt project
Reference Error : self is not defined
To deal with this error, I added a conditional branch in supported.mjs of in node_modules and it works well.
// @license © 2020 Google LLC. Licensed under the Apache License, Version 2.0. let e; if(process.browser) { e="chooseFileSystemEntries"in self?"chooseFileSystemEntries":"showOpenFilePicker"in self&&"showOpenFilePicker"; } export default e;
I'm going to send PR soon
See https://github.com/GoogleChromeLabs/browser-fs-access/pull/35#issuecomment-787809762 for the rationale for closing this.
Since Nuxt Universal(SSR/SSG) create page on server side, openFile function failed in Nuxt project
To deal with this error, I added a conditional branch in supported.mjs of in node_modules and it works well.
I'm going to send PR soon