subpackage imports with npm specifiers
e.g.
import colors from "npm:tailwindcss/colors" currently fails, is this not supposed to work?
Solution: npm:tailwindcss/colors.js4 Replies
what happens if you use
npm:@tailwind/colors instead?@yoggyd are you sure that you want
tailwind and not tailwindcss? Only the latter is the popular CSS templating engine, whereas the former is something completely differentsorry, I actually have
tailwindcss in the code that's not working, I'll fix the original question
@lino-levan that package does not exist. I'm not talking about a "full" package in another scope but a submodule from an existing package. The types can also be resolved, but colors.js is not being imported
ah, adding .ts is not allowed, but .js is. Kinda makes sense, so the solution is import colors from "npm:tailwindcss/colors.js"yeah only
.js works ther ebecause tehy don't ship ts in their package. See https://www.npmjs.com/package/tailwindcss?activeTab=code