Commit 361c3398 authored by timel's avatar timel

chore: add sass dts plugin

parent a754c2c2
......@@ -24,3 +24,7 @@
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# scss type
*.module.scss.d.ts
......@@ -57,6 +57,7 @@
"sass": "^1.61.0",
"typescript": "^4.9.5",
"vite": "^4.2.1",
"vite-plugin-sass-dts": "^1.3.8",
"vite-plugin-wasm-pack": "^0.1.12",
"vite-tsconfig-paths": "^4.0.8",
"vite-ydk-loader": "^0.0.2"
......@@ -6329,6 +6330,15 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/camelcase-css": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/camelcase-css/-/camelcase-css-2.0.1.tgz",
"integrity": "sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA==",
"dev": true,
"engines": {
"node": ">= 6"
}
},
"node_modules/caniuse-api": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/caniuse-api/-/caniuse-api-3.0.0.tgz",
......@@ -17939,6 +17949,25 @@
"url": "https://opencollective.com/postcss/"
}
},
"node_modules/postcss-js": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/postcss-js/-/postcss-js-4.0.1.tgz",
"integrity": "sha512-dDLF8pEO191hJMtlHFPRa8xsizHaM82MLfNkUHdUtVEV3tgTp5oj+8qbEqYM57SLfc74KSbw//4SeJma2LRVIw==",
"dev": true,
"dependencies": {
"camelcase-css": "^2.0.1"
},
"engines": {
"node": "^12 || ^14 || >= 16"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/postcss/"
},
"peerDependencies": {
"postcss": "^8.4.21"
}
},
"node_modules/postcss-lab-function": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/postcss-lab-function/-/postcss-lab-function-2.0.1.tgz",
......@@ -26652,6 +26681,24 @@
}
}
},
"node_modules/vite-plugin-sass-dts": {
"version": "1.3.8",
"resolved": "https://registry.npmjs.org/vite-plugin-sass-dts/-/vite-plugin-sass-dts-1.3.8.tgz",
"integrity": "sha512-d6nHXyvYlFaZfO651SRR3PpYqOHFgetQ1WFPq4DZtPVABtSpEBUu3Qt3KE4+i1BLdPnhOvmXPDVvMFqfGaQYNA==",
"dev": true,
"dependencies": {
"postcss-js": "^4.0.1"
},
"engines": {
"node": "^14.18.0 || >=16.0.0"
},
"peerDependencies": {
"postcss": "^8",
"prettier": "^2.7 || ^3",
"sass": "*",
"vite": "^3 || ^4"
}
},
"node_modules/vite-plugin-svgr": {
"version": "2.4.0",
"resolved": "https://registry.npmjs.org/vite-plugin-svgr/-/vite-plugin-svgr-2.4.0.tgz",
......@@ -33221,6 +33268,12 @@
"resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz",
"integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA=="
},
"camelcase-css": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/camelcase-css/-/camelcase-css-2.0.1.tgz",
"integrity": "sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA==",
"dev": true
},
"caniuse-api": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/caniuse-api/-/caniuse-api-3.0.0.tgz",
......@@ -42258,6 +42311,15 @@
}
}
},
"postcss-js": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/postcss-js/-/postcss-js-4.0.1.tgz",
"integrity": "sha512-dDLF8pEO191hJMtlHFPRa8xsizHaM82MLfNkUHdUtVEV3tgTp5oj+8qbEqYM57SLfc74KSbw//4SeJma2LRVIw==",
"dev": true,
"requires": {
"camelcase-css": "^2.0.1"
}
},
"postcss-lab-function": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/postcss-lab-function/-/postcss-lab-function-2.0.1.tgz",
......@@ -48969,6 +49031,15 @@
"rollup": "^3.18.0"
}
},
"vite-plugin-sass-dts": {
"version": "1.3.8",
"resolved": "https://registry.npmjs.org/vite-plugin-sass-dts/-/vite-plugin-sass-dts-1.3.8.tgz",
"integrity": "sha512-d6nHXyvYlFaZfO651SRR3PpYqOHFgetQ1WFPq4DZtPVABtSpEBUu3Qt3KE4+i1BLdPnhOvmXPDVvMFqfGaQYNA==",
"dev": true,
"requires": {
"postcss-js": "^4.0.1"
}
},
"vite-plugin-svgr": {
"version": "2.4.0",
"resolved": "https://registry.npmjs.org/vite-plugin-svgr/-/vite-plugin-svgr-2.4.0.tgz",
......@@ -4,6 +4,8 @@ import svgr from "vite-plugin-svgr";
import ydkLoader from "vite-ydk-loader";
import tsconfigPaths from "vite-tsconfig-paths";
import wasmPack from "vite-plugin-wasm-pack";
import sassDts from "vite-plugin-sass-dts";
import path from "path";
// https://vitejs.dev/config/
export default defineConfig({
......@@ -15,9 +17,13 @@ export default defineConfig({
svgr(),
ydkLoader(),
tsconfigPaths(),
wasmPack("./rust-src")
wasmPack("./rust-src"),
sassDts({
enabledMode: ["development"],
sourceDir: path.resolve(__dirname, "./src"),
}),
],
resolve: {
extensions: [".js", ".json", ".ydk"],
extensions: [".mjs", ".js", ".mts", ".ts", ".jsx", ".tsx", ".json", ".ydk"],
},
});
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment