This PR addresses an issue where the CSS stylesheet exports were not functioning correctly due to a misconfiguration in the package.json file. Specifically, the files field in package.json was not correctly configured to include the CSS file, causing the exports to fail. The previous failed attempts were because I was testing using npm pack instead of yarn pack which render different results.
After this update we should be able to import the style sheet like
[x] I've clearly explained what problem this PR is solving and how it is solved.
[x] I've linked related issues
[x] I've included manual testing steps
[x] I've included screenshots/recordings if applicable
[x] I’ve included tests if applicable
[x] I’ve documented my code using JSDoc format if applicable
[x] I’ve applied the right labels on the PR (see labeling guidelines). Not required for external contributors.
[x] I’ve properly set the pull request status:
[x] In case it's not yet "ready for review", I've set it to "draft".
[ ] In case it's "ready for review", I've changed it from "draft" to "non-draft".
Pre-merge reviewer checklist
[ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
[ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.
Description
This PR addresses an issue where the CSS stylesheet exports were not functioning correctly due to a misconfiguration in the
package.json
file. Specifically, thefiles
field inpackage.json
was not correctly configured to include the CSS file, causing the exports to fail. The previous failed attempts were because I was testing usingnpm pack
instead ofyarn pack
which render different results.After this update we should be able to import the style sheet like
or
Related issues
Fixes: #608 Attempted previous fixes:
Screenshots/Recordings
Before
https://github.com/MetaMask/design-tokens/assets/8112138/593a791f-096d-45b7-8b82-77505d3597fc
After
https://github.com/MetaMask/design-tokens/assets/8112138/fd314eb6-70aa-41f4-b326-b8ec7e4bdf54
Manual testing steps
yarn pack
src/css/design-tokens.css
Pre-merge author checklist
Pre-merge reviewer checklist