Skip to content

Commit

Permalink
Refactor(demo): Use server settings directly from the common package
Browse files Browse the repository at this point in the history
  • Loading branch information
literat committed Nov 4, 2024
1 parent edf2ac6 commit c980fa0
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions apps/demo/config/vite/app.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
import { join, resolve } from 'path';
import { defineConfig } from 'vite';
import handlebars from 'vite-plugin-handlebars';
// Vite config cannot import untranspiled ES modules
// so `import { SERVERS } from '@lmc-eu/spirit-commmon';` will not work
// to make it work the package must be transpiled into CommonJS
// as a workaround, we can import the file directly
// @see: https://github.com/vitejs/vite/issues/5370
import { SERVERS } from '../../../../packages/common/constants/servers';
import { getNestedDirs, mapKeys } from '../../scripts/prepareDist';
import { getListOfIcons, getListOfNestedDirectories } from '../../scripts/utils';

Expand All @@ -15,10 +21,7 @@ export default defineConfig({
hmr: {
overlay: false,
},
host: 'localhost',
https: false,
port: 3456,
strictPort: true,
...SERVERS.DEVELOPMENT.web,
},
resolve: {
alias: {
Expand Down

0 comments on commit c980fa0

Please sign in to comment.