Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make frontend compatible with vue3 #389

Open
Lancer-110 opened this issue Jan 6, 2025 · 0 comments
Open

Make frontend compatible with vue3 #389

Lancer-110 opened this issue Jan 6, 2025 · 0 comments
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed never-stale

Comments

@Lancer-110
Copy link

Lancer-110 commented Jan 6, 2025

Frontend Version:
UE5.5

Description:
vue
package.json
"dependencies": {
"@epicgames-ps/lib-pixelstreamingfrontend-ue5.5": "^0.4.5",
"@epicgames-ps/lib-pixelstreamingfrontend-ui-ue5.5": "^0.4.4",
}
view

import { ref, onMounted } from 'vue'
import {
  Config,
  PixelStreaming,
  Logger,
  LogLevel,
} from '@epicgames-ps/lib-pixelstreamingfrontend-ue5.5'
import {
  Application,
  PixelStreamingApplicationStyle,
} from '@epicgames-ps/lib-pixelstreamingfrontend-ui-ue5.5'

onMounted(() => {
  const PixelStreamingApplicationStyles = new PixelStreamingApplicationStyle()
  PixelStreamingApplicationStyles.applyStyleSheet()

  // expose the pixel streaming object for hooking into. tests etc.
  declare global {
    interface Window {
      pixelStreaming: PixelStreaming
    }
  }

  document.body.onload = function () {
    Logger.InitLogging(LogLevel.Warning, true)

    // Create a config object
    const config = new Config({ useUrlParams: true })

    // Create a Native DOM delegate instance that implements the Delegate interface class
    const stream = new PixelStreaming(config)

    const application = new Application({
      stream,
      onColorModeChanged: (isLightMode) =>
        PixelStreamingApplicationStyles.setColorMode(isLightMode),
    })
    document.body.appendChild(application.rootElement)

    window.pixelStreaming = stream
  }
})

error
[plugin:vite:import-analysis] Failed to resolve entry for package "@epicgames-ps/lib-pixelstreamingfrontend-ui-ue5.5". The package may have incorrect main/module/exports specified in its package.json.

@Lancer-110 Lancer-110 added the question Further information is requested label Jan 6, 2025
@lukehb lukehb changed the title vue3.0[plugin:vite:import-analysis] Failed to resolve entry for package "@epicgames-ps/lib-pixelstreamingfrontend-ui-ue5.5". The package may have incorrect main/module/exports specified in its package.json. Make frontend compatible with vue3 Jan 12, 2025
@lukehb lukehb added bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed never-stale and removed question Further information is requested labels Jan 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed never-stale
Projects
None yet
Development

No branches or pull requests

2 participants