-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
43 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
# only Vars prefixed with `VITE_` will be available on to the client | ||
VITE_API_URL=http://localhost:8000 | ||
VITE_CSRF_COOKIE_NAME=csrftoken | ||
VITE_CSRF_HEADER_NAME=x-csrftoken | ||
VITE_SHELTER_API_URL=http://localhost:8000 | ||
|
||
# Optional Settings | ||
VITE_SHELTER_CSRF_COOKIE_NAME=csrftoken | ||
VITE_SHELTER_CSRF_HEADER_NAME=x-csrftoken |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,39 @@ | ||
/// <reference types='vitest' /> | ||
import { defineConfig } from 'vite'; | ||
import react from '@vitejs/plugin-react'; | ||
import { nxViteTsPaths } from '@nx/vite/plugins/nx-tsconfig-paths.plugin'; | ||
import react from '@vitejs/plugin-react'; | ||
import { defineConfig } from 'vite'; | ||
|
||
export default defineConfig({ | ||
root: __dirname, | ||
cacheDir: '../../node_modules/.vite/apps/shelter-web', | ||
export default defineConfig(() => { | ||
const branchName = process.env.BRANCH_NAME || '/'; | ||
return { | ||
root: __dirname, | ||
base: branchName, | ||
cacheDir: '../../node_modules/.vite/apps/shelter-web', | ||
|
||
server: { | ||
port: 4200, | ||
host: 'localhost', | ||
}, | ||
server: { | ||
port: 4200, | ||
host: 'localhost', | ||
}, | ||
|
||
preview: { | ||
port: 4300, | ||
host: 'localhost', | ||
}, | ||
preview: { | ||
port: 4300, | ||
host: 'localhost', | ||
}, | ||
|
||
plugins: [react(), nxViteTsPaths()], | ||
plugins: [react(), nxViteTsPaths()], | ||
|
||
// Uncomment this if you are using workers. | ||
// worker: { | ||
// plugins: [ nxViteTsPaths() ], | ||
// }, | ||
// Uncomment this if you are using workers. | ||
// worker: { | ||
// plugins: [ nxViteTsPaths() ], | ||
// }, | ||
|
||
build: { | ||
outDir: '../../dist/apps/shelter-web', | ||
emptyOutDir: true, | ||
reportCompressedSize: true, | ||
commonjsOptions: { | ||
transformMixedEsModules: true, | ||
build: { | ||
outDir: '../../dist/apps/shelter-web', | ||
emptyOutDir: true, | ||
reportCompressedSize: true, | ||
commonjsOptions: { | ||
transformMixedEsModules: true, | ||
}, | ||
}, | ||
}, | ||
}; | ||
}); |