chore: Remove unused dependencies and clean up imports

- Removed lucide-react and next-themes from package dependencies
- Simplified import in workbench store for path and file-saver
- Removed unnecessary module definition in Vite config
This commit is contained in:
Toddyclipsgg 2025-02-23 20:00:17 -03:00
parent 36872ee6a0
commit 056a446f0f
4 changed files with 5 additions and 33 deletions

View File

@ -10,16 +10,17 @@ import { FilesStore, type FileMap } from './files';
import { PreviewsStore } from './previews';
import { TerminalStore } from './terminal';
import JSZip from 'jszip';
import pkg from 'file-saver';
const { saveAs } = pkg;
import fileSaver from 'file-saver';
import { Octokit, type RestEndpointMethodTypes } from '@octokit/rest';
import * as nodePath from 'node:path';
import { path } from '~/utils/path';
import { extractRelativePath } from '~/utils/diff';
import { description } from '~/lib/persistence';
import Cookies from 'js-cookie';
import { createSampler } from '~/utils/sampler';
import type { ActionAlert } from '~/types/actions';
const { saveAs } = fileSaver;
export interface ArtifactState {
id: string;
title: string;
@ -330,7 +331,7 @@ export class WorkbenchStore {
if (data.action.type === 'file') {
const wc = await webcontainer;
const fullPath = nodePath.join(wc.workdir, data.action.filePath);
const fullPath = path.join(wc.workdir, data.action.filePath);
if (this.selectedFile.value !== fullPath) {
this.setSelectedFile(fullPath);

View File

@ -104,9 +104,7 @@
"js-cookie": "^3.0.5",
"jspdf": "^2.5.2",
"jszip": "^3.10.1",
"lucide-react": "^0.474.0",
"nanostores": "^0.10.3",
"next-themes": "^0.4.4",
"ollama-ai-provider": "^0.15.2",
"path-browserify": "^1.0.1",
"react": "^18.3.1",

View File

@ -230,15 +230,9 @@ importers:
jszip:
specifier: ^3.10.1
version: 3.10.1
lucide-react:
specifier: ^0.474.0
version: 0.474.0(react@18.3.1)
nanostores:
specifier: ^0.10.3
version: 0.10.3
next-themes:
specifier: ^0.4.4
version: 0.4.4(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
ollama-ai-provider:
specifier: ^0.15.2
version: 0.15.2(zod@3.24.1)
@ -4733,11 +4727,6 @@ packages:
resolution: {integrity: sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==}
engines: {node: '>=12'}
lucide-react@0.474.0:
resolution: {integrity: sha512-CmghgHkh0OJNmxGKWc0qfPJCYHASPMVSyGY8fj3xgk4v84ItqDg64JNKFZn5hC6E0vHi6gxnbCgwhyVB09wQtA==}
peerDependencies:
react: ^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0
lz-string@1.5.0:
resolution: {integrity: sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ==}
hasBin: true
@ -5196,12 +5185,6 @@ packages:
resolution: {integrity: sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==}
engines: {node: '>= 0.6'}
next-themes@0.4.4:
resolution: {integrity: sha512-LDQ2qIOJF0VnuVrrMSMLrWGjRMkq+0mpgl6e0juCLqdJ+oo8Q84JRWT6Wh11VDQKkMMe+dVzDKLWs5n87T+PkQ==}
peerDependencies:
react: ^16.8 || ^17 || ^18 || ^19 || ^19.0.0-rc
react-dom: ^16.8 || ^17 || ^18 || ^19 || ^19.0.0-rc
node-domexception@1.0.0:
resolution: {integrity: sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==}
engines: {node: '>=10.5.0'}
@ -11982,10 +11965,6 @@ snapshots:
lru-cache@7.18.3: {}
lucide-react@0.474.0(react@18.3.1):
dependencies:
react: 18.3.1
lz-string@1.5.0: {}
magic-string@0.25.9:
@ -12819,11 +12798,6 @@ snapshots:
negotiator@0.6.3: {}
next-themes@0.4.4(react-dom@18.3.1(react@18.3.1))(react@18.3.1):
dependencies:
react: 18.3.1
react-dom: 18.3.1(react@18.3.1)
node-domexception@1.0.0: {}
node-fetch-native@1.6.6: {}

View File

@ -89,7 +89,6 @@ export default defineConfig((config) => {
__PKG_DEV_DEPENDENCIES: JSON.stringify(pkg.devDependencies),
__PKG_PEER_DEPENDENCIES: JSON.stringify(pkg.peerDependencies),
__PKG_OPTIONAL_DEPENDENCIES: JSON.stringify(pkg.optionalDependencies),
module: {},
},
build: {
target: 'esnext',