-
-
Notifications
You must be signed in to change notification settings - Fork 361
Open
Description
What's wrong?
It might be my misunderstanding of cosmos plugins, if it is, feel free to close this.
I'm coding a plugin that will use @axe-core/react on a click of a button. I've used react-cosmos-plugin-open-fixture as a template. The plugin axe throws a window is not defined exception.
Steps to reproduce
- clone this: https://github.com/PiTiLeZarD/react-cosmos-plugin-axe
- npm install && npm run build
- ln -s this folder in the node_modules of the react cosmos
- add "react-cosmos-plugin-axe" in the list of plugins in cosmos.config.json
- cosmos broken
Useful info
cosmos 6.1.1 the server displays:
[Cosmos] Using cosmos config found at cosmos.config.json
[Cosmos] Server crashed...
(╯°□°)╯︵ ┻━┻
ReferenceError: window is not defined
at Object.<anonymous> (/Users/me/workspaces/react-cosmos-plugin-axe/node_modules/@axe-core/react/dist/index.js:100:13)
at Module._compile (node:internal/modules/cjs/loader:1364:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1422:10)
at Module.load (node:internal/modules/cjs/loader:1203:32)
at Function.Module._load (node:internal/modules/cjs/loader:1019:12)
at Module.require (node:internal/modules/cjs/loader:1231:19)
at require (node:internal/modules/helpers:177:18)
at Object.<anonymous> (/Users/me/workspaces/react-cosmos-plugin-axe/dist/ui.js:5:27)
at Module._compile (node:internal/modules/cjs/loader:1364:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1422:10)
Additional context
I'm using parcel.
Metadata
Metadata
Assignees
Labels
No labels