mlly icon indicating copy to clipboard operation
mlly copied to clipboard

Disallow `/esm/*.js` for `isValidNodeImport`

Open pi0 opened this issue 2 years ago • 0 comments

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.

pi0 avatar Nov 16 '21 12:11 pi0