Skip to content

Commit

Permalink
[lit-html] disabled shadydom nopatch in node dev build (#3526)
Browse files Browse the repository at this point in the history
  • Loading branch information
WickyNilliams committed Jan 11, 2023
1 parent 214f61c commit 65e5665
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 4 deletions.
6 changes: 6 additions & 0 deletions .changeset/friendly-papayas-glow.md
@@ -0,0 +1,6 @@
---
'lit': patch
'lit-html': patch
---

Disable ShadyDOM noPatch in Node dev build. This fixes the issue of throwing due to undefined `window`.
13 changes: 12 additions & 1 deletion packages/lit-html/package.json
Expand Up @@ -287,7 +287,8 @@
"test": "wireit",
"test:dev": "wireit",
"test:prod": "wireit",
"test:node": "wireit"
"test:node": "wireit",
"test:node-dev": "wireit"
},
"files": [
"/async-directive.{d.ts,d.ts.map,js,js.map}",
Expand Down Expand Up @@ -408,6 +409,7 @@
"test:dev",
"test:prod",
"test:node",
"test:node-dev",
"check-version"
]
},
Expand Down Expand Up @@ -449,6 +451,15 @@
],
"files": [],
"output": []
},
"test:node-dev": {
"command": "node --conditions=development development/test/node-imports.js",
"dependencies": [
"build:ts",
"build:rollup"
],
"files": [],
"output": []
}
},
"dependencies": {
Expand Down
15 changes: 13 additions & 2 deletions packages/lit/package.json
Expand Up @@ -183,7 +183,8 @@
"test": "wireit",
"test:dev": "wireit",
"test:prod": "wireit",
"test:node": "wireit"
"test:node": "wireit",
"test:node-dev": "wireit"
},
"wireit": {
"build": {
Expand Down Expand Up @@ -274,7 +275,8 @@
"dependencies": [
"test:dev",
"test:prod",
"test:node"
"test:node",
"test:node-dev"
]
},
"test:dev": {
Expand Down Expand Up @@ -318,6 +320,15 @@
],
"files": [],
"output": []
},
"test:node-dev": {
"command": "node --conditions=development development/test/node-imports.js",
"dependencies": [
"build:ts",
"build:rollup"
],
"files": [],
"output": []
}
},
"files": [
Expand Down
13 changes: 12 additions & 1 deletion packages/reactive-element/package.json
Expand Up @@ -165,7 +165,8 @@
"test": "wireit",
"test:dev": "wireit",
"test:prod": "wireit",
"test:node": "wireit"
"test:node": "wireit",
"test:node-dev": "wireit"
},
"wireit": {
"build": {
Expand Down Expand Up @@ -266,6 +267,7 @@
"test:dev",
"test:prod",
"test:node",
"test:node-dev",
"check-version"
]
},
Expand Down Expand Up @@ -308,6 +310,15 @@
],
"files": [],
"output": []
},
"test:node-dev": {
"command": "node --conditions=development development/test/node-imports.js",
"dependencies": [
"build:ts",
"build:rollup"
],
"files": [],
"output": []
}
},
"files": [
Expand Down
2 changes: 2 additions & 0 deletions rollup-common.js
Expand Up @@ -530,6 +530,8 @@ export function litProdConfig({
// i.e. using globalThis instead of window, and shimming APIs
// needed for Lit bootup.
'const NODE_MODE = false': 'const NODE_MODE = true',
'const ENABLE_SHADYDOM_NOPATCH = true':
'const ENABLE_SHADYDOM_NOPATCH = false',
},
}),
...injectNodeDomShimIntoReactiveElement,
Expand Down

0 comments on commit 65e5665

Please sign in to comment.