Open
Description
What happened?
The sample code:
import {loadStripe} from '@stripe/stripe-js/pure';
attempts to import a directory, which is not valid in ESM. The import needs to reference @stripe/stripe-js/pure/index.js
or @stripe/stripe-js/pure/index.mjs
to work in a true ESM environment.
Note also that the file @stripe/stripe-js/pure/index.mjs
is invalid in ESM too because it attempts to import a file without an extension which is not allowed in ESM: export * from '../dist/pure';
importing '@stripe/stripe-js/pure/index.js'
does work currently, although node is importing the CJS module and handling the conversion to the ESM environment (this is mostly fine, but perhaps it won't allow treeshaking during bundling).
Environment
Windows
Activity