Skip to content

preserveComments doesn't work #4730

@bwbroersma

Description

@bwbroersma

Describe the bug
The compiler option preserveComments: true does nothing.

To Reproduce
See this repo. With minimal changes from the svelte/template. This is my output with missing comment.

Expected behavior
Keep the comment in the SSR.

Probably this is because of this todo:

// TODO preserve comments
// if (options.preserveComments) {
// renderer.append(`<!--${node.data}-->`);
// }

Information about your Svelte project:
svelte-3.21.0 & rollup.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugcompilerChanges relating to the compiler

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions