Skip to content

Build your personal knowledge base with Trilium Notes

chore(dx/client): get vite build to work

Elian Doranf4a56d4e1946
diff --git a/apps/client/package.json b/apps/client/package.json
index 27811a06e4..381b091bc9 100644
--- a/apps/client/package.json
+++ b/apps/client/package.json
@@ -72,6 +72,9 @@
"script-loader": "0.7.2",
"vite-plugin-static-copy": "3.1.2"
},
+ "scripts": {
+ "build": "vite build"
+ },
"nx": {
"name": "client",
"targets": {
diff --git a/apps/client/vite.config.mts.bak b/apps/client/vite.config.mts
similarity index 82%
rename from apps/client/vite.config.mts.bak
rename to apps/client/vite.config.mts
index 72ef792ac7..29ee10ef59 100644
--- a/apps/client/vite.config.mts.bak
+++ b/apps/client/vite.config.mts
@@ -2,7 +2,6 @@
import { join, resolve } from 'path';
import { defineConfig, type Plugin } from 'vite';
import { viteStaticCopy } from 'vite-plugin-static-copy'
-import asset_path from './src/asset_path';
import webpackStatsPlugin from 'rollup-plugin-webpack-stats';
import preact from "@preact/preset-vite";
@@ -11,15 +10,7 @@ const assets = [ "assets", "stylesheets", "fonts", "translations" ];
export default defineConfig(() => ({
root: __dirname,
cacheDir: '../../node_modules/.vite/apps/client',
- base: process.env.NODE_ENV === "production" ? "" : asset_path,
- server: {
- port: 4200,
- host: 'localhost',
- },
- preview: {
- port: 4300,
- host: 'localhost',
- },
+ base: "",
plugins: [
preact(),
viteStaticCopy({
@@ -58,10 +49,6 @@ export default defineConfig(() => ({
"preact/hooks"
]
},
- // Uncomment this if you are using workers.
- // worker: {
- // plugins: [ nxViteTsPaths() ],
- // },
build: {
target: "esnext",
outDir: './dist',
@@ -100,18 +87,6 @@ export default defineConfig(() => ({
"./src/test/setup.ts"
]
},
- optimizeDeps: {
- exclude: [
- "@triliumnext/highlightjs"
- ]
- },
- css: {
- preprocessorOptions: {
- scss: {
- quietDeps: true
- }
- }
- },
commonjsOptions: {
transformMixedEsModules: true,
},