mirror of
https://github.com/stackblitz-labs/bolt.diy
synced 2025-03-09 21:50:36 +00:00
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:
parent
36872ee6a0
commit
056a446f0f
@ -10,16 +10,17 @@ import { FilesStore, type FileMap } from './files';
|
|||||||
import { PreviewsStore } from './previews';
|
import { PreviewsStore } from './previews';
|
||||||
import { TerminalStore } from './terminal';
|
import { TerminalStore } from './terminal';
|
||||||
import JSZip from 'jszip';
|
import JSZip from 'jszip';
|
||||||
import pkg from 'file-saver';
|
import fileSaver from 'file-saver';
|
||||||
const { saveAs } = pkg;
|
|
||||||
import { Octokit, type RestEndpointMethodTypes } from '@octokit/rest';
|
import { Octokit, type RestEndpointMethodTypes } from '@octokit/rest';
|
||||||
import * as nodePath from 'node:path';
|
import { path } from '~/utils/path';
|
||||||
import { extractRelativePath } from '~/utils/diff';
|
import { extractRelativePath } from '~/utils/diff';
|
||||||
import { description } from '~/lib/persistence';
|
import { description } from '~/lib/persistence';
|
||||||
import Cookies from 'js-cookie';
|
import Cookies from 'js-cookie';
|
||||||
import { createSampler } from '~/utils/sampler';
|
import { createSampler } from '~/utils/sampler';
|
||||||
import type { ActionAlert } from '~/types/actions';
|
import type { ActionAlert } from '~/types/actions';
|
||||||
|
|
||||||
|
const { saveAs } = fileSaver;
|
||||||
|
|
||||||
export interface ArtifactState {
|
export interface ArtifactState {
|
||||||
id: string;
|
id: string;
|
||||||
title: string;
|
title: string;
|
||||||
@ -330,7 +331,7 @@ export class WorkbenchStore {
|
|||||||
|
|
||||||
if (data.action.type === 'file') {
|
if (data.action.type === 'file') {
|
||||||
const wc = await webcontainer;
|
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) {
|
if (this.selectedFile.value !== fullPath) {
|
||||||
this.setSelectedFile(fullPath);
|
this.setSelectedFile(fullPath);
|
||||||
|
@ -104,9 +104,7 @@
|
|||||||
"js-cookie": "^3.0.5",
|
"js-cookie": "^3.0.5",
|
||||||
"jspdf": "^2.5.2",
|
"jspdf": "^2.5.2",
|
||||||
"jszip": "^3.10.1",
|
"jszip": "^3.10.1",
|
||||||
"lucide-react": "^0.474.0",
|
|
||||||
"nanostores": "^0.10.3",
|
"nanostores": "^0.10.3",
|
||||||
"next-themes": "^0.4.4",
|
|
||||||
"ollama-ai-provider": "^0.15.2",
|
"ollama-ai-provider": "^0.15.2",
|
||||||
"path-browserify": "^1.0.1",
|
"path-browserify": "^1.0.1",
|
||||||
"react": "^18.3.1",
|
"react": "^18.3.1",
|
||||||
|
@ -230,15 +230,9 @@ importers:
|
|||||||
jszip:
|
jszip:
|
||||||
specifier: ^3.10.1
|
specifier: ^3.10.1
|
||||||
version: 3.10.1
|
version: 3.10.1
|
||||||
lucide-react:
|
|
||||||
specifier: ^0.474.0
|
|
||||||
version: 0.474.0(react@18.3.1)
|
|
||||||
nanostores:
|
nanostores:
|
||||||
specifier: ^0.10.3
|
specifier: ^0.10.3
|
||||||
version: 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:
|
ollama-ai-provider:
|
||||||
specifier: ^0.15.2
|
specifier: ^0.15.2
|
||||||
version: 0.15.2(zod@3.24.1)
|
version: 0.15.2(zod@3.24.1)
|
||||||
@ -4733,11 +4727,6 @@ packages:
|
|||||||
resolution: {integrity: sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==}
|
resolution: {integrity: sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==}
|
||||||
engines: {node: '>=12'}
|
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:
|
lz-string@1.5.0:
|
||||||
resolution: {integrity: sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ==}
|
resolution: {integrity: sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ==}
|
||||||
hasBin: true
|
hasBin: true
|
||||||
@ -5196,12 +5185,6 @@ packages:
|
|||||||
resolution: {integrity: sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==}
|
resolution: {integrity: sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==}
|
||||||
engines: {node: '>= 0.6'}
|
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:
|
node-domexception@1.0.0:
|
||||||
resolution: {integrity: sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==}
|
resolution: {integrity: sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==}
|
||||||
engines: {node: '>=10.5.0'}
|
engines: {node: '>=10.5.0'}
|
||||||
@ -11982,10 +11965,6 @@ snapshots:
|
|||||||
|
|
||||||
lru-cache@7.18.3: {}
|
lru-cache@7.18.3: {}
|
||||||
|
|
||||||
lucide-react@0.474.0(react@18.3.1):
|
|
||||||
dependencies:
|
|
||||||
react: 18.3.1
|
|
||||||
|
|
||||||
lz-string@1.5.0: {}
|
lz-string@1.5.0: {}
|
||||||
|
|
||||||
magic-string@0.25.9:
|
magic-string@0.25.9:
|
||||||
@ -12819,11 +12798,6 @@ snapshots:
|
|||||||
|
|
||||||
negotiator@0.6.3: {}
|
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-domexception@1.0.0: {}
|
||||||
|
|
||||||
node-fetch-native@1.6.6: {}
|
node-fetch-native@1.6.6: {}
|
||||||
|
@ -89,7 +89,6 @@ export default defineConfig((config) => {
|
|||||||
__PKG_DEV_DEPENDENCIES: JSON.stringify(pkg.devDependencies),
|
__PKG_DEV_DEPENDENCIES: JSON.stringify(pkg.devDependencies),
|
||||||
__PKG_PEER_DEPENDENCIES: JSON.stringify(pkg.peerDependencies),
|
__PKG_PEER_DEPENDENCIES: JSON.stringify(pkg.peerDependencies),
|
||||||
__PKG_OPTIONAL_DEPENDENCIES: JSON.stringify(pkg.optionalDependencies),
|
__PKG_OPTIONAL_DEPENDENCIES: JSON.stringify(pkg.optionalDependencies),
|
||||||
module: {},
|
|
||||||
},
|
},
|
||||||
build: {
|
build: {
|
||||||
target: 'esnext',
|
target: 'esnext',
|
||||||
|
Loading…
Reference in New Issue
Block a user