-
Notifications
You must be signed in to change notification settings - Fork 566
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
finding a way to run in client-side by browser using style-dictionary or browser-style-dictionary #968
Comments
Hey @robsonn thank you for the question! Currently there is no way to run Style Dictionary in the browser because it relies on Node things like the file system. There is a fork of Style Dictionary that does work in the browser: https://github.com/divriots/browser-style-dictionary you can install the npm package This is something we are planning for the next major release of Style Dictionary: allowing it to be run in browser or any JS-based environment. |
For clarity, you'll have to follow the directions they provide in their README, which I believe includes running the whole thing through browserify. |
@dbanksdesign I hate to be that guy, but is there an ETA on when this next major release will be coming? Keen to see this natively running in the browser without the "hacks" that these other packages & repos currently have in place. |
Looks like someone from the tokens.studio team is putting in hard work to get this in v4: |
This is working out of the box now in the browser without any build-tools required (assuming you use a modern evergreen browser of course). Feel free to test out Also, hop into the style-dictionary-v4 channel on our slack, we'd love to hear feedback when testing the v4 prereleases, and will be communicating further changes there. |
Big thanks to @jorenbroekema and the rest of the team for this feature 🚀 |
style-dictionary
Versions:
"style-dictionary": "^3.8.0",
"vue": "3.2.47",
"vite": "4.1.0",
partial code:
error:
browser-style-dictionary
Versions:
"browser-style-dictionary": "3.1.1-browser.1",
"vue": "3.2.47",
"vite": "4.1.0",
partial code:
error:
The text was updated successfully, but these errors were encountered: