Skip to content

Commit 5633a60

Browse files
authored
Merge branch 'codemirror' into lsp-codemirror
2 parents 96fb2ad + ead79be commit 5633a60

File tree

2 files changed

+19
-4
lines changed

2 files changed

+19
-4
lines changed

src/lib/editorManager.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1615,6 +1615,7 @@ async function EditorManager($header, $body) {
16151615
* Checks if the cursor is visible within the CodeMirror viewport.
16161616
* @returns {boolean} - True if the cursor is visible, false otherwise.
16171617
*/
1618+
// TODO: Implement cursor visibility check for CodeMirror
16181619
function isCursorVisible() {
16191620
const view = editor;
16201621
const scroller = view?.scrollDOM;

webpack.config.js

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ module.exports = (env, options) => {
3737
];
3838

3939
// if (mode === 'production') {
40-
rules.push({
41-
test: /\.m?js$/,
42-
exclude: /node_modules\/(@codemirror|codemirror|marked)/, // Exclude CodeMirror and marked files from html-tag-js loader
40+
rules.push({
41+
test: /\.m?js$/,
42+
exclude: /node_modules\/(@codemirror|codemirror|marked)/, // Exclude CodeMirror and marked files from html-tag-js loader
4343
use: [
4444
'html-tag-js/jsx/tag-loader.js',
4545
{
@@ -51,6 +51,20 @@ module.exports = (env, options) => {
5151
],
5252
});
5353

54+
// Separate rule for CodeMirror files - only babel-loader, no html-tag-js
55+
rules.push({
56+
test: /\.m?js$/,
57+
include: /node_modules\/(@codemirror|codemirror)/,
58+
use: [
59+
{
60+
loader: 'babel-loader',
61+
options: {
62+
presets: ['@babel/preset-env'],
63+
},
64+
},
65+
],
66+
});
67+
5468
// Separate rule for CodeMirror files - only babel-loader, no html-tag-js
5569
rules.push({
5670
test: /\.m?js$/,
@@ -99,4 +113,4 @@ module.exports = (env, options) => {
99113
};
100114

101115
return [main];
102-
};
116+
};

0 commit comments

Comments
 (0)