diff --git a/src/js/data.ts b/src/js/data.ts index 0a113b02..ae8857ea 100644 --- a/src/js/data.ts +++ b/src/js/data.ts @@ -136,10 +136,9 @@ export function processRawCoreEntry( export default async function readData(options: { includeMultipleReforms: boolean; }): Promise> { - const rawData = (await import("../../data/core.json")) as unknown as Record< - PlaceId, - RawCoreEntry - >; + const rawData = (await import("../../data/core.json", { + with: { type: "json" }, + })) as unknown as Record; return Object.fromEntries( Object.entries(rawData).map(([placeId, entry]) => [ placeId, diff --git a/tsconfig.json b/tsconfig.json index 1fe87c08..82bc8b48 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -3,8 +3,8 @@ "noEmit": true, "allowImportingTsExtensions": true, "incremental": true /* Save .tsbuildinfo files to allow for incremental compilation of projects. */, - "target": "es2020" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */, - "module": "es2022" /* Specify what module code is generated. */, + "target": "ES2022" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */, + "module": "ESNext" /* Specify what module code is generated. */, "moduleResolution": "node" /* Specify how TypeScript looks up a file from a given module specifier. */, "resolveJsonModule": true /* Enable importing .json files. */, "allowSyntheticDefaultImports": true /* Allow 'import x from y' when a module doesn't have a default export. */,