Minor documentation issue
trazek opened this issue · comments
Andrew Ferguson commented
Reproduction
import { HighlightModule, HIGHLIGHT_OPTIONS } from 'ngx-highlightjs';
@NgModule({
imports: [
HighlightModule
],
providers: [
{
provide: HIGHLIGHT_OPTIONS,
useValue: {
coreLibraryLoader: () => import('highlight.js/lib/core'),
lineNumbersLoader: () => import('highlightjs-line-numbers.js'), // Optional, only if you want the line numbers
languages: {
typescript: () => import('highlight.js/lib/languages/typescript'),
css: () => import('highlight.js/lib/languages/css'),
xml: () => import('highlight.js/lib/languages/xml')
}
}
}
],
})
export class AppModule { }
It appears coreLibraryLoader: () => import('highlight.js/lib/core')
does not exist in node_modules
when downloaded. We had to reference coreLibraryLoader: () => import('highlight.js/lib/highlight')
Murhaf Sousli commented
This depends on the hljs library's version, before it was highlight.js/lib/highlight
. after their last version I had to import it from highlight.js/lib/core
.