mirror of
https://github.com/denoland/deno.git
synced 2024-12-23 07:44:48 -05:00
2bbfef137c
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). |
||
---|---|---|
.. | ||
node_modules/foo | ||
__test__.jsonc | ||
exports_error.js | ||
exports_error.out | ||
index.cjs | ||
index.out | ||
main.out | ||
main.ts | ||
module_error.js | ||
module_error.out | ||
package.json | ||
require_error.js | ||
require_error.out |