#subpackage imports with npm specifiers

6 messages · Page 1 of 1 (latest)

finite dove
#

e.g. import colors from "npm:tailwindcss/colors" currently fails, is this not supposed to work?

Solution: npm:tailwindcss/colors.js

fresh hull
#

what happens if you use npm:@tailwind/colors instead?

clear mason
#

@finite dove 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 different

finite dove
#

sorry, I actually have tailwindcss in the code that's not working, I'll fix the original question

#

@fresh hull 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"