Publish with Vite - React, Typescript and Tailwindcss component to npm

preview_player
Показать описание
Publish a React, typescript and Tailwindcss component to npm with Vite.

Get 10% discount on branded T-shirts by using this link
Рекомендации по теме
Комментарии
Автор

if you're publishing already compiled code to npm then surely react, react-dom etc should be listed as peerDependencies instead? This will avoid conflicts if you're importing your package into a project that's already using a different react version..

nagwarg
Автор

After getting desperate on how to make the components in a simple way, here I find a video without voice that works perfectly :D 1000 thx

javiergarciafillol
Автор

My style.css is in the node module package. But it isn't reflecting on the component

Dhanushsaji
Автор

Button color in library & in child project is different. Are css not copied? or applied?

vyfezpd
Автор

How to add custom css file in Button component?

SahibeAlam-qztz
Автор

i followed this to setup a shadcn npm package but my styles are not being applied in the consumer app. any idea what im doing wrong?

JD-eure
Автор

How you managed the error of "import path from"path";" in vite.config.ts on

8:25

deepaksoni-wbhi
Автор

Tailwind not loading after installing on external repo, this is not working.

noone-gzpc
Автор

Thanks for the tutorial, but tailwind isn't working when you install the package. is there any solution for that?

Chriss-cnch
Автор

this is wild the amount of configuration you have to do. jesus

udonwadon
Автор

For those who are having issue of styles
{
"exports": {
".": {
"import": "./dist/index.es.js",
"require": "./dist/index.umd.js",
"styles": "./dist/style.css"
}
},
"scripts": {
"dev": "vite",
"prepare": "npm run build",
"build": "tailwindcss ./src/index.css --output ./dist/style.css && tsc && vite build",
"lint": "eslint . --ext ts, tsx --max-warnings 0",
"preview": "vite preview"
},

bibek_magar