Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

Memory leaks in dev. environment (VueSSR) #810

Open
IMilja opened this issue Sep 1, 2021 · 0 comments
Open

Memory leaks in dev. environment (VueSSR) #810

IMilja opened this issue Sep 1, 2021 · 0 comments

Comments

@IMilja
Copy link

IMilja commented Sep 1, 2021

Vue.js version and component version

vue-server-renderer: 2.4.4
vue: ^2.4.4
vue-awesome-swiper: ^3.1.3
node version: 8

Notes

Application is built with Webpack

Steps to reproduce

  • Using npm run dev in VueSSR
  • Saving one or two files

Reproduction Link

I do not have any reproduction links but I think that the problem might be in the following:
Since I'm using SSR I imported the component in the following way in the app.js file:

import 'swiper/dist/css/swiper.css';

if (process.browser) {
    const VueAwesomeSwiper = require('vue-awesome-swiper/dist/ssr');
    Vue.use(VueAwesomeSwiper);
}

And after that I created a Singe File component:

<template>
    <div class="swiper-body">
        <div v-swiper:mySwiper="swiperOption">
            <div class="swiper-wrapper">
                <slot></slot>
            </div>
        </div>
        <slot name="pagination"></slot>
    </div>
</template>

<script>
export default {
    name: 'VueSwiper',

    props: ['swiperOption'],
};
</script>

Since I'm using this Single File component on multiple areas and pages and I'm using the same argument mySwiper I think it's causing memory leaks because not all instances are cleared up. But I'm not sure if this is the correct conclusion.

What is Expected?

VueSSR should react to file changes and rebuild the application

What is actually happening?

The application gets an fatal error and says that the memory heap is full

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant