WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

[Bug] Problem using @ URL alias #30

@vdamov

Description

@vdamov

Version

2.0.0

Reproduction link

http://localhost:3000/

Operating System

Windows 11

Device

PC

Browser & Version

latest Chrome and Firefox Developer Edition (it works on MS Edge for some reason)

Steps to reproduce

  1. Open a fresh copy of the project files (without any changes)
  2. NPM install (node version v18.14.0)
  3. NPM run dev
  4. Open http://localhost:3000/

What is expected?

To be able to see and use the website.

What is actually happening?

When I open http://localhost:3000/ on Firefox or Chrome, I see only white screen.

When I open my Developer console, I am seeing the following warnings (no warnings in my CMD):

Loading failed for the module with source “http://localhost:3000/src/assets/img/stat.png?import”. localhost:3000:38:1
Loading failed for the module with source “http://localhost:3000/src/assets/img/modals.jpg?import”. localhost:3000:38:1
Loading failed for the module with source “http://localhost:3000/src/assets/img/dropdowns.jpg?import”. localhost:3000:38:1
Loading failed for the module with source “http://localhost:3000/src/assets/img/pricing.png?import”. localhost:3000:38:1
Loading failed for the module with source “http://localhost:3000/src/assets/img/features.png?import”. localhost:3000:38:1
Loading failed for the module with source “http://localhost:3000/src/assets/img/blog-posts.png?import”. localhost:3000:38:1
Loading failed for the module with source “http://localhost:3000/src/assets/img/testimonials.png?import”. localhost:3000:38:1
Loading failed for the module with source “http://localhost:3000/src/assets/img/team.png?import”. localhost:3000:38:1
Loading failed for the module with source “http://localhost:3000/src/assets/img/content.png?import”. localhost:3000:38:1
Loading failed for the module with source “http://localhost:3000/src/assets/img/pagination.png?import”. localhost:3000:38:1
Loading failed for the module with source “http://localhost:3000/src/assets/img/alerts.jpg?import”. localhost:3000:38:1
Loading failed for the module with source “http://localhost:3000/src/assets/img/popovers.jpg?import”.

Solution

I think it is something related to the URL alias parsing in vite.config.js, but I was not able to find a solution.

Additional comments

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