tabris-js icon indicating copy to clipboard operation
tabris-js copied to clipboard

fetch() does not work with dot files

Open cpetrov opened this issue 4 years ago • 0 comments

Problem description

Dot files are not found when attempting to fetch() them.

Expected behavior

Dot files should be fetch()-able. A particular use case is reading a .env file in the root of the project (as https://www.npmjs.com/package/dotenv does it).

Environment

  • Tabris.js version: 3.7.1
  • OS: can be reproduced on both Android and iOS

Code snippet

(async () => {
  console.log(await (await fetch('./.env')).text()); // doesn't work
  console.log(await (await fetch('./env')).text()); // works
})().catch(console.error);

cpetrov avatar Jun 21 '21 11:06 cpetrov