fix: resolve ES modules compatibility in E2E test files
- Replace __dirname with import.meta.url pattern for ES modules compatibility - Add fileURLToPath imports to all E2E test files - Fix duplicate require statements in setup-verification.spec.ts - Update playwright.config.ts to use relative path instead of __dirname This fixes the 'ReferenceError: __dirname is not defined in ES module scope' error when running Playwright tests in the ES modules environment.
This commit is contained in:
45
node_modules/react-style-singleton/README.md
generated
vendored
Normal file
45
node_modules/react-style-singleton/README.md
generated
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
react-style-singleton
|
||||
====
|
||||
|
||||
__300b__ with all dependencies, minified and gzipped
|
||||
|
||||
|
||||
Creates a style component with internal _tracker_.
|
||||
- Adds styles to the browser on the __first__ instance mount.
|
||||
- Removes after the __last__ instance unmount.
|
||||
- Thus helps you deliver styles you need to the customer, and clean up later.
|
||||
- Is not server-side rendering compatible!
|
||||
|
||||
|
||||
# API
|
||||
|
||||
## Component
|
||||
|
||||
```js
|
||||
import {styleSingleton} from 'react-style-singleton'
|
||||
|
||||
const Style = styleSingleton();
|
||||
|
||||
export const App = () => (
|
||||
<Style styles={'body {color:red}'} />
|
||||
);
|
||||
```
|
||||
|
||||
## Hook
|
||||
|
||||
```js
|
||||
import {styleHookSingleton} from 'react-style-singleton';
|
||||
|
||||
const useStyle = styleHookSingleton();
|
||||
const useAnotherStyle = styleHookSingleton();
|
||||
|
||||
export const App = () => {
|
||||
useStyle('div {color:red}');
|
||||
useAnotherStyle('body { background-color:red }');
|
||||
return (<div />);
|
||||
}
|
||||
```
|
||||
|
||||
# License
|
||||
|
||||
MIT
|
||||
Reference in New Issue
Block a user