mirror of
https://github.com/denoland/deno.git
synced 2025-02-08 15:21:26 -05:00
![David Sherret](/assets/img/avatar_default.png)
When using the `--unstable-detect-cjs` flag or adding `"unstable": ["detect-cjs"]` to a deno.json, it will make a JS file CJS if the closest package.json contains `"type": "commonjs"` and the file is not an ESM module (no TLA, no `import.meta`, no `import`/`export`).
3 lines
57 B
JavaScript
3 lines
57 B
JavaScript
import { add } from "./add.js";
|
|
|
|
console.log(add(1, 2));
|