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

Disable live reload on some files #3059

Open
akinuri opened this issue Jan 8, 2025 · 0 comments
Open

Disable live reload on some files #3059

akinuri opened this issue Jan 8, 2025 · 0 comments

Comments

@akinuri
Copy link

akinuri commented Jan 8, 2025

I'm submitting a...

[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report
[x] Feature request
[ ] Documentation issue or request
[ ] Other:

Current behavior

Every html response is injected with a script tag.

<!-- Code injected by live-server -->
<script>
    // <![CDATA[  <-- For SVG support
    if ('WebSocket' in window) {

Expected behavior

Not every file/page needs live reload. There should be a way to ignore some files/paths.

Why? Well, in my case, I serve some html to be used as a template, and having script tags injected breaks things.

An example response:

<template>
    <svg>...
</template>
<template>
    <button>...
</template>
<template>
    <div>...
</template>
...

and what I get:

<template>
    <svg ...>
        <path ...>
        <!-- Code injected by live-server -->
        <script>
            // <![CDATA[  <-- For SVG support
            if ('WebSocket' in window) {
            ...
        </script>
    </svg>
</template>
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

1 participant