diff --git a/README.md b/README.md index 7712586..2310f2c 100644 --- a/README.md +++ b/README.md @@ -4,10 +4,25 @@ > This is a development branch for stylex vite plugin. Each feature will be pass in the repo. > This is an unofficial repo. +## Features + +- [x] SSR +- [x] automatic injection +- [x] HMR + ## Usage Clone repo and install all dependencies then run `yarn build` and copy the dist directroy to your project. +```ts +import { defineConfig } from "vite"; +import { stylexPlugin } from "vite-plugin-stylex"; + +export default defineConfig({ + plugins: [stylexPlugin()], +}); +``` + ## Options | params | type | default | description | diff --git a/e2e/e2e.spec.ts b/e2e/e2e.spec.ts index e730740..6752758 100644 --- a/e2e/e2e.spec.ts +++ b/e2e/e2e.spec.ts @@ -14,7 +14,7 @@ import { createSSRServer } from './fixtures/vue-ssr/server' // }, [windowHandle, elementHandle]) // t.is(red, 'rgb(255, 0, 0)', 'first load spa button text color should be red') // await elementHandle.click() -// await new Promise((resolve) => setTimeout(resolve, 2000)) +// await new Promise((resolve) => setTimeout(resolve, 5000)) // const blue = await page.evaluate(([window, el]) => { // return (window as Window).getComputedStyle(el as Element).color // }, [windowHandle, elementHandle]) @@ -31,7 +31,7 @@ test('fixture spa', async (t) => { }, [windowHandle, elementHandle]) t.is(red, 'rgb(255, 0, 0)', 'first load spa button text color should be red') await elementHandle.click() - await new Promise((resolve) => setTimeout(resolve, 2000)) + await new Promise((resolve) => setTimeout(resolve, 5000)) const blue = await page.evaluate(([window, el]) => { return (window as Window).getComputedStyle(el as Element).color }, [windowHandle, elementHandle]) @@ -48,7 +48,7 @@ test('fixture qwik', async (t) => { }, [windowHandle, elementHandle]) t.is(red, 'rgb(255, 0, 0)', 'first load spa button text color should be red') await elementHandle.click() - await new Promise((resolve) => setTimeout(resolve, 2000)) + await new Promise((resolve) => setTimeout(resolve, 5000)) const blue = await page.evaluate(([window, el]) => { return (window as Window).getComputedStyle(el as Element).color }, [windowHandle, elementHandle]) @@ -65,7 +65,7 @@ test('fixture vue ssr', async (t) => { }, [windowHandle, elementHandle]) t.is(red, 'rgb(255, 0, 0)', 'first load spa button text color should be red') await elementHandle.click() - await new Promise((resolve) => setTimeout(resolve, 2000)) + await new Promise((resolve) => setTimeout(resolve, 5000)) const blue = await page.evaluate(([window, el]) => { return (window as Window).getComputedStyle(el as Element).color }, [windowHandle, elementHandle])