Tailwind v2 and custom NPM package #3549
Unanswered
dudedigital
asked this question in
Help
Replies: 1 comment
-
I was able to get the error to go away by installing the tailwind compatibility into the project alongside my NPM package. I didn't want to do this but it solved it for now. The way this line
points to another package makes me think maybe it breaks when used inside an npm package within a project. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
To upgrade my NPM package to use Tailwind v2, I had to use the compatibility build. After publishing and installing my new package version I am getting this error:
Syntax Error: Error: Loading PostCSS Plugin failed: Cannot find module 'tailwindcss'
from this line:
import '@package/path/to/dist/styling.css';
What's also interesting is the same import works in other projects. Tailwind is not included in this project other than through my NPM package (which compiles fine). Not sure what I am doing wrong. Any insight would be appreciated.
Beta Was this translation helpful? Give feedback.
All reactions