vite-plugin-sass-dts
vite-plugin-sass-dts copied to clipboard
prettierFilePath not working
Could you provide an example for using prettierFilePath? From everything I tried, it is not working.
Sometimes vite-plugin-sass-dts runs on a file and generate slightly different tabs at the beginning of lines, which trigger a change in git. Nothing changed really in the sass file, but the generated file changes. I was hoping prettierFilePath might resolve this, but I can't get it to work, and there's no example.
Thanks!
@EtienneT
Can I work around this by setting the options as follows? https://github.com/activeguild/vite-plugin-sass-dts/blob/66974a6855d2cf68e073ae2f2be7be13d884f8e1/example/react-sass/vite.config.ts#L41
@activeguild, I tried using the exact same file as the example. The .prettierrc.cjs file is at the root directory with my vite.config.js file. I declare the plugin like so:
sassDts({ esmExport: true, prettierFilePath: resolve(__dirname, '.prettierrc.cjs') })
I try putting tabWith of 10 in the .prettierrc.cjs file to test if prettier settings are taken into account, but they are not. When I modify a .scss file, the esmExport option is taken into account, but not prettier.
Also if I input an invalid path in prettierFilePath, I don't get any error.
@EtienneT
Is it possible to have you provide a minimum sample of the bugs that will occur?
I made a smaller vite project from the vite templates to try to replicate this problem and realized it worked on the smaller project. Now found why it was not working on my larger project.
Thanks,