generated from mizdra/npm-package-template
-
-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Labels
Type: FixFix bug.Fix bug.
Description
If any of the following file exist in the project, update of the import statement will fail.
// 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:
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.
2025-04-12.21.20.44.mov
Workaround
Removing or commenting out the ambient module declaration in *.module.css will avoid the problem.
// src/global.d.ts
// declare module '*.module.css' {
// const classes: { [className: string]: string };
// export default classes;
// }2025-04-12.21.25.41.mov
Metadata
Metadata
Assignees
Labels
Type: FixFix bug.Fix bug.