79233558

Date: 2024-11-28 11:01:43
Score: 1
Natty:
Report link

As mentionned in @keith comment, you should do this since node22:

import packageJson from "./package.json" with { type: "json" };

or for dynamic import:

const { default } = await import('./file.json', {with: {type: 'json' }});
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • User mentioned (1): @keith
Posted by: MathKimRobin