To reproduce the error:
- Clone repo:
git clone https://github.com/Dessader/vanilla-extract-style-issue.git
- Go to project dir:
cd vanilla-extract-style-issue
- Install dependencies:
yarn
- Go to
design-system
package dir:cd packages/design-system
- Build this package:
yarn build
- Go to web app dir:
cd ../../apps/web
- Run web app:
yarn dev
- Open in browser:
http://localhost:3001
Reproducible error when importing variables from a package created using the createGlobalTheme
function:
./src/styles/app.css.ts NonErrorEmittedError: (Emitted value instead of an instance of Error) ReferenceError: document is not defined