refactor: Replace Rollup with Vite (#2656)
This is a high risk change: every byte the card ships is emitted by a
different bundler, minified by a different minifier, and every
stylesheet is compiled by a different sass. The intent is that the
card's behaviour is unchanged.
**Significant development win**: Build time drops from 24s to 1.1s 🎉
Also adds a test suite ('dist') that runs against the built bundle.
This commit is contained in:
@@ -8,6 +8,9 @@ import type { HomeAssistant } from '../ha/types';
|
||||
import { RecordingSegmentsCache } from './cache';
|
||||
import type { CameraManagerEngine } from './engine';
|
||||
import { CameraNoEntityError } from './error';
|
||||
// Every other engine subclasses GenericCameraManagerEngine so it is loaded no
|
||||
// matter what -- no lazy loading is useful.
|
||||
import { GenericCameraManagerEngine } from './generic/engine-generic';
|
||||
import { CameraManagerRequestCache, Engine, type CameraEventCallback } from './types';
|
||||
import { getCameraEntityFromConfig } from './utils/camera-entity-from-config';
|
||||
|
||||
@@ -36,7 +39,6 @@ export class CameraManagerEngineFactory {
|
||||
let cameraManagerEngine: CameraManagerEngine;
|
||||
switch (engine) {
|
||||
case Engine.Generic:
|
||||
const { GenericCameraManagerEngine } = await import('./generic/engine-generic');
|
||||
cameraManagerEngine = new GenericCameraManagerEngine(
|
||||
options.hassManager,
|
||||
this._entityRegistryManager,
|
||||
|
||||
Reference in New Issue
Block a user