We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The current version of Helmet uses module.exports to export everything. Ideally, the next major version could use ECMAScript modules.
module.exports
Ideally, there's a solution that:
import helmet from 'helmet'
const helmet = require('helmet')
require('helmet').default
HelmetOptions
There may be other goals. I think this is achievable now that ES modules have stabilized in Node, but we'll need to do some testing.
The text was updated successfully, but these errors were encountered:
Support ECMAScript modules
483c25d
See [#320][0] and [#340][1]. [0]: #320 [1]: #340
Closed in #340.
Sorry, something went wrong.
485d6b6
No branches or pull requests
The current version of Helmet uses
module.exports
to export everything. Ideally, the next major version could use ECMAScript modules.Ideally, there's a solution that:
import helmet from 'helmet'
in JavaScript and TypeScriptconst helmet = require('helmet')
in JavaScript (thoughrequire('helmet').default
is acceptable)HelmetOptions
type or each middlewareThere may be other goals. I think this is achievable now that ES modules have stabilized in Node, but we'll need to do some testing.
The text was updated successfully, but these errors were encountered: