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

This package preventing hot reloading on my Nuxt 3 app #37

Open
keanallen opened this issue Aug 29, 2023 · 8 comments
Open

This package preventing hot reloading on my Nuxt 3 app #37

keanallen opened this issue Aug 29, 2023 · 8 comments

Comments

@keanallen
Copy link

When I started to use this plugin, I noticed that my nuxt 3 app does not reflect the code changes on the UI.
But when I removed thids plugin, everything's back to normal.

@keanallen keanallen changed the title This package causes my nuxt 3 app not hot reloading This package preventing hot reloading on my Nuxt 3 app Aug 29, 2023
@thlintw
Copy link

thlintw commented Sep 6, 2023

Same here. Not using Nuxt just plain Vue3. As long as a QRCodeVue3 component is loaded anywhere the app stopped hot reloading.

@keanallen
Copy link
Author

@thlintw you can use this QRCodeVue

@boobo94
Copy link

boobo94 commented Dec 1, 2023

Same here. Not using Nuxt just plain Vue3. As long as a QRCodeVue3 component is loaded anywhere the app stopped hot reloading.

Same here.

@SymphonyCR
Copy link

Same for me with Quasar v2

@JulianGarcia04
Copy link

Same here with Quasar v2

@dmonterde
Copy link

Just to confirm this blocks hot reload on Quasar v2.

@boobo94
Copy link

boobo94 commented Jan 8, 2024

My last solution was using https://www.npmjs.com/package/styled-qr-code with vue3. Example below.

Component:

<template>
  <div class="text-center">
    <div class="qrcode_container" ref="qrCodeRef"></div>

    <button @click="download">Download</button>
  </div>
</template>

<script lang="ts" setup>
import QRCodeStyling, { Options } from 'styled-qr-code';
import { watch } from 'vue';
import { onMounted, ref } from 'vue';

const qrCodeRef: any = ref(null);

const props = defineProps({
  data: String,
});


const options: Options = {
  width: 500,
  height: 500,
  type: 'svg',
  data: props.data,
  image: 'logo.png',
  margin: 10,
  qrOptions: {
    typeNumber: 0,
    mode: 'Byte',
    errorCorrectionLevel: 'H',
  },
  imageOptions: {
    hideBackgroundDots: true,
    imageSize: 0.2,
    margin: 0,
    crossOrigin: 'anonymous',
  },
  dotsOptions: {
    color: '#4a4bc6',

    type: 'rounded',
  },
  backgroundOptions: {
    color: '#ffffff',
  },
  cornersSquareOptions: {
    color: '#000000',
    type: 'square',
  },
  cornersDotOptions: {
    color: '#000000',
    type: 'dot',
  },
};

const qrCode = new QRCodeStyling(options);

onMounted(async () => {
  qrCode.append(qrCodeRef.value);
});

watch(
  () => props.data,
  (newValue) => {
    qrCode.update({ ...options, data: newValue });
  }
);

function download() {
  qrCode.download({
    name: `qrcode-${props.data}`,
    extension: 'png',
  });
}
</script>

<style scoped lang="scss">
.qrcode_container {
  text-align: center;
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
}
</style>

@dedfft
Copy link

dedfft commented Sep 12, 2024

Yeah, very sad. Spent some time implementing this module, but it breaks hot reloading for the whole project on VUE3

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

No branches or pull requests

7 participants