After version 10, highlight.js no longer support IE11. See this doc.
Use debug mode to find out features which don't be supported: hljs.debugMode()
.
Use polyfill core-js
to fix IE11.
// v10.4.0
import 'core-js/features/symbol';
import 'core-js/es/array/find-index';
import 'core-js/features/dom-collections/for-each';
Library developers decide to no longer support IE11 and start using some es6 features. See this issue.
Use polyfill core-js
to fix IE11.
// v1.2.5
import 'core-js/es/string/starts-with';
import 'core-js/es/string/ends-with';