mirror of
https://github.com/Myriad-Dreamin/tinymist.git
synced 2025-12-23 08:47:50 +00:00
## Features - Added font filters. - Greatly improved styles. Now it follows the VSCode theme. - Added tailwindcss-like utility classes. <img width="713" height="941" alt="3H L7HDJOZ`X(UJU)L2PEYS" src="https://github.com/user-attachments/assets/2a239bde-e01e-497c-803e-3d1c958319b6" />
38 lines
851 B
JavaScript
38 lines
851 B
JavaScript
import { defineConfig } from "vite";
|
|
import { viteSingleFile } from "vite-plugin-singlefile";
|
|
import path from "node:path";
|
|
|
|
// /src/main.ts
|
|
|
|
const compPrefix = "--component=";
|
|
const componentArgs = process.argv.find((arg) => arg.startsWith(compPrefix));
|
|
let output = "dist/default";
|
|
if (componentArgs) {
|
|
const component = componentArgs.substring(compPrefix.length);
|
|
process.env.VITE_ENTRY = `/src/main.${component}.ts`;
|
|
output = `dist/${component}`;
|
|
} else {
|
|
process.env.VITE_ENTRY = "/src/main.ts";
|
|
}
|
|
|
|
export default defineConfig({
|
|
resolve: {
|
|
alias: {
|
|
"@": path.resolve(__dirname, "src"),
|
|
},
|
|
},
|
|
|
|
plugins: [viteSingleFile()],
|
|
assetsInclude: ["**/*.onnx"],
|
|
build: {
|
|
minify: false,
|
|
outDir: output,
|
|
},
|
|
optimizeDeps: {
|
|
esbuildOptions: {
|
|
loader: {
|
|
".onnx": "dataurl",
|
|
},
|
|
},
|
|
},
|
|
});
|