Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support ES Module: import fs from 'njs:fs'; #828

Open
PassionPI opened this issue Dec 11, 2024 · 1 comment
Open

Support ES Module: import fs from 'njs:fs'; #828

PassionPI opened this issue Dec 11, 2024 · 1 comment
Assignees
Labels

Comments

@PassionPI
Copy link

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".

@xeioex
Copy link
Contributor

xeioex commented Dec 12, 2024

Hi @PassionPI,

No, it is not supported yet. But, it looks like a good improvement. Will do.

@xeioex xeioex self-assigned this Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants