Skip to content

Commit

Permalink
fix: windows builds
Browse files Browse the repository at this point in the history
Workaround sourced from vitejs/vite#15153

Signed-off-by: Fernando Fernández <ferferga@hotmail.com>
  • Loading branch information
ferferga committed Jan 1, 2024
1 parent 00c2c75 commit b6f34b5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
5 changes: 5 additions & 0 deletions frontend/scripts/paths.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,8 @@ import { resolve } from 'node:path';

export const localeFilesFolder = resolve('locales/**');
export const srcRoot = `${resolve('src')}/`;
export const entrypoints = {
index: `${resolve('index.html')}`,
main: `${srcRoot}/main.ts`,
splashscreen: `${srcRoot}/splashscreen.ts`
};
7 changes: 6 additions & 1 deletion frontend/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
import Components from 'unplugin-vue-components/vite';
import VueRouter from 'unplugin-vue-router/vite';
import { defineConfig, UserConfig } from 'vite';
import { localeFilesFolder, srcRoot } from './scripts/paths';
import { entrypoints, localeFilesFolder, srcRoot } from './scripts/paths';
import virtualModules from './scripts/virtual-modules';

export default defineConfig(({ mode }): UserConfig => {
Expand Down Expand Up @@ -69,6 +69,11 @@ export default defineConfig(({ mode }): UserConfig => {
modulePreload: false,
reportCompressedSize: false,
rollupOptions: {
input: {
splashscreen: entrypoints.splashscreen,
main: entrypoints.main,
index: entrypoints.index
},
output: {
inlineDynamicImports: true,
validate: true,
Expand Down

0 comments on commit b6f34b5

Please sign in to comment.