sveltejs / vite-plugin-svelte

Svelte plugin for http://vitejs.dev/
MIT License
838 stars 102 forks source link

Multi-line comment breaks sourcemaps(?) (chrome debugging) #705

Closed Lindsay-Needs-Sleep closed 1 year ago

Lindsay-Needs-Sleep commented 1 year ago

Describe the bug

BROKEN:

<script>
    /**
     * Start page for the app
     */
    console.log('Hiiiii');

OK:

<script>
    console.log('Hiiiii');
    /**
     * Start page for the app
     */

OK:

<script>
    // Start page for the app
    console.log('Hiiiii');

If your file starts with a multiline comment these are symptoms:

(Not sure how to properly describe this issue)

OK 1

BROKEN 2 3

Reproduction URL

https://github.com/

Reproduction

If someone tries putting a multi-line comment at the top of one of their svelte files and it works fine, I'll chalk it up to my setup and I'll close this issue asap!!

(Only reporting because it took me way too long to figure out it was the comment causing issues. -.-;;)

Logs

No response

System Info

Windows, but running everything in a linux container (docker)

package.json

    "dependencies": {
        "@ar-js-org/ar.js": "^3.4.5",
        "@sveltejs/vite-plugin-svelte": "^2.0.3",
        "@unseenco/taxi": "^1.2.2",
        "mapbox-gl": "^2.14.1",
        "svelte": "^3.57.0",
        "vite": "^4.3.2"
    },
dominikg commented 1 year ago

please provide a link to a minimal repository and instructions how exactly to reproduce this, using the latest version of svelte (svelte4) and vite-plugin-svelte.

dominikg commented 1 year ago

unable to reproduce, report is missing required information.