Skip to content

ReferenceError: window is not defined #1298

Answered by Mister-Hope
luxiag asked this question in Q&A
Discussion options

You must be logged in to vote

Reference:

For components it's the same:

import { defineComponent, onMounted } from "vue";

export default defineComponent({
  setup() {
    onMounted(async () => {
    // Cesium in your case
     const nonSsrFriendlyModule = await import("non-ssr-friendly-module");
    });
  },
});

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@luxiag
Comment options

@Mister-Hope
Comment options

Answer selected by Mister-Hope
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants