Skip to content

Commit a1113e0

Browse files
authored
chore: Update dingus.js import json (#3611)
* Update dingus.js import json found a better way to import json that works also with other engines like chrome and graalvm ..... * Update dingus.js Fix: double quote replaced by single quote
1 parent eb61090 commit a1113e0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

api/dingus.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { marked } from '../lib/marked.esm.js';
2-
import { createRequire } from 'node:module';
3-
const require = createRequire(import.meta.url);
4-
const version = require('../package.json').version;
2+
import pkg from '../package.json' with { type: 'json' };
3+
4+
const version = pkg.version;
55
const name = 'Marked';
66

77
export default function dingus(req, res) {

0 commit comments

Comments
 (0)