mirror of
https://github.com/denoland/deno.git
synced 2025-08-03 10:33:54 +00:00
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).
This commit is contained in:
parent
8171b761c2
commit
bb3e918f4a
37 changed files with 217 additions and 226 deletions
|
@ -1707,7 +1707,6 @@ mod tests {
|
|||
documents: Arc::new(documents),
|
||||
assets: Default::default(),
|
||||
config: Arc::new(config),
|
||||
is_cjs_resolver: Default::default(),
|
||||
resolver,
|
||||
},
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue