MCPcopy Create free account
hub / github.com/CoderLine/alphaTab / _detectVite

Method _detectVite

packages/alphatab/src/Environment.ts:717–736  ·  view source on GitHub ↗

* @target web

()

Source from the content-addressed store, hash-verified

715 * @target web
716 */
717 private static _detectVite(): boolean {
718 try {
719 // @ts-expect-error
720 if (typeof __BASE__ === 'string') {
721 // check if vite plugin was used
722 // @ts-expect-error
723 if (typeof __ALPHATAB_VITE__ !== 'boolean') {
724 Logger.warning(
725 'Vite',
726 `Detected bundling with Vite but @coderline/alphatab-vite was not used! To ensure alphaTab works as expected use our bundler plugins. Learn more at https://www.alphatab.net/docs/getting-started/installation-vite`
727 );
728 }
729
730 return true;
731 }
732 } catch {
733 // ignore any errors
734 }
735 return false;
736 }
737
738 /**
739 * @target web

Callers 1

EnvironmentClass · 0.80

Calls 1

warningMethod · 0.65

Tested by

no test coverage detected