Skip to content

Editor: on Windows breaks because \ in project paths is treated as JS escapes #399

Description

@ttempaa

Bug

On Windows, revideo editor starts, but the page fails to load the project. Vite shows a broken "Does the file exist?" error even when the file is there.

Cause

In packages/vite-plugin/src/partials/editor.ts the project path is dropped into a generated import as-is:

import project from '/@fs/${path.resolve(projectUrl)}';

path.resolve on Windows uses \. Inside a JS string that turns sequences like \r into real escapes, so the import path gets corrupted.

Same idea for the editor CSS /@fs/... URL. Renderer has a similar ${projectFile} import.

Environment

  • OS: Windows 10
  • @revideo/cli@0.11.0
  • @revideo/vite-plugin@0.11.0

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions