Closed nanxiaobei closed 1 year ago
ignoreStylePathNotFound = true (default is true in vite serve)
vite-plugin-imp will get a warn message when the style path is not found, and return ''
, this will avoid error accur.
developer should according to warn message, adjust the style
method to return the right style path.
ignoreStylePathNotFound = false
when the style path is not found, it will not check whether style is exist and return import ${stylePath}
, and you will get error like *** MODULE_NOT_FOUND
.
understood, thanks!
cause the "ignore" meaning leads to misunderstanding. if it's warnStylePathNotFound
would be clear!
currently is that in yarn workspaces:
require(stylePath)
can not find the file, will warn "xxx is not found!"
import stylePath
is fine.
pelease provide a minimal repo or an online link(codesandbox/stackblitz) to reproduce the issue.
https://github.com/onebay/vite-plugin-imp/blob/main/src/shared.ts#L100
Why when "ignore", then check if path exist?