Closed
Description
Describe the bug
I'm trying to use this package. even though I import it after highlight.js
, it keeps throwing highlight.js not detected!
To Reproduce
Steps to reproduce the behavior:
First of all I'm using Webpack with this config:
const path = require("path");
module.exports = {
devtool: "source-map",
entry: path.join(__dirname, "js/index.js"),
output: {
filename: "bundle.js",
path: path.join(__dirname, "../public/js"),
},
watch: true,
mode: "development",
};
I installed highlight.js
and highlightjs-line-numbers.js
using npm.
I imported them this way (using es6 import/export):
import hljs from "highlight.js";
import "highlightjs-line-numbers.js";
hljs.initHighlightingOnLoad();
hljs.initLineNumbersOnLoad();
I also tried to import highlight.js
this way. still throws the same error
import "highlight.js";
Expected behavior
To detect highlight.js
Desktop (please complete the following information):
- OS: Ubuntu 20.04
- Browser firefox
- Version 76.0.1 (64-bit)
webpack version: 4.44.1
highlight.js version: 10.2.1
highlightjs-line-numbers.js version: 2.8.0
Metadata
Metadata
Assignees
Labels
No labels