Skip to content

Commit

Permalink
Try replacing wait-on
Browse files Browse the repository at this point in the history
  • Loading branch information
samanehsan committed Aug 22, 2023
1 parent 64e2ad6 commit 80fb251
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
env:
DISABLE_ESLINT_PLUGIN: true
run: |
npm start & npx wait-on http://localhost:3000 --verbose
npm start & timeout 600 bash -c "until nc -z localhost 3000; do sleep 5; done"
# Build the Docker image
- name: Build
run: |
Expand Down
25 changes: 13 additions & 12 deletions vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@ const googleSheetsApi = 'https://sheets.googleapis.com';
const driveApi = 'https://www.googleapis.com';

function fixAcceptHeader404() {
return {
name: 'fix-accept-header-404', // issue with vite dev server: https://github.com/vitejs/vite/issues/9520
configureServer(server) {
server.middlewares.use((req, _res, next) => {
if (req.headers.accept == 'application/json, text/plain, */*') {
req.headers.accept = '*/*';
}
next();
});
},
};
return {
name: 'fix-accept-header-404', // issue with vite dev server: https://github.com/vitejs/vite/issues/9520
configureServer(server) {
server.middlewares.use((req, _res, next) => {
if (req.headers.accept === 'application/json, text/plain, */*') {
req.headers.accept = '*/*';
}
next();
});
},
};
}

dns.setDefaultResultOrder('verbatim');
Expand All @@ -43,11 +43,12 @@ export default defineConfig({
svgr(),
tsconfigPaths(),
eslint(),
fixAcceptHeader404(),
// fixAcceptHeader404(),
],
server: {
port: 3000,
host: 'localhost',
open: true,
proxy: {
'/api': {
target: proxyUrl,
Expand Down

0 comments on commit 80fb251

Please sign in to comment.