Support ES Module: import fs from 'njs:fs';
@xeioex is already working on this.
Since Dec 12, 2024.
Assessment
This issue has not been assessed yet.
Description
It's possible to import the njs module like this?
import fs from 'njs:fs';
or
import fs from 'nginx:fs';
Describe the solution you'd like
Import all modules that are not web standards but are supported by Nginx.
import fs from 'njs:fs';
import zlib from 'njs:zlib';
...
Describe alternatives you've considered
In other JS runtimes, it is common to import modules using specific prefixes, for example, import path from "node:path".
- Dominant language
- C
- Stars
- 1.6k
- Forks
- 239
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 10
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from nginx/njs
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
-
njs
Difficulty 3/5 1-2 days Newbie friendliness 67/100
-
feature njs
Difficulty 5/5 Over a week Newbie friendliness 30/100
-
feature njs
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
DNS module Openfeature njs
Similar issues
-
[adam] AdamNet network read doesn't cap to MAX_ADAM_PACKET_LEN, overflows client receive buffers Open
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
FujiNetWIFI/fujinet-firmware#1649 · 2 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
HarbourMasters/Shipwright#7229 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
riscv-software-src/riscv-isa-sim#2435 · 1 comment ·
-
bug Self Built Image SNAPSHOT Supported Device target/ramips
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100