frenic / csstype

Strict TypeScript and Flow types for style based on MDN data
MIT License
1.7k stars 69 forks source link

Issue with Vite 3: Failed to resolve entry for package "csstype" #162

Closed DavidVaness closed 1 year ago

DavidVaness commented 1 year ago

Hi, I am getting the following error using this library with vite 3

[plugin: vite:dep-scan] Failed to resolve entry for package "csstype". The package may have incorrect main/module/exports specified in its package.json.

i tried to fix this locally by patching the the "main": "" out of the package.json but without any luck of resolving this issue. Maybe I am misunderstanding the error message 🤔

usage in code is everywhere like this import * as CSS from 'csstype'

meyer commented 1 year ago

duplicate of #158. try changing import * to import type *. Context here: https://github.com/frenic/csstype/issues/158#issuecomment-1125157572

DavidVaness commented 1 year ago

This is it! Not sure how I missed this issue and the updated syntax in the readme... Thank you