Skip to content

prevent modification of internal api/config #1173

Open
@dominikg

Description

@dominikg

Describe the problem

see #1172

due to a bug it was possible that other plugins modified internal configuration.
Technically it is equally possible that other plugins grab our api from vite-plugin-svelte:config. This can produce hard to track bugs

Describe the proposed solution

Use deepFreeze or a proxy with throw in set to prevent modifications.

Currently options.server is used to keep a reference to the vite devserver. This must not be frozen so we have to skip it somehow or move it out of our api for this to work.

Alternatives considered

leave it as is, check our codebase that we don't expose more through vites config hooks.
Also see with vite why their config logic just took the array ref we gave it instead of pulling out the elements.

Importance

would make my life easier

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesttriageAwaiting triage by a project member

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions