Open d9k opened 4 years ago
Code generated by webpack uses different modules ids in __webpack_require__()
, for me 1325
and 1327
.
Why so?
Now works. I had to copy /src/plugin.js
in this repo to my project (to the lib/VideoJsFlvJs.ts
file) and change there
import videojs from 'video.js'
to
import * as videojs from 'video.js'
.
On my application code:
import * as videojs from 'video.js'
window.flvjs = require('flv.js')
require('./lib/VideoJsFlvJs')
BTW, I'm using Webpack 3, no time for migrate to 4+ yet.
I used your solution. It's not good in webpack 4+,
report errors: TypeError: video_js__WEBPACK_IMPORTED_MODULE_1__ is not a function
Hello! Please include examples for using module with
import
.doesn't work in my typescript project:
flvjs
isundefined
If I use ugly
tech becomes attached to another instance of
video.js
module!videojs.getTech('Flvjs')
isundefined
If I try to fix it with
then
registerTech
fails with an error because tech generated with another videojs module instance I get an errorTech Flvjs must be a Tech
because thecomponent.prototype instanceof Tech
check fails.