ses
package doesn't define exports for minified the lockdown, making them unreachable in Node/bundlers.
#2169
Labels
bug
Something isn't working
Describe the bug
ses
package includes minified versions of the libraries, but these are impossible to import/require in Node.js, as it only allows importing files defined in thepackage.json
exports
fields. Bundlers that use/follow Node's resolution algorithm are also unable to import the file.Steps to reproduce
Via Node
npm init -y && npm install ses
Run
node lockdown.js
.Output:
Via Bundler (Webpack)
Run
npx -y webpack
.output:
Expected behavior
Users should be able to require/import the pre-minified JavaScript. While bundlers can minimize the export for lockdown that is defined in
ses
'spackage.json
, I worry that aggressive minification/optimizations could alter the behavior in subtle ways that may render lockdown ineffective. Maybe this isn't a valid concern, and if not, I'd love for someone from the team to assuage my fears (note: I'm not worried about a supply chain attack compromising ses in this case)!Platform environment
webpack@5
ses@1.4.0
The text was updated successfully, but these errors were encountered: