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

Embedded component unable to build using vite 3.0, works in 2.0 #3091

Closed
cmdcolin opened this issue Jul 13, 2022 · 0 comments · Fixed by #3092
Closed

Embedded component unable to build using vite 3.0, works in 2.0 #3091

cmdcolin opened this issue Jul 13, 2022 · 0 comments · Fixed by #3092
Labels
bug Something isn't working

Comments

@cmdcolin
Copy link
Collaborator

Tested out @jbrowse/react-linear-genome-view in vite 3.0 (newly released https://vitejs.dev/blog/announcing-vite3.html) and although it works at dev time, it fails at production build with an error

Uncaught TypeError: Class extends value #<Object> is not a constructor or null
    at index.d1b9f577.js:408:43547

code it refers to is minified but some clues

var vf = _x()
  , yn = _I()
  , Ol = Tx()
  , CX = lb()
  , xX = VG();
class cb extends CX {
    constructor() {
        super(...arguments),
        this.supportsSVG = !0
    }
    async render(t) {
        const r = await this.getFeatures(t)
          , {height: n, regions: o, bpPerPx: a} = t
          , [i] = o
          , s = (i.end - i.start) / a
          , l = await xX.renderToAbstractCanvas(s, n, t, c=>this.draw(c, {
            ...t,
            features: r
        }));
        return {
            ...await super.render({
                ...t,
                ...l,
                features: r,

Screenshot from 2022-07-13 16-06-25

this could be a vite problem or it could be something in our code, not quite sure

@cmdcolin cmdcolin added the enhancement New feature or request label Jul 13, 2022
@cmdcolin cmdcolin changed the title Embedded component unable to built using vite 3.0.0 Embedded component unable to build using vite 3.0.0 Jul 13, 2022
@cmdcolin cmdcolin added bug Something isn't working and removed enhancement New feature or request labels Jul 13, 2022
@cmdcolin cmdcolin changed the title Embedded component unable to build using vite 3.0.0 Embedded component unable to build using vite 3.0, works in 2.0 Jul 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
1 participant