feat(auto-import): add unplugin-auto-import for automatic imports #1813
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request includes several changes to improve the configuration and codebase of the
apps/desktop
andapps/web
projects. The most important changes involve the addition of theunplugin-auto-import
plugin, updates to CSS preprocessor options, and refactoring the usage of Vue components and imports.Configuration Improvements:
apps/desktop/electron.vite.config.ts
: Addedunplugin-auto-import
plugin for automatic imports and updated CSS preprocessor options to use the modern compiler for SCSS. [1] [2] [3]apps/web/vite.config.ts
: Addedunplugin-auto-import
plugin for automatic imports and updated CSS preprocessor options to use the modern compiler for SCSS. [1] [2] [3]apps/desktop/package.json
,apps/web/package.json
,packages/ui/package.json
: Addedunplugin-auto-import
dependency. [1] [2] [3]Codebase Simplification:
apps/desktop/src/renderer/src/composables/useMockData.ts
,apps/web/src/composables/useMockData.ts
: Removed unnecessaryref
import from Vue.apps/desktop/src/renderer/src/main.ts
,apps/web/src/main.ts
: Removed unused imports ofcreatePinia
andcreateApp
from Vue.apps/desktop/src/renderer/src/pages/connections/[id].vue
,apps/web/src/pages/connections/[id].vue
: Removed commented-out imports. (apps/desktop/src/renderer/src/pages/connections/[id].vueL2-L4)apps/desktop/src/renderer/src/pages/connections/index.vue
,apps/web/src/pages/connections/index.vue
: Removed unused import ofuseMockData
and added CSS classes for styling.apps/desktop/src/router.ts
,apps/web/src/router.ts
: Removed unused import ofuseMockData
.Other Changes:
apps/desktop/tsconfig.web.json
,apps/web/tsconfig.app.json
: Included auto-imports and components declarations. [1] [2]packages/tailwind-config/postcss.config.cjs
: Updated Tailwind CSS configuration to include nesting.packages/ui/src/components/common/LeftMenu.vue
: Refactored to useElAside
andRouterLink
components. (F6efaa5fL1R1, packages/ui/src/components/common/LeftMenu.vueL51-R62)packages/ui/src/components/common/MainView.vue
: Refactored to useElMain
andRouterView
components.