typescript-plugin-css-modules icon indicating copy to clipboard operation
typescript-plugin-css-modules copied to clipboard

Using the global variable problem in Vite

Open xiaoxustudio opened this issue 8 months ago • 6 comments

Describe the bug Import the global variable in Vite, when the variable is used in another file, the prompt invalidates

To Reproduce Steps to reproduce the behavior:

  1. The scss file of a global variable is configured in vite
  2. Use global variables in other scss files 3.Yes, it's wrong

Expected behavior It should make no errors and parse the scss file correctly

Screenshots global variable file(global variable are defined ) image head.scss(using global variable) image After importing, using it throws an error image

I put the variable in the head file and it worked fine

Desktop (please complete the following information):

  • OS: Windows
  • node Version: v20.11.1

xiaoxustudio avatar Jun 08 '24 15:06 xiaoxustudio