Compare commits
2 Commits
cac342bdc5
...
e6ba5433e2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e6ba5433e2 | ||
|
|
d19a3ca557 |
1
Cargo.lock
generated
1
Cargo.lock
generated
@ -1149,6 +1149,7 @@ dependencies = [
|
||||
"config",
|
||||
"image",
|
||||
"serde",
|
||||
"tracing",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
||||
@ -19,5 +19,6 @@ config = { workspace = true }
|
||||
anyhow = { workspace = true }
|
||||
image = { workspace = true }
|
||||
serde = { workspace = true, features = ["derive"] }
|
||||
tracing = { workspace = true }
|
||||
[lints]
|
||||
workspace = true
|
||||
|
||||
@ -17,7 +17,9 @@ impl AppAvatar {
|
||||
pub async fn init(cfg: &AppConfig) -> anyhow::Result<Self> {
|
||||
let path = cfg.avatar_path()?;
|
||||
if std::fs::read_dir(&path).is_err() {
|
||||
std::fs::create_dir_all(&path)?;
|
||||
if let Err(e) = std::fs::create_dir_all(&path) {
|
||||
tracing::warn!(path = %path, error = %e, "Avatar directory not available, avatars disabled");
|
||||
}
|
||||
}
|
||||
let basic_path = PathBuf::from(path);
|
||||
Ok(Self { basic_path })
|
||||
|
||||
@ -2,7 +2,6 @@ import path from "path"
|
||||
import tailwindcss from "@tailwindcss/vite"
|
||||
import react from "@vitejs/plugin-react"
|
||||
import {defineConfig, type Plugin} from "vite"
|
||||
import {analyzer} from 'vite-bundle-analyzer'
|
||||
|
||||
function tailwindEscapeFix(): Plugin {
|
||||
return {
|
||||
@ -17,7 +16,7 @@ function tailwindEscapeFix(): Plugin {
|
||||
}
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [tailwindcss(), tailwindEscapeFix(), react(), analyzer()],
|
||||
plugins: [tailwindcss(), tailwindEscapeFix(), react()],
|
||||
optimizeDeps: {
|
||||
entries: ["src/**/*.{ts,tsx}"],
|
||||
},
|
||||
|
||||
Loading…
Reference in New Issue
Block a user