mirror of
https://github.com/travisvn/obsidian-vision-recall.git
synced 2026-07-22 05:38:13 +00:00
- Migrated CSS files to SCSS with more modular and scoped styling - Added new DeleteConfirmationModal for consistent deletion UX - Updated file and folder handling to use Obsidian's native methods - Improved local storage interactions through Obsidian app methods - Bumped version to 1.0.4 and updated minimum app version - Added new path alias and TypeScript configuration updates And all other points outlined in the PR review
64 lines
No EOL
1.6 KiB
TypeScript
64 lines
No EOL
1.6 KiB
TypeScript
import { UserConfig, defineConfig } from "vite";
|
|
import path from "path";
|
|
import builtins from "builtin-modules";
|
|
import react from "@vitejs/plugin-react";
|
|
|
|
export default defineConfig(async ({ mode }) => {
|
|
const { resolve } = path;
|
|
const prod = mode === "production";
|
|
|
|
return {
|
|
plugins: [react()],
|
|
resolve: {
|
|
alias: {
|
|
"@": path.resolve(__dirname, "./src")
|
|
},
|
|
},
|
|
css: {
|
|
preprocessorOptions: {
|
|
scss: {
|
|
// You can add global Sass variables here if needed
|
|
// additionalData: `@import "@/styles/variables.scss";`,
|
|
},
|
|
},
|
|
},
|
|
build: {
|
|
lib: {
|
|
entry: resolve(__dirname, "src/main.ts"),
|
|
name: "main",
|
|
fileName: () => "main.js",
|
|
formats: ["cjs"],
|
|
},
|
|
minify: prod,
|
|
sourcemap: prod ? false : "inline",
|
|
outDir: "./",
|
|
cssCodeSplit: false,
|
|
emptyOutDir: false,
|
|
rollupOptions: {
|
|
input: {
|
|
main: resolve(__dirname, "src/main.ts"),
|
|
},
|
|
output: {
|
|
entryFileNames: "main.js",
|
|
assetFileNames: "styles.css",
|
|
},
|
|
external: [
|
|
"obsidian",
|
|
"electron",
|
|
"@codemirror/autocomplete",
|
|
"@codemirror/collab",
|
|
"@codemirror/commands",
|
|
"@codemirror/language",
|
|
"@codemirror/lint",
|
|
"@codemirror/search",
|
|
"@codemirror/state",
|
|
"@codemirror/view",
|
|
"@lezer/common",
|
|
"@lezer/highlight",
|
|
"@lezer/lr",
|
|
...builtins,
|
|
],
|
|
},
|
|
},
|
|
} as UserConfig;
|
|
}); |