mirror of
https://github.com/bellard/quickjs.git
synced 2025-09-30 15:04:24 +03:00
support JSON modules in qjsc - added support of JSON5 modules (using type = "json5")
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
/* example of JS module */
|
||||
/* example of JS and JSON modules */
|
||||
|
||||
import { fib } from "./fib_module.js";
|
||||
import msg from "./message.json";
|
||||
|
||||
console.log("Hello World");
|
||||
console.log("fib(10)=", fib(10));
|
||||
console.log("msg=", msg);
|
||||
|
2
examples/message.json
Normal file
2
examples/message.json
Normal file
@@ -0,0 +1,2 @@
|
||||
{ "x" : 1, "tab": [ 1, 2, 3 ] }
|
||||
|
Reference in New Issue
Block a user