mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 02:16:05 +01:00 
			
		
		
		
	chore(dx/client): get vite build to work
This commit is contained in:
		| @@ -72,6 +72,9 @@ | ||||
|     "script-loader": "0.7.2", | ||||
|     "vite-plugin-static-copy": "3.1.2" | ||||
|   }, | ||||
|   "scripts": { | ||||
|     "build": "vite build" | ||||
|   }, | ||||
|   "nx": { | ||||
|     "name": "client", | ||||
|     "targets": { | ||||
|   | ||||
| @@ -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, | ||||
|     }, | ||||
		Reference in New Issue
	
	Block a user