Skip to content

Commit 045fab2

Browse files
committed
Remove DEVELOPMENT flag since it changes Lexical behavior
In development mode, Lexical freezes the selection objects, including _cachedNodes. When your code tried to modify _cachedNodes, it threw: TypeError: Cannot assign to read only property '_cachedNodes' of object '#<_NodeSelection>' Related #507 (comment) Also, always generate source maps
1 parent d6d17e7 commit 045fab2

File tree

5 files changed

+3
-2
lines changed

5 files changed

+3
-2
lines changed

app/assets/javascript/lexxy.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11674,3 +11674,4 @@ function highlightElement(preElement) {
1167411674
}
1167511675

1167611676
export { highlightAll };
11677+
//# sourceMappingURL=lexxy.js.map

app/assets/javascript/lexxy.js.br

-197 Bytes
Binary file not shown.

app/assets/javascript/lexxy.js.gz

26 Bytes
Binary file not shown.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"scripts": {
2626
"build": "rollup -c",
2727
"build:npm": "rollup -c rollup.config.npm.mjs",
28-
"watch": "NODE_ENV=development rollup -wc --watch.onEnd=\"rails restart\"",
28+
"watch": "rollup -wc --watch.onEnd=\"rails restart\"",
2929
"lint": "eslint",
3030
"prerelease": "yarn build:npm",
3131
"release": "yarn build:npm && yarn publish"

rollup.config.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export default [
1717
{
1818
file: "./app/assets/javascript/lexxy.js",
1919
format: "esm",
20-
sourcemap: process.env.NODE_ENV === "development" // eslint-disable-line no-undef
20+
sourcemap: true
2121
},
2222
{
2323
file: "./app/assets/javascript/lexxy.min.js",

0 commit comments

Comments
 (0)