feat(app): add environment import/export and sidebar footer info
- add environment import/export API endpoints and client integration - add environment export actions and toolbar import/export buttons in UI - move theme switcher to sidebar bottom and show root package version - switch snippet card menu icon to cog for consistent options affordance
This commit is contained in:
@@ -1,14 +1,29 @@
|
||||
/// <reference types="vitest/config" />
|
||||
import { defineConfig } from 'vite';
|
||||
import react from '@vitejs/plugin-react';
|
||||
import fs from 'node:fs';
|
||||
import path from 'node:path';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
import { storybookTest } from '@storybook/addon-vitest/vitest-plugin';
|
||||
import { playwright } from '@vitest/browser-playwright';
|
||||
const dirname = typeof __dirname !== 'undefined' ? __dirname : path.dirname(fileURLToPath(import.meta.url));
|
||||
const rootPackageJsonPath = path.resolve(dirname, '../package.json');
|
||||
const APP_VERSION = (() => {
|
||||
try {
|
||||
const json = JSON.parse(fs.readFileSync(rootPackageJsonPath, 'utf8')) as {
|
||||
version?: string;
|
||||
};
|
||||
return json.version ?? 'dev';
|
||||
} catch {
|
||||
return 'dev';
|
||||
}
|
||||
})();
|
||||
|
||||
// More info at: https://storybook.js.org/docs/next/writing-tests/integrations/vitest-addon
|
||||
export default defineConfig({
|
||||
define: {
|
||||
__APP_VERSION__: JSON.stringify(APP_VERSION),
|
||||
},
|
||||
plugins: [react()],
|
||||
server: {
|
||||
proxy: {
|
||||
|
||||
Reference in New Issue
Block a user