TypeStrong / TypeStrong/ts-loader
Syntax error, no try catch block in JSON parsing
Open
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 3.5k
- Forks
- 439
- Avg merge
- 17h 17m
- Merged PRs (30d)
- 2
Description
I get a SyntaxError: Unexpected token _ in JSON at position 0 using webpack and ts-loader when using hot reload with webpack.
As a result although building works, Hot Reload recompilation only does not work.
Also if I set transpileOnly: true, recompile works.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at src/watch-run.ts line 106 and reproduce the reported webpack hot-reload failure with ts-loader. Investigate the JSON parsing path and verify that hot-reload recompilation works for the reported case without affecting normal builds; run any relevant existing checks before confirming the fix.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, webpack
- Domain
- build-system, tooling
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100