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

Assets fail to load in the Vite dev server after updating to version 2.0.0 #12

Closed
inkfarer opened this issue Mar 1, 2024 · 1 comment · Fixed by #13
Closed

Assets fail to load in the Vite dev server after updating to version 2.0.0 #12

inkfarer opened this issue Mar 1, 2024 · 1 comment · Fixed by #13
Labels
bug Something isn't working

Comments

@inkfarer
Copy link

inkfarer commented Mar 1, 2024

I've noticed that non-code assets (such as images) have begun failing to load when using the Vite dev server after upgrading from version 2.0.0-rc3.

A minimal reproduction is available here: Link

When using version 2.0.0-rc3, images are loaded from the Vite dev server, as expected:
Screenshot 2024-03-02 at 01 04 28
Screenshot 2024-03-02 at 00 42 52

After upgrading the above repository to version 2.0.0, the bundle starts attempting to load images from the NodeCG server, which fails with a 404 error:
Screenshot 2024-03-02 at 01 04 59
Screenshot 2024-03-02 at 00 42 22

@EwanLyon
Copy link
Contributor

EwanLyon commented Mar 9, 2024

Until my PR is merged and a new package uploaded a workaround is to mount the "src" folder in nodecg.

your-bundle/package.json

{
  "nodecg": {
    "mount": [
      {
        "directory": "src",
        "endpoint": "src"
      }
    ]
  }
}

@Dan-Shields Dan-Shields added the bug Something isn't working label Mar 9, 2024
zoton2 added a commit to zoton2/nodecg-vue-ts-template that referenced this issue Jun 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants