Skip to content

Commit 4b7b017

Browse files
committed
fix: fixed module resolution in ts
1 parent 3a01616 commit 4b7b017

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"name": "@bomdi/codebox",
3-
"version": "1.0.10",
2+
"name": "@hackdoor/codebox",
3+
"version": "1.0.11",
44
"license": "ISC",
55
"description": "Code syntax highlighting tool for Editor.js",
66
"keywords": [

src/index.ts

+2-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @author - Adombang Munang Mbomndih (Bomdi) <[email protected]> (https://bomdisoft.com)
88
*/
99

10-
import rangy from 'rangy'
10+
import rangy from 'rangy/lib/rangy-core.js'
1111
import 'rangy/lib/rangy-textrange.js'
1212
import 'rangy/lib/rangy-selectionsaverestore.js'
1313

@@ -109,7 +109,7 @@ export default class CodeBox {
109109
return Object.assign(this.data, { code: this.codeArea.innerHTML, theme: this._getThemeURLFromConfig() });
110110
}
111111

112-
validate(){
112+
validate(savedData){
113113
if (!savedData.code.trim()) return false;
114114
return true;
115115
}
@@ -157,7 +157,6 @@ export default class CodeBox {
157157

158158
_highlightCodeArea(event){
159159
const savedSel = rangy.saveSelection();
160-
console.log(rangy)
161160
hljs.highlightBlock(this.codeArea);
162161
rangy.restoreSelection(savedSel);
163162
}

tsconfig.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"esModuleInterop": true,
1414
"skipLibCheck": true,
1515
"forceConsistentCasingInFileNames": true,
16-
"preserveSymlinks": true
16+
"preserveSymlinks": true,
17+
"moduleResolution": "node"
1718
}
1819
}

0 commit comments

Comments
 (0)