Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,8 @@
"@types/react": "^18.3.13",
"@types/react-dom": "^18.3.1",
"@types/react-table": "^7.7.20",
"@vitejs/plugin-react": "^5.1.4",
"@vitest/coverage-v8": "^4.0.18",
"@vitejs/plugin-react": "^6.0.1",
"@vitest/coverage-v8": "^4.1.0",
"@zakodium/tsconfig": "^1.0.2",
"cross-env": "^10.1.0",
"cspell": "^9.7.0",
Expand All @@ -157,13 +157,12 @@
"react-dom": "^18.3.1",
"react-router-dom": "^7.13.1",
"rimraf": "^6.1.3",
"rollup-plugin-analyzer": "^4.0.0",
"serve": "^14.2.6",
"stylelint": "^17.4.0",
"stylelint-config-standard": "^40.0.0",
"typescript": "~5.9.3",
"vite": "^7.3.1",
"vitest": "^4.0.18"
"vite": "^8.0.0",
"vitest": "^4.1.0"
},
"volta": {
"node": "24.13.1"
Expand Down
27 changes: 8 additions & 19 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import fs from 'node:fs';
import path from 'node:path';

import react from '@vitejs/plugin-react';
import analyze from 'rollup-plugin-analyzer';
import type { AliasOptions } from 'vite';
import { defaultClientConditions, defaultServerConditions } from 'vite';
import { defineConfig } from 'vitest/config';
Expand All @@ -21,30 +20,20 @@ export default () => {

return defineConfig({
base: './',
esbuild: {
jsx: 'automatic',
sourcemap: 'inline',
},
oxc: {},
build: {
sourcemap: 'inline',
rollupOptions: {
// @ts-expect-error analyzer types are wrong.
plugins: process.env.ANALYZE ? [analyze()] : [],
rolldownOptions: {
output: {
manualChunks(id) {
if (id.includes('node_modules/openchemlib/')) {
return 'openchemlib';
}

if (id.includes('node_modules')) {
return 'vendor';
}

return undefined;
codeSplitting: {
groups: [
{ name: 'openchemlib', test: 'node_modules/openchemlib/' },
{ name: 'vendor', test: 'node_modules/' },
],
},
},
},
minify: process.env.NO_MINIFY ? false : 'esbuild',
minify: process.env.NO_MINIFY ? false : 'oxc',
},
plugins: [react()],
resolve: {
Expand Down
Loading