Changing asynchronous highlighting
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 13k
- Forks
- 1.4k
- Avg merge
- 15h 36m
- Merged PRs (30d)
- 3
Description
Motivation
We recently had an issue with WebPack and async highlighting. The problem was that our current WebWorker approach assumes that the script file of Prism Core only contains Prism code. This is obviously not the case with WebPack since it tries to bundle dependencies together, so async highlighting caused the worker to crash because the bundle didn't expect to be run in a worker.
It seems like our current async highlighting is incompatible with bundlers.
Async highlighting also has a problem with Autoloader. Since the main Prism instance and the web worker don't share language definitions, the web worker can't do any useful highlighting.
Description
Since we can break some stuff in v2: What do we want to do with async highlighting?
@LeaVerou @mAAdhaTTah @Golmote
Contributor guide
No contributing guide indexed for this repository
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 by reviewing Prism Core’s current async highlighting and WebWorker approach, then compare how Autoloader shares language definitions with the worker under WebPack bundling. The issue is done when a v2 direction is agreed for bundler compatibility and worker language support.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, webpack
- Domain
- frontend, web-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100