1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

SCSS modules in Features

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
This commit is contained in:
Janne Savolainen 2023-04-12 12:01:15 +03:00
parent 685548cc4b
commit 13f38eb2a1
No known key found for this signature in database
GPG Key ID: 8C6CFB2FFFE8F68A
5 changed files with 25 additions and 6 deletions

View File

@ -41,7 +41,5 @@
"compilerOptions": {
"module": "CommonJS"
}
},
"include": ["./styles.d.ts"]
}
}

View File

@ -20,6 +20,6 @@
"homepage": "https://github.com/lensapp/lens",
"dependencies": {
"typescript": "^4.9.3",
"typescript-plugin-css-modules": "^3.4.0"
"typescript-plugin-css-modules": "^5.0.1"
}
}

View File

@ -30,7 +30,7 @@ module.exports = ({ entrypointFilePath, outputDirectory }) => ({
mode: "write-dts",
configOverwrite: {
include: [entrypointFilePath],
include: [entrypointFilePath, './styles.d.ts'],
compilerOptions: {
declaration: true,

View File

@ -50,7 +50,11 @@ module.exports =
options: {
sourceMap: false,
postcssOptions: {
plugins: ["tailwindcss"],
plugins: {
tailwindcss: {
config: {}
}
},
},
},
},

View File

@ -0,0 +1,17 @@
// Support import for custom module extensions
// https://www.typescriptlang.org/docs/handbook/modules.html#wildcard-module-declarations
declare module "*.module.scss" {
const classes: { [key: string]: string };
export default classes;
}
declare module "*.module.css" {
const classes: { [key: string]: string };
export default classes;
}
declare module "*.scss" {
const content: string;
export = content;
}