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

Method _detectWebPack

packages/alphatab/src/Environment.ts:693–712  ·  view source on GitHub ↗

* @target web

()

Source from the content-addressed store, hash-verified

691 * @target web
692 */
693 private static _detectWebPack(): boolean {
694 try {
695 // @ts-expect-error
696 if (typeof __webpack_require__ === 'function') {
697 // check if webpack plugin was used
698 // @ts-expect-error
699 if (typeof __ALPHATAB_WEBPACK__ !== 'boolean') {
700 Logger.warning(
701 'WebPack',
702 `Detected bundling with WebPack but @coderline/alphatab-webpack was not used! To ensure alphaTab works as expected use our bundler plugins. Learn more at https://www.alphatab.net/docs/getting-started/installation-webpack`
703 );
704 }
705
706 return true;
707 }
708 } catch {
709 // ignore any errors
710 }
711 return false;
712 }
713
714 /**
715 * @target web

Callers 1

EnvironmentClass · 0.80

Calls 1

warningMethod · 0.65

Tested by

no test coverage detected