From f091d1ad69b4e5217ae3272b641171781a372c4f Mon Sep 17 00:00:00 2001 From: David Sherret Date: Wed, 13 Nov 2024 10:10:09 -0500 Subject: feat(node): stabilize detecting if CJS via `"type": "commonjs"` in a package.json (#26439) This will respect `"type": "commonjs"` in a package.json to determine if `.js`/`.jsx`/`.ts`/.tsx` files are CJS or ESM. If the file is found to be ESM it will be loaded as ESM though. --- tests/specs/run/import_common_js/a.js | 7 ------- 1 file changed, 7 deletions(-) delete mode 100644 tests/specs/run/import_common_js/a.js (limited to 'tests/specs/run/import_common_js/a.js') diff --git a/tests/specs/run/import_common_js/a.js b/tests/specs/run/import_common_js/a.js deleted file mode 100644 index c465ab588..000000000 --- a/tests/specs/run/import_common_js/a.js +++ /dev/null @@ -1,7 +0,0 @@ -function foobar() { - console.log("foobar"); -} - -module.exports = { - foobar, -}; -- cgit v1.2.3