Skip to content

Commit

Permalink
feat: switch from cra to vite
Browse files Browse the repository at this point in the history
  • Loading branch information
fboulnois committed Feb 12, 2025
1 parent 1746bb0 commit 57ad158
Show file tree
Hide file tree
Showing 8 changed files with 68 additions and 70 deletions.
45 changes: 45 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="theme-color" content="#000000">

<!-- Downloaded from https://fonts.googleapis.com/css?family=Roboto:300,400,400italic,500,500italic,700 -->
<link rel="stylesheet" href="/css/roboto-fonts.css" />
<!-- Downloaded from https://fonts.googleapis.com/css?family=Montserrat:400,400i,600&display=swap -->
<link rel="stylesheet" href="/css/montserrat-fonts.css" />

<!--
manifest.json provides metadata used when your web app is added to the
homescreen on Android. See https://developers.google.com/web/fundamentals/engage-and-retain/web-app-manifest/
-->
<link rel="manifest" href="/manifest.json">
<link rel="shortcut icon" href="/favicon.ico">

<link rel="apple-touch-icon" type="image/png" href="/images/favicon/apple-touch-icon.png" />
<link rel="icon" type="image/png" href="/images/favicon/favicon-32x32.png" sizes="32x32" />
<link rel="icon" type="image/png" href="/images/favicon/favicon-16x16.png" sizes="16x16" />
<link rel="mask-icon" href="/images/favicon/safari-pinned-tab.svg">

<!-- AppCues Requirements -->
<script type="text/javascript">
window.AppcuesSettings = { enableURLDetection: true };
</script>
<script src="https://fast.appcues.com/49767.js">
</script>
<!-- End AppCues Requirements -->

<title>Broad Data Use Oversight System</title>
</head>

<body>
<noscript>
You need to enable JavaScript to run this app.
</noscript>
<script type="module" src="./src/index.tsx"></script>
<div id="root"></div>
</body>

</html>
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,9 @@
},
"scripts": {
"analyze": "npm run build; source-map-explorer build/static/js/main.*",
"start": "react-scripts start",
"genschemas": "./scripts/compile-jsonschema.sh",
"build": "react-scripts build",
"eject": "react-scripts eject",
"start": "vite",
"build": "vite build",
"preview": "vite preview",
"lint": "npx eslint . --ext .js,.jsx,.ts,.tsx --ignore-pattern \"cypress/*\"",
"lint:fix": "npx eslint . --ext .js,.jsx,.ts,.tsx --ignore-pattern \"cypress/*\" --fix",
"cypress:open": "CYPRESS_ADMIN=$(cat cypress/fixtures/duos-automation-admin.json) CYPRESS_CHAIR=$(cat cypress/fixtures/duos-automation-chair.json) CYPRESS_MEMBER=$(cat cypress/fixtures/duos-automation-member.json) CYPRESS_RESEARCHER=$(cat cypress/fixtures/duos-automation-researcher.json) CYPRESS_SIGNING_OFFICIAL=$(cat cypress/fixtures/duos-automation-signing-official.json) cypress open",
Expand Down Expand Up @@ -93,5 +92,6 @@
],
"engines": {
"node": ">=22.11.0"
}
},
"type": "module"
}
2 changes: 1 addition & 1 deletion public/images/favicon/browserconfig.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<browserconfig>
<msapplication>
<tile>
<square150x150logo src="%PUBLIC_URL%/images/favicon/mstile-150x150.png"/>
<square150x150logo src="/images/favicon/mstile-150x150.png"/>
<TileColor>#2b5797</TileColor>
</tile>
</msapplication>
Expand Down
64 changes: 0 additions & 64 deletions public/index.html

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
17 changes: 17 additions & 0 deletions vite.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';

// https://vitejs.dev/config/
export default defineConfig({
plugins: [
react({ include: /\.(mdx|js|jsx|ts|tsx)$/ }),
],
assetsInclude: ['**/*.md'],
build: {
outDir: 'build',
target: 'es2022'
},
server: {
port: 3000,
},
});

0 comments on commit 57ad158

Please sign in to comment.