Skip to content

Commit 34bc57b

Browse files
committed
chore: silence sass import deprecation warnings
1 parent b63f06b commit 34bc57b

1 file changed

Lines changed: 32 additions & 29 deletions

File tree

dashboard/vite.config.ts

Lines changed: 32 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
import { fileURLToPath, URL } from 'url';
2-
import { defineConfig } from 'vite';
3-
import vue from '@vitejs/plugin-vue';
4-
import vuetify from 'vite-plugin-vuetify';
5-
import webfontDl from 'vite-plugin-webfont-dl';
1+
import { fileURLToPath, URL } from "url";
2+
import { defineConfig } from "vite";
3+
import vue from "@vitejs/plugin-vue";
4+
import vuetify from "vite-plugin-vuetify";
5+
import webfontDl from "vite-plugin-webfont-dl";
66
// @ts-ignore — .mjs not in TS project scope; Vite resolves this at runtime
7-
import { runMdiSubset } from './scripts/subset-mdi-font.mjs';
7+
import { runMdiSubset } from "./scripts/subset-mdi-font.mjs";
88

99
// Vite plugin: run MDI icon font subsetting (build only)
1010
function mdiSubset() {
1111
return {
12-
name: 'vite-plugin-mdi-subset',
12+
name: "vite-plugin-mdi-subset",
1313
async buildStart() {
14-
console.log('\n🔧 Running MDI icon font subsetting...');
14+
console.log("\n🔧 Running MDI icon font subsetting...");
1515
await runMdiSubset();
1616
},
1717
};
@@ -21,47 +21,50 @@ function mdiSubset() {
2121
export default defineConfig(({ command }) => ({
2222
plugins: [
2323
// Only run MDI subsetting during production builds, skip in dev server
24-
...(command === 'build' ? [mdiSubset()] : []),
24+
...(command === "build" ? [mdiSubset()] : []),
2525
vue({
2626
template: {
2727
compilerOptions: {
28-
isCustomElement: (tag) => ['v-list-recognize-title'].includes(tag)
29-
}
30-
}
28+
isCustomElement: (tag) => ["v-list-recognize-title"].includes(tag),
29+
},
30+
},
3131
}),
3232
vuetify({
33-
autoImport: true
33+
autoImport: true,
3434
}),
35-
webfontDl()
35+
webfontDl(),
3636
],
3737
resolve: {
3838
alias: {
39-
mermaid: 'mermaid/dist/mermaid.js',
40-
'@': fileURLToPath(new URL('./src', import.meta.url))
41-
}
39+
mermaid: "mermaid/dist/mermaid.js",
40+
"@": fileURLToPath(new URL("./src", import.meta.url)),
41+
},
4242
},
4343
css: {
4444
preprocessorOptions: {
45-
scss: {}
46-
}
45+
scss: {
46+
api: "modern-compiler",
47+
silenceDeprecations: ["import", "global-builtin"],
48+
},
49+
},
4750
},
4851
build: {
4952
sourcemap: false,
50-
chunkSizeWarningLimit: 1024 * 1024 // Set the limit to 1 MB
53+
chunkSizeWarningLimit: 1024 * 1024, // Set the limit to 1 MB
5154
},
5255
optimizeDeps: {
53-
exclude: ['vuetify'],
54-
entries: ['./src/**/*.vue']
56+
exclude: ["vuetify"],
57+
entries: ["./src/**/*.vue"],
5558
},
5659
server: {
57-
host: '0.0.0.0',
60+
host: "0.0.0.0",
5861
port: 3000,
5962
proxy: {
60-
'/api': {
61-
target: 'http://127.0.0.1:6185/',
63+
"/api": {
64+
target: "http://127.0.0.1:6185/",
6265
changeOrigin: true,
63-
ws: true
64-
}
65-
}
66-
}
66+
ws: true,
67+
},
68+
},
69+
},
6770
}));

0 commit comments

Comments
 (0)