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

This commit is contained in:
Elian Doran 2025-08-31 23:02:41 +03:00
parent f3f7ff5622
commit f4a56d4e19
No known key found for this signature in database
2 changed files with 4 additions and 26 deletions

View File

@ -72,6 +72,9 @@
"script-loader": "0.7.2",
"vite-plugin-static-copy": "3.1.2"
},
"scripts": {
"build": "vite build"
},
"nx": {
"name": "client",
"targets": {

View File

@ -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,
},