mirror of
https://github.com/denoland/deno.git
synced 2024-11-24 15:19:26 -05:00
parent
7f3747f2ef
commit
ae6a2b23ba
4 changed files with 13 additions and 1 deletions
|
@ -552,7 +552,8 @@ impl CliMainWorkerFactory {
|
|||
.await?;
|
||||
self.shared.cjs_resolution_store.is_known_cjs(&main_module)
|
||||
} else {
|
||||
specifier_has_extension(&main_module, "cjs")
|
||||
main_module.scheme() == "file"
|
||||
&& specifier_has_extension(&main_module, "cjs")
|
||||
};
|
||||
(main_module, is_cjs)
|
||||
};
|
||||
|
|
5
tests/specs/run/remote_cjs_main/__test__.jsonc
Normal file
5
tests/specs/run/remote_cjs_main/__test__.jsonc
Normal file
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"args": "run http://localhost:4545/run/add.cjs",
|
||||
"output": "output.out",
|
||||
"exitCode": 1
|
||||
}
|
3
tests/specs/run/remote_cjs_main/output.out
Normal file
3
tests/specs/run/remote_cjs_main/output.out
Normal file
|
@ -0,0 +1,3 @@
|
|||
Download http://localhost:4545/run/add.cjs
|
||||
error: Expected a JavaScript or TypeScript module, but identified a Cjs module. Importing these types of modules is currently not supported.
|
||||
Specifier: http://localhost:4545/run/add.cjs
|
3
tests/testdata/run/add.cjs
vendored
Normal file
3
tests/testdata/run/add.cjs
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
module.exports.add = function (a, b) {
|
||||
return a + b;
|
||||
};
|
Loading…
Reference in a new issue