Disable scss deprecation warnings
This commit is contained in:
parent
32f00afa8a
commit
84102dd50e
1 changed files with 53 additions and 57 deletions
110
vite.config.ts
110
vite.config.ts
|
|
@ -3,65 +3,61 @@ import vue from "@vitejs/plugin-vue";
|
|||
import path from "path";
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [vue()],
|
||||
plugins: [vue()],
|
||||
|
||||
resolve: {
|
||||
alias: {
|
||||
"@": path.resolve(__dirname, "./ts"),
|
||||
},
|
||||
},
|
||||
resolve: {
|
||||
alias: {
|
||||
"@": path.resolve(__dirname, "./ts"),
|
||||
},
|
||||
},
|
||||
|
||||
css: {
|
||||
preprocessorOptions: {
|
||||
scss: {
|
||||
// Only add this if you have a variables file and need it auto-imported
|
||||
// Comment out or adjust the path if this file doesn't exist or causes issues
|
||||
// additionalData: `@use "@/style/variables.scss" as *;`,
|
||||
css: {
|
||||
preprocessorOptions: {
|
||||
scss: {
|
||||
api: "modern-compiler",
|
||||
silenceDeprecations: ["import", "global-builtin", "if-function"],
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
api: "modern-compiler", // Use the modern Sass API
|
||||
silenceDeprecations: ["import", "global-builtin"],
|
||||
},
|
||||
},
|
||||
},
|
||||
build: {
|
||||
manifest: true,
|
||||
outDir: "static/gen",
|
||||
emptyOutDir: true,
|
||||
rollupOptions: {
|
||||
input: {
|
||||
main: path.resolve(__dirname, "ts/main.ts"),
|
||||
},
|
||||
output: {
|
||||
entryFileNames: "js/bundle.[hash].js",
|
||||
chunkFileNames: "js/[name].[hash].js",
|
||||
assetFileNames: (assetInfo) => {
|
||||
if (/\.(woff2?|ttf|eot)$/.test(assetInfo.name || "")) {
|
||||
return "fonts/[name].[hash][extname]";
|
||||
}
|
||||
if (/\.css$/.test(assetInfo.name || "")) {
|
||||
return "css/style.[hash][extname]";
|
||||
}
|
||||
return "assets/[name].[hash][extname]";
|
||||
},
|
||||
},
|
||||
},
|
||||
sourcemap: true,
|
||||
},
|
||||
|
||||
build: {
|
||||
manifest: true,
|
||||
outDir: "static/gen",
|
||||
emptyOutDir: true,
|
||||
rollupOptions: {
|
||||
input: {
|
||||
main: path.resolve(__dirname, "ts/main.ts"),
|
||||
},
|
||||
output: {
|
||||
entryFileNames: "js/bundle.[hash].js",
|
||||
chunkFileNames: "js/[name].[hash].js",
|
||||
assetFileNames: (assetInfo) => {
|
||||
if (/\.(woff2?|ttf|eot)$/.test(assetInfo.name || "")) {
|
||||
return "fonts/[name].[hash][extname]";
|
||||
}
|
||||
if (/\.css$/.test(assetInfo.name || "")) {
|
||||
return "css/style.[hash][extname]";
|
||||
}
|
||||
return "assets/[name].[hash][extname]";
|
||||
},
|
||||
},
|
||||
},
|
||||
sourcemap: true,
|
||||
},
|
||||
|
||||
server: {
|
||||
allowedHosts: ["poweredge.local", "dev-sync.nidus.cloud"],
|
||||
port: 9000,
|
||||
proxy: {
|
||||
"/api": {
|
||||
target: "http://127.0.0.1:9002",
|
||||
changeOrigin: true,
|
||||
},
|
||||
"/signup": {
|
||||
target: "http://localhost:9002",
|
||||
changeOrigin: false,
|
||||
}
|
||||
},
|
||||
strictPort: true,
|
||||
},
|
||||
server: {
|
||||
allowedHosts: ["poweredge.local", "dev-sync.nidus.cloud"],
|
||||
port: 9000,
|
||||
proxy: {
|
||||
"/api": {
|
||||
target: "http://127.0.0.1:9002",
|
||||
changeOrigin: true,
|
||||
},
|
||||
"/signup": {
|
||||
target: "http://localhost:9002",
|
||||
changeOrigin: false,
|
||||
}
|
||||
},
|
||||
strictPort: true,
|
||||
},
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue