Skip to content

Commit 39e89be

Browse files
⚡ Fixed to import by require
1 parent 161be72 commit 39e89be

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

src/index.all.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
import hljs from 'highlight.js';
21
import CustomElementConstructor from './class/HTMLCodeBlockElement';
32
import {mkHighlightCallback} from './utils/highlight';
43
import './utils/add-style';
54

5+
const hljs = require('highlight.js');
6+
67
CustomElementConstructor.highlight = mkHighlightCallback(hljs);
78
customElements.define('code-block', CustomElementConstructor);
89

src/index.common.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
import hljs from 'highlight.js/lib/common';
21
import CustomElementConstructor from './class/HTMLCodeBlockElement';
32
import {mkHighlightCallback} from './utils/highlight';
43
import './utils/add-style';
54

5+
const hljs = require('highlight.js/lib/common');
6+
67
CustomElementConstructor.highlight = mkHighlightCallback(hljs);
78
customElements.define('code-block', CustomElementConstructor);
89

src/index.core.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
import hljs from 'highlight.js/lib/core';
21
import CustomElementConstructor from './class/HTMLCodeBlockElement';
32
import {mkHighlightCallback} from './utils/highlight';
43
import './utils/add-style';
54

5+
const hljs = require('highlight.js/lib/core');
6+
67
CustomElementConstructor.highlight = mkHighlightCallback(hljs);
78
customElements.define('code-block', CustomElementConstructor);
89

0 commit comments

Comments
 (0)