mirror of
https://github.com/Tria-plc/emaui.git
synced 2026-08-26 19:12:50 +00:00
feat: configure vite settings for portal and backoffice apps with shared environment directory
This commit is contained in:
@@ -9,19 +9,19 @@ export default defineConfig({
|
|||||||
// its built-in default.
|
// its built-in default.
|
||||||
envDir: '../../',
|
envDir: '../../',
|
||||||
cacheDir: '../../node_modules/.vite/apps/backoffice',
|
cacheDir: '../../node_modules/.vite/apps/backoffice',
|
||||||
// server: {
|
|
||||||
// port: 4201,
|
|
||||||
// host: 'localhost',
|
|
||||||
// },
|
|
||||||
server: {
|
server: {
|
||||||
port: 4201,
|
port: 4201,
|
||||||
proxy: {
|
host: 'localhost',
|
||||||
'/api': {
|
|
||||||
target: 'http://localhost:3000', // change from 'https://ema-api-dev.triaplc.com'
|
|
||||||
changeOrigin: true,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
},
|
// server: {
|
||||||
|
// port: 4201,
|
||||||
|
// proxy: {
|
||||||
|
// '/api': {
|
||||||
|
// target: 'http://localhost:3000', // change from 'https://ema-api-dev.triaplc.com'
|
||||||
|
// changeOrigin: true,
|
||||||
|
// },
|
||||||
|
// },
|
||||||
|
// },
|
||||||
preview: { port: 4201, host: 'localhost' },
|
preview: { port: 4201, host: 'localhost' },
|
||||||
plugins: [react(), nxViteTsPaths()],
|
plugins: [react(), nxViteTsPaths()],
|
||||||
resolve: {
|
resolve: {
|
||||||
@@ -45,11 +45,11 @@ export default defineConfig({
|
|||||||
// Unit tests for the pure helpers behind a screen (formatters, URL state).
|
// Unit tests for the pure helpers behind a screen (formatters, URL state).
|
||||||
// Component tests are deliberately not set up: nothing here renders React,
|
// Component tests are deliberately not set up: nothing here renders React,
|
||||||
// so no jsdom environment or setup file is needed.
|
// so no jsdom environment or setup file is needed.
|
||||||
test: {
|
// test: {
|
||||||
watch: false,
|
// watch: false,
|
||||||
globals: true,
|
// globals: true,
|
||||||
environment: 'node',
|
// environment: 'node',
|
||||||
include: ['src/**/*.spec.ts'],
|
// include: ['src/**/*.spec.ts'],
|
||||||
reporters: ['default'],
|
// reporters: ['default'],
|
||||||
},
|
// },
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -10,6 +10,15 @@ export default defineConfig({
|
|||||||
envDir: '../../',
|
envDir: '../../',
|
||||||
cacheDir: '../../node_modules/.vite/apps/portal',
|
cacheDir: '../../node_modules/.vite/apps/portal',
|
||||||
server: { port: 4200, host: 'localhost' },
|
server: { port: 4200, host: 'localhost' },
|
||||||
|
// server: {
|
||||||
|
// port: 4200,
|
||||||
|
// proxy: {
|
||||||
|
// '/api': {
|
||||||
|
// target: 'http://localhost:3000', // change from 'https://ema-api-dev.triaplc.com'
|
||||||
|
// changeOrigin: true,
|
||||||
|
// },
|
||||||
|
// },
|
||||||
|
// },
|
||||||
preview: { port: 4200, host: 'localhost' },
|
preview: { port: 4200, host: 'localhost' },
|
||||||
plugins: [react(), nxViteTsPaths()],
|
plugins: [react(), nxViteTsPaths()],
|
||||||
resolve: {
|
resolve: {
|
||||||
|
|||||||
Reference in New Issue
Block a user