[▲ Vercel Community](/) · [Categories](/categories) · [Latest](/latest) · [Top](/top) · [Live](/live)

[Discussions](/c/community/4)

# When will JSON import be supported in Edge Functions?

69 views · 1 like · 4 posts


Ju Yuwol (@juyuwol) · 2025-02-11

I mean, the [import attributes](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import/with) feature.

``` javascript
import data from './file.json` with { type: 'json' };
```

Just curious. Is there any plan?

I'm currently running my build script with Node.js v22 and managing configurations in a JSON file, but it's a bit inconvenient not to have direct access to configurations in Edge Functions.


Anshuman Bhardwaj (@anshumanb) · 2025-02-11

Hi @juyuwol, welcome to the Vercel Community!

> Edge Functions do not have filesystem access due to their ephemeral nature.

Have you considered using https://vercel.com/docs/storage/edge-config, which is perfect for storing function configurations?


Ju Yuwol (@juyuwol) · 2025-02-11

I was just wondering if support was planned.

Anyway, Edge Function can access `.js` javascript files. I can use it even now by adding `export default` in front of the JSON file and changing its extension. So why not just import plain JSON files, like Node.js and recent browsers do? I just assumed, rationally, that Edge Functions would likely support JSON modules at **some point**, so I was curious about the plan.


Anshuman Bhardwaj (@anshumanb) · 2025-02-11 · ♥ 1

Hi @juyuwol, I see your point. Your solution to use `.js` files for configuration is a good one. But, filesystem support is not on the planning. 

You can also look into https://vercel.com/docs/functions/fluid-compute where you can use the file system with Node.js runtime.

I hope this helps.