githubEdit

πŸ“¦Publish a module that uses TSS

How to express you dependencies requirements

package.json

"name": "YOUR_MODULE",
"dependencies": {
    "tss-react": "^4.0.0"
},
"peerDependencies": {
    "react": "^16.8.0 || ^17.0.2 || 18.0.0" ,
    "@mui/material": "^5.9.3 || ^6.0.0",
    "@emotion/react": "^11.4.1",
},
"devDependencies": {
    "@mui/material": "^5.0.1",
    "@emotion/react": "^11.4.1",
    "@emotion/styled": "^11.8.1"
}

Your users install your module like that:

yarn add YOUR_MODULE @mui/material @emotion/react @emotion/styled
circle-info

The version of @mui/material must be newer or equal to 5.9.3

Regarding SSR setup you can forward your user to the dedicated MUI documentationarrow-up-right.

In any case, it is of paramount importance that your library supports CSJ and ESM distribution. Please refer to the following discussion for precise instructions and a comprehensive explanation of why this is crucial.

circle-exclamation
circle-exclamation

Last updated

Was this helpful?