mlly
mlly copied to clipboard
Disallow `/esm/*.js` for `isValidNodeImport`
Reference: https://github.com/nuxt/framework/pull/1949
Libraries like date-fns
(as of 2.25.0) using this contention leading to native ESM incompatibility (https://unpkg.com/browse/[email protected]/esm/format/)
Using a regex like /\/esm\/.*\.js$/
we can exclude it but we should probably still take type: module
check into account to avoid false-positive detections.