Skip to content

async component cause window is not defined #1429

@leafiy

Description

@leafiy
  • I confirm that this is an issue rather than a question.

Bug report

I'm using vue-perfect-scrollbar in my vue component, follow the document and I tried ClientOnly and async import

image
image

in .vuepress components
image

sitll having the window is not defined, can anyone help me with this?

Version

1.0.0-alpha.40

Steps to reproduce

not only vue-perfect-scrollbar, also some simple directives using window like

bind(el,binding){
 window.addEventListener('resize',function...)
}

What is expected?

What is actually happening?

Other relevant information

  • Your OS:
  • Node.js version: 11.10.0
  • Browser version: chrome 77
  • Is this a global or local install?
  • Which package manager did you use for the install?
  • Does this issue occur when all plugins are disabled?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions