deno
2bbfef13 - feat(unstable): repurpose `--unstable-detect-cjs` to attempt loading more modules as cjs (#27094)

Commit
1 year ago
feat(unstable): repurpose `--unstable-detect-cjs` to attempt loading more modules as cjs (#27094) This resurrects the `--unstable-detect-cjs` flag (which became stable), and repurposes it to attempt loading .js/.jsx/.ts/.tsx files as CJS in the following additional scenarios: 1. There is no package.json 1. There is a package.json without a "type" field Also cleans up the implementation of this in the LSP a lot by hanging `resolution_mode()` off `Document` (didn't think about doing that until now).
Author
Parents
Loading