mirror of
https://github.com/zadam/trilium.git
synced 2026-01-16 19:44:24 +01:00
chore(client): reintroduce live refresh
This commit is contained in:
parent
349203e300
commit
8dc8b046fb
@ -1,4 +1,5 @@
|
||||
/// <reference types='vitest' />
|
||||
import prefresh from '@prefresh/vite';
|
||||
import { join } from 'path';
|
||||
import webpackStatsPlugin from 'rollup-plugin-webpack-stats';
|
||||
import { defineConfig } from 'vite';
|
||||
@ -9,9 +10,13 @@ const assets = [ "assets", "stylesheets", "fonts", "translations" ];
|
||||
const isDev = process.env.NODE_ENV === "development";
|
||||
let plugins: any = [];
|
||||
|
||||
if (!isDev) {
|
||||
if (isDev) {
|
||||
// Add Prefresh for Preact HMR in development
|
||||
plugins = [
|
||||
prefresh()
|
||||
];
|
||||
} else {
|
||||
plugins = [
|
||||
...plugins,
|
||||
viteStaticCopy({
|
||||
targets: assets.map((asset) => ({
|
||||
src: `src/${asset}/*`,
|
||||
|
||||
4
pnpm-lock.yaml
generated
4
pnpm-lock.yaml
generated
@ -15752,8 +15752,6 @@ snapshots:
|
||||
'@ckeditor/ckeditor5-ui': 47.3.0
|
||||
'@ckeditor/ckeditor5-utils': 47.3.0
|
||||
ckeditor5: 47.3.0
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
'@ckeditor/ckeditor5-heading@47.3.0':
|
||||
dependencies:
|
||||
@ -15947,6 +15945,8 @@ snapshots:
|
||||
'@ckeditor/ckeditor5-utils': 47.3.0
|
||||
ckeditor5: 47.3.0
|
||||
es-toolkit: 1.39.5
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
'@ckeditor/ckeditor5-merge-fields@47.3.0':
|
||||
dependencies:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user