Skip to content

Commit

Permalink
Add vite and netlify configs
Browse files Browse the repository at this point in the history
  • Loading branch information
will-moore committed Feb 10, 2023
1 parent 7aad2ec commit 4580db6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
4 changes: 4 additions & 0 deletions netlify.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[[redirects]]
from = ":/*"
to = "/index.html"
status = 200
10 changes: 8 additions & 2 deletions vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@ import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'

// https://vitejs.dev/config/
export default defineConfig({
let config = {
plugins: [react()]
})
};
// this will be undefined when deployed from netlify, but is used by gh-pages
if (process.env.GITHUB_REPOSITORY_OWNER) {
config.base = `https://${process.env.GITHUB_REPOSITORY_OWNER}.github.io/ome-ngff-validator/`;
}

export default defineConfig(config);

0 comments on commit 4580db6

Please sign in to comment.