You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using this plugin in a repo where my prettier config is a module in the form of prettier.config.js. Took me a moment to realize that the plugin attempts to read the file and only uses it if it contains JSON:
Document that the pathToFormatterConfig option must point to a JSON file
Have an option that accepts the parsed config instead of pointing to a path. If you want to be flexible, could have it so that this option accepts either a path to the config file (in which case keeping the existing behavior of pathToFormatterConfig is fine) or the parsed JSON object
The text was updated successfully, but these errors were encountered:
To be honest I'm not really sure how to pass the parsed js config and actually parse it myself, I'll have to look into that part as I haven't done this before but I'd love to add support for both .js and .rc files
To be honest I'm not really sure how to pass the parsed js config and actually parse it myself, I'll have to look into that part as I haven't done this before but I'd love to add support for both .js and .rc files
maybe I'm misunderstanding but at least for prettier, you can get the resolved config options by using prettier.resolveConfig()
I'm using this plugin in a repo where my prettier config is a module in the form of
prettier.config.js
. Took me a moment to realize that the plugin attempts to read the file and only uses it if it contains JSON:https://github.com/forge42dev/vite-plugin-icons-spritesheet/blob/58aeffc8cf0e4f5d5a0b8c952df6a19fae4bc6bf/src/index.ts#L195-L239
Some options that could be considered:
pathToFormatterConfig
option must point to a JSON filepathToFormatterConfig
is fine) or the parsed JSON objectThe text was updated successfully, but these errors were encountered: