Skip to content

Commit

Permalink
feat(api): migrate from CRA to Vite
Browse files Browse the repository at this point in the history
This resolves all critical vulnerabilities, makes the API site build
faster and more reliable.
  • Loading branch information
cmark committed Oct 5, 2024
1 parent 9348119 commit df334fe
Show file tree
Hide file tree
Showing 13 changed files with 7,954 additions and 33,851 deletions.
4 changes: 2 additions & 2 deletions core/com.b2international.snowowl.core.rest/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
</excludes>
</fileset>
<fileset>
<directory>snow-owl-api-docs/build</directory>
<directory>snow-owl-api-docs/dist</directory>
</fileset>
</filesets>
</configuration>
Expand Down Expand Up @@ -205,7 +205,7 @@
<resources>
<resource>
<directory>
${basedir}/snow-owl-api-docs/build</directory>
${basedir}/snow-owl-api-docs/dist</directory>
</resource>
</resources>
</configuration>
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
REACT_APP_SO_BASE_URL=.
VITE_SO_BASE_URL=.
Original file line number Diff line number Diff line change
@@ -1,23 +1,31 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

# testing
/coverage
node_modules
dist
dist-ssr
*.local

# production
/build
# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import js from '@eslint/js'
import globals from 'globals'
import react from 'eslint-plugin-react'
import reactHooks from 'eslint-plugin-react-hooks'
import reactRefresh from 'eslint-plugin-react-refresh'

export default [
{ ignores: ['dist'] },
{
files: ['**/*.{js,jsx}'],
languageOptions: {
ecmaVersion: 2020,
globals: globals.browser,
parserOptions: {
ecmaVersion: 'latest',
ecmaFeatures: { jsx: true },
sourceType: 'module',
},
},
settings: { react: { version: '18.3' } },
plugins: {
react,
'react-hooks': reactHooks,
'react-refresh': reactRefresh,
},
rules: {
...js.configs.recommended.rules,
...react.configs.recommended.rules,
...react.configs['jsx-runtime'].rules,
...reactHooks.configs.recommended.rules,
'react/jsx-no-target-blank': 'off',
'react-refresh/only-export-components': [
'warn',
{ allowConstantExport: true },
],
},
},
]
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta charset="UTF-8" />
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="theme-color" content="#000000" />
<meta
name="description"
Expand All @@ -15,5 +15,6 @@
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<script type="module" src="/src/main.jsx"></script>
</body>
</html>
Loading

0 comments on commit df334fe

Please sign in to comment.