Error when reloading page / import CommonJS

Hello there!

When reloading a page that has:

import { Player } from ‘bitmovin-player/modules/bitmovinplayer-core’

I got the following error:

I have Page index and Page show, if I open Page show from Page index, the page works.

If I try to reload, I got the error above.

The issue does not happen on development, only on production build.

The app has the following config:

“nuxt”: “^3.3.1”,
“bitmovin-player”: “^8.105.0”,
“bitmovin-player-ui”: “^3.44.0”,
“vue”: “^3.2.41”,
“vite”: “>=2.9.0 <3.0.0 || >=3.0.0-0 <3.0.0”,

Thanks,

Changing the import to:

import BitmovinPlayer from ‘bitmovin-player/modules/bitmovinplayer-core’

and then using with getModuleExport:

const Player = getModuleExport(BitmovinPlayer)

It works now!

Thanks for your feedback.
We’re glad to hear that it works now.

This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.