mirror of
https://github.com/shoelace-style/webawesome.git
synced 2026-01-12 04:09:12 +00:00
try but fail ssr
This commit is contained in:
2
package-lock.json
generated
2
package-lock.json
generated
@@ -1923,6 +1923,7 @@
|
||||
"resolved": "https://registry.npmjs.org/@lit-labs/testing/-/testing-0.2.7.tgz",
|
||||
"integrity": "sha512-1vuCq+uh6MId6VKzFyEtWejX3+VU0Xejaa1Fmdg5S10bh7Mv6u/KS1e4Z2yxnAHnpeLd5BezBrN13dEaKka+/A==",
|
||||
"dev": true,
|
||||
"license": "BSD-3-Clause",
|
||||
"dependencies": {
|
||||
"@lit-labs/ssr": "^3.3.0",
|
||||
"@lit-labs/ssr-client": "^1.1.4",
|
||||
@@ -13992,6 +13993,7 @@
|
||||
"style-observer": "^0.0.7"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@lit-labs/testing": "^0.2.7",
|
||||
"@wc-toolkit/jsx-types": "^1.3.0"
|
||||
},
|
||||
"engines": {
|
||||
|
||||
@@ -88,6 +88,7 @@
|
||||
]
|
||||
},
|
||||
"devDependencies": {
|
||||
"@lit-labs/testing": "^0.2.7",
|
||||
"@wc-toolkit/jsx-types": "^1.3.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ import { globbySync } from 'globby';
|
||||
import * as os from 'os';
|
||||
import * as process from 'process';
|
||||
import { getAllComponents } from './scripts/shared.js';
|
||||
import {litSsrPlugin} from '@lit-labs/testing/web-test-runner-ssr-plugin.js';
|
||||
|
||||
// Get a list of all Web Awesome component imports for the test runner
|
||||
const metadata = JSON.parse(readFileSync('./dist/custom-elements.json'), 'utf8');
|
||||
@@ -74,6 +75,7 @@ export default {
|
||||
ts: true,
|
||||
target: 'es2020',
|
||||
}),
|
||||
litSsrPlugin()
|
||||
],
|
||||
browsers: [
|
||||
playwrightLauncher({ product: 'chromium', concurrency }),
|
||||
@@ -93,6 +95,8 @@ export default {
|
||||
window.process = {env: { NODE_ENV: "production" }}
|
||||
</script>
|
||||
<script>
|
||||
window.SSR_ONLY = ${process.env.SSR_ONLY === "true"}
|
||||
window.CSR_ONLY = ${process.env.CSR_ONLY === "true"}
|
||||
window.serverComponents = [
|
||||
${serverComponents.map(str => `"${str}"`).join(',\n')}
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user