Simplify import with typescript, webpack, angular
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 13k
- Forks
- 1.4k
- Avg merge
- 15h 36m
- Merged PRs (30d)
- 3
Description
I am using the library in a project with Angular and I have not been able to import the library correctly
I understand that the correct way would be to import the autoloader, because the components index.js doesn't work
`import 'prismjs/plugins/autoloader/prism-autoloader';
But the autolader generates urls incorrectly
The only way that has worked for me is to include language by language, but some languages have dependencies and give errors on their inclusion, there are more than 500 files in the language components folder, which makes it very difficult to deal with them one by one.
You could use some webpack plugin to load the components folder, but you would still have to resolve the dpeendency issues.
It should be something easy to include the library, instead there are many unresolved issues from people who couldn't include it.
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 examining prismjs/plugins/autoloader/prism-autoloader and the language components folder to understand how URLs and dependencies are resolved. Define a webpack-compatible import path that works in Angular without adding languages one by one, then verify that the library can load components without dependency errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- angular, javascript, typescript, webpack
- Domain
- build-system, frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100