Files
smom-dbis-138/orchestration/portal/VITE_FIX.md
defiQUG 1fb7266469 Add Oracle Aggregator and CCIP Integration
- Introduced Aggregator.sol for Chainlink-compatible oracle functionality, including round-based updates and access control.
- Added OracleWithCCIP.sol to extend Aggregator with CCIP cross-chain messaging capabilities.
- Created .gitmodules to include OpenZeppelin contracts as a submodule.
- Developed a comprehensive deployment guide in NEXT_STEPS_COMPLETE_GUIDE.md for Phase 2 and smart contract deployment.
- Implemented Vite configuration for the orchestration portal, supporting both Vue and React frameworks.
- Added server-side logic for the Multi-Cloud Orchestration Portal, including API endpoints for environment management and monitoring.
- Created scripts for resource import and usage validation across non-US regions.
- Added tests for CCIP error handling and integration to ensure robust functionality.
- Included various new files and directories for the orchestration portal and deployment scripts.
2025-12-12 14:57:48 -08:00

1.4 KiB

Vite Configuration Fix

Issue

The alias @vue was conflicting with Vue's internal package @vue/runtime-dom. When Vue tried to import @vue/runtime-dom, Vite was resolving it to ./client/src/vue/runtime-dom instead of the npm package.

Solution

Changed the alias from @vue to @vue-components to avoid the conflict:

resolve: {
  alias: {
    '@': path.resolve(__dirname, './client/src'),
    '@vue-components': path.resolve(__dirname, './client/src/vue'),  // Changed from @vue
    '@react-components': path.resolve(__dirname, './client/src/react'), // Changed from @react
  },
  dedupe: ['vue', 'react', 'react-dom'],
},

Why This Works

  • Vue's internal packages like @vue/runtime-dom and @vue/devtools-api are now correctly resolved from node_modules
  • The alias @vue-components doesn't conflict with Vue's package namespace
  • All Vue imports continue to work correctly

Usage

If you were using @vue/ imports in your code, update them to @vue-components/:

// Before (if used)
import Component from '@vue/components/MyComponent.vue';

// After
import Component from '@vue-components/components/MyComponent.vue';

However, since we're using relative imports in the codebase, this change shouldn't affect existing code.

Verification

After this fix, the Vite dev server should start without errors:

pnpm dev:client

The server should be accessible at http://localhost:5173