Skip to content

Commit 918fafa

Browse files
authored
Merge pull request #31 from Cardinal-Cryptography/SD-29-fix-custom-headers
SD-29: Fix custom headers missing from `dist/`
2 parents 509d521 + cdb025a commit 918fafa

File tree

3 files changed

+140
-1
lines changed

3 files changed

+140
-1
lines changed

package-lock.json

Lines changed: 130 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@
9090
"typescript": "~5.7.2",
9191
"typescript-eslint": "^8.24.1",
9292
"vite": "^6.2.0",
93+
"vite-plugin-static-copy": "^2.3.1",
9394
"vite-plugin-svgr": "^4.3.0",
9495
"vite-tsconfig-paths": "^5.1.4",
9596
"vitest": "^3.0.7"

vite.config.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ import path from 'path';
66
import react from '@vitejs/plugin-react';
77
import { objectEntries, objectFromEntries } from 'tsafe';
88
import { defineConfig, loadEnv, normalizePath } from 'vite';
9+
import { viteStaticCopy } from 'vite-plugin-static-copy';
910
import vitePluginSvgr from 'vite-plugin-svgr';
1011
import tsconfigPaths from 'vite-tsconfig-paths';
1112
import { parse } from 'yaml';
1213

1314
import envVarsSchema from './envVarsSchema';
1415
import { version } from './package.json';
15-
1616
const customHttpPath = path.resolve(__dirname, 'customHttp.yml');
1717
const customHttpContent = fs.readFileSync(customHttpPath, 'utf8');
1818
const { customHeaders } = parse(customHttpContent) as {
@@ -38,6 +38,14 @@ export default defineConfig({
3838
tsconfigPaths(),
3939
react(),
4040
vitePluginSvgr(),
41+
viteStaticCopy({
42+
targets: [
43+
{
44+
src: 'customHttp.yml',
45+
dest: '.',
46+
},
47+
],
48+
}),
4149
{
4250
name: 'configure-server',
4351
configureServer: server => {

0 commit comments

Comments
 (0)