generated from egoist/ts-lib-starter
-
Notifications
You must be signed in to change notification settings - Fork 16
Open
Description
Describe the bug
foo.json:
{
"str": "bar"
}
foo.js:
import foo from './foo.json' with { type: 'json' };
export { foo };
json-import.ts:
import { foo } from './foo.js';
console.log(foo.str);
tsconfig.json:
{
"compilerOptions": {
"target": "ESNext",
"module": "NodeNext",
"moduleResolution": "nodenext",
"resolveJsonModule": true
}
}
The plugin fails with x Expected ';', got 'with'
Reproduction
See above. Will push a PR with failing test
System Info
System:
OS: Windows 10 10.0.19045
CPU: (8) x64 Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz
Memory: 7.19 GB / 31.89 GB
Binaries:
Node: 22.15.0 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.22 - C:\ProgramData\npm\yarn.CMD
npm: 10.9.2 - C:\Program Files\nodejs\npm.CMD
pnpm: 10.11.0 - C:\Program Files\nodejs\pnpm.CMD
Used Package Manager
npm
Validations
- Follow our Code of Conduct
- Read the Contributing Guide.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
- The provided reproduction is a minimal reproducible of the bug.
Metadata
Metadata
Assignees
Labels
No labels