mirror of
https://github.com/withastro/astro.git
synced 2024-12-16 21:46:22 -05:00
Patch Lit server shim to fix sass compatability (#3511)
* fix(#2623, #3508): patch lit server shim to allow sass compat * chore: add changeset
This commit is contained in:
parent
a74cf98002
commit
2fedb97489
5 changed files with 34 additions and 1 deletions
5
.changeset/famous-pens-cheer.md
Normal file
5
.changeset/famous-pens-cheer.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
'@astrojs/lit': patch
|
||||
---
|
||||
|
||||
Patch Lit's server shim to allow for `sass` compatability
|
|
@ -37,7 +37,8 @@
|
|||
"devDependencies": {
|
||||
"astro": "workspace:*",
|
||||
"astro-scripts": "workspace:*",
|
||||
"cheerio": "^1.0.0-rc.11"
|
||||
"cheerio": "^1.0.0-rc.11",
|
||||
"sass": "^1.52.1"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@webcomponents/template-shadowroot": "^0.1.0",
|
||||
|
|
|
@ -3,3 +3,5 @@ installWindowOnGlobal();
|
|||
|
||||
window.global = window;
|
||||
document.getElementsByTagName = () => [];
|
||||
// See https://github.com/lit/lit/issues/2393
|
||||
document.currentScript = null;
|
||||
|
|
14
packages/integrations/lit/test/sass.test.js
Normal file
14
packages/integrations/lit/test/sass.test.js
Normal file
|
@ -0,0 +1,14 @@
|
|||
import { expect } from 'chai';
|
||||
|
||||
describe('check', () => {
|
||||
it('should be able to load sass', async () => {
|
||||
let error = null;
|
||||
try {
|
||||
await import(new URL('../server-shim.js', import.meta.url));
|
||||
await import('sass');
|
||||
} catch (e) {
|
||||
error = e;
|
||||
}
|
||||
expect(error).to.be.null;
|
||||
});
|
||||
});
|
|
@ -1665,12 +1665,14 @@ importers:
|
|||
astro: workspace:*
|
||||
astro-scripts: workspace:*
|
||||
cheerio: ^1.0.0-rc.11
|
||||
sass: ^1.52.1
|
||||
dependencies:
|
||||
'@lit-labs/ssr': 2.2.0
|
||||
devDependencies:
|
||||
astro: link:../../astro
|
||||
astro-scripts: link:../../../scripts
|
||||
cheerio: 1.0.0-rc.11
|
||||
sass: 1.52.1
|
||||
|
||||
packages/integrations/netlify:
|
||||
specifiers:
|
||||
|
@ -8059,6 +8061,11 @@ packages:
|
|||
|
||||
/debug/3.2.7:
|
||||
resolution: {integrity: sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==}
|
||||
peerDependencies:
|
||||
supports-color: '*'
|
||||
peerDependenciesMeta:
|
||||
supports-color:
|
||||
optional: true
|
||||
dependencies:
|
||||
ms: 2.1.3
|
||||
dev: false
|
||||
|
@ -10990,6 +10997,8 @@ packages:
|
|||
debug: 3.2.7
|
||||
iconv-lite: 0.4.24
|
||||
sax: 1.2.4
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
dev: false
|
||||
|
||||
/netmask/2.0.2:
|
||||
|
@ -11073,6 +11082,8 @@ packages:
|
|||
rimraf: 2.7.1
|
||||
semver: 5.7.1
|
||||
tar: 4.4.19
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
dev: false
|
||||
|
||||
/node-releases/2.0.5:
|
||||
|
|
Loading…
Reference in a new issue