If any of the following file exist in the project, update of the import statement will fail. ```ts // src/global.d.ts declare module '*.module.css' { const classes: { [className: string]: string }; export default classes; } ``` ## How to reproduce https://github.com/mizdra/css-modules-kit-example/tree/a44af6d329f2f86c4cd5a885382a2d38bed3a567 First, do the following: ```bash git clone git@github.com:mizdra/css-modules-kit-example.git git checkout a44af6d329f2f86c4cd5a885382a2d38bed3a567 npm i code --profile-temp . ``` Next, install `mizdra.css-modules-kit-vscode` in VS Code. Then, rename `src/a.module.css` to `src/aa.module.css` from VS Code's Explorer panel. https://github.com/user-attachments/assets/7cd396ae-491f-41cc-b207-9dc786e2c6e8 ## Workaround Removing or commenting out the ambient module declaration in `*.module.css` will avoid the problem. ```ts // src/global.d.ts // declare module '*.module.css' { // const classes: { [className: string]: string }; // export default classes; // } ``` https://github.com/user-attachments/assets/244c72ad-780a-4daf-8f69-41bc8a388879
If any of the following file exist in the project, update of the import statement will fail.
How to reproduce
https://github.com/mizdra/css-modules-kit-example/tree/a44af6d329f2f86c4cd5a885382a2d38bed3a567
First, do the following:
git clone git@github.com:mizdra/css-modules-kit-example.git git checkout a44af6d329f2f86c4cd5a885382a2d38bed3a567 npm i code --profile-temp .Next, install
mizdra.css-modules-kit-vscodein VS Code. Then, renamesrc/a.module.csstosrc/aa.module.cssfrom VS Code's Explorer panel.2025-04-12.21.20.44.mov
Workaround
Removing or commenting out the ambient module declaration in
*.module.csswill avoid the problem.2025-04-12.21.25.41.mov