mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-19 13:35:40 +00:00
* bump deps
* upgrade all deps
* adapt theme context
* add vanilla extract
* add basic theme
* reformat global state
* fix imports
* fix spotlight
* update args
* adapt arg names
* fix more arg renames
* fix italic
* switch sx to style
* fix types
* fix theme refs
* misc fixes
* misc fixes
* fix type
* fix selects
* misc fixes
* bug fix
* update to new style
* set text args
* fix spotlight
* dumb spotlight down
* change ActionIcons back to default
* fix name
* fix test
* adjust test to new spotlight
* package fix
* fix new code to v7
* fix building
* fix group aligment
* remove unneeded imports
* add new type
* import cleanups
* add notification style
* move context to loadable
* reorder contexts
* make test less flaky
* fix missing theming
* fix color schema switcher
* increase timeouts
* update package refs
* add missing style for datatables
* fix missing nesting
* organize imports
* move language context around
* make sure license keys are unique
* add keys to badges
* fix import
* fix missing keys
* fix missing key issue in badge section
* update packages
* fix new code to v7 style
* dummy change
* fix up test
* fix btn style
* fix merge issues
* remove placeholders
* fix color schema usage
* fix usage of ColorScheme
* fix style issues
* fix test
* fix choice field to fit stricter validation
* make test more reproducible
* wait for dash before proceeding
* bump deps
* add missing style
* do loops
* fix css
* change carousel sizing
* fix merge for v7
* fix image ratio
* Revert "bump deps"
This reverts commit 91cdae5a3e
.
* fix userstate to ensure it always renders
* await dashboard loading before resuming wiht wuick login
* fix spotlight and remove testing changes
* Catch API error
* Update breadcrumb list
* Update panel icon
* Cleanup notification drawer
* Some more tweaks
* Fix for notification count indicator
* Fix stack prop
* fix type error
* fix double timeout key
* use div instead of text
---------
Co-authored-by: Oliver Walters <oliver.henry.walters@gmail.com>
58 lines
1.6 KiB
TypeScript
58 lines
1.6 KiB
TypeScript
import { vanillaExtractPlugin } from '@vanilla-extract/vite-plugin';
|
|
import react from '@vitejs/plugin-react';
|
|
import { platform, release } from 'node:os';
|
|
import license from 'rollup-plugin-license';
|
|
import { defineConfig, splitVendorChunkPlugin } from 'vite';
|
|
import istanbul from 'vite-plugin-istanbul';
|
|
|
|
const IS_IN_WSL = platform().includes('WSL') || release().includes('WSL');
|
|
const is_coverage = process.env.VITE_COVERAGE === 'true';
|
|
|
|
if (IS_IN_WSL) {
|
|
console.log('WSL detected: using polling for file system events');
|
|
}
|
|
|
|
// https://vitejs.dev/config/
|
|
export default defineConfig({
|
|
plugins: [
|
|
react({
|
|
babel: {
|
|
plugins: ['macros']
|
|
}
|
|
}),
|
|
vanillaExtractPlugin(),
|
|
splitVendorChunkPlugin(),
|
|
license({
|
|
sourcemap: true,
|
|
thirdParty: {
|
|
includePrivate: true,
|
|
multipleVersions: true,
|
|
output: {
|
|
file: '../backend/InvenTree/web/static/web/.vite/dependencies.json',
|
|
template(dependencies) {
|
|
return JSON.stringify(dependencies);
|
|
}
|
|
}
|
|
}
|
|
}),
|
|
istanbul({
|
|
include: 'src/*',
|
|
exclude: ['node_modules', 'test/'],
|
|
extension: ['.js', '.ts', '.tsx'],
|
|
requireEnv: true
|
|
})
|
|
],
|
|
build: {
|
|
manifest: true,
|
|
outDir: '../../src/backend/InvenTree/web/static/web',
|
|
sourcemap: is_coverage
|
|
},
|
|
server: {
|
|
watch: {
|
|
// use polling only for WSL as the file system doesn't trigger notifications for Linux apps
|
|
// ref: https://github.com/vitejs/vite/issues/1153#issuecomment-785467271
|
|
usePolling: IS_IN_WSL
|
|
}
|
|
}
|
|
});
|