Giter Club home page Giter Club logo

Comments (7)

khalwat avatar khalwat commented on August 12, 2024 1

Addressed in:

Craft 4: https://github.com/nystudio107/craft-plugin-vite/releases/tag/4.0.1
Craft 3: https://github.com/nystudio107/craft-plugin-vite/releases/tag/1.0.25

from craft-vite.

khalwat avatar khalwat commented on August 12, 2024

Give me a way to reproduce this, and I can try looking into it -- but I agree, it is likely an upstream issue of some sort.

from craft-vite.

chasegiunta avatar chasegiunta commented on August 12, 2024

Currently, I have no way to get a response from localhost:3000/@vite/client with my vite dev server running, so if you're able with the latest version of vite (2.9.9), then you're a step ahead of me and maybe we can chalk this up to something local. Just putting it on your radar. If I figure out a way to fix/toggle it, I'll post more details.

from craft-vite.

khalwat avatar khalwat commented on August 12, 2024

Run this locally:

https://github.com/nystudio107/devmode

Clone it down, cd to the directory, then do:

make clean
make dev

...and see if HMR works for you as expected.

from craft-vite.

chasegiunta avatar chasegiunta commented on August 12, 2024

Okay, so localhost:3000/@vite/client won't be available until your app's entry file (in my case,main.ts) is requested from the browser first. This breaks checkDevServer => true because trying to ping localhost:3000/@vite/client returns 404.

Recreated by:

  1. checkDevServer => true
  2. Start vite dev server.
  3. Hit your homepage, or visit localhost:3000/@vite/client in your browser directly (both should be broke)
  4. Change checkDevServer to false
  5. Visit localhost:3000/@vite/client, ensure it's still inaccessible.
  6. Visit your homepage, dev server assets should serve as normal.
  7. Visit localhost:3000/@vite/client and the file should properly load.

from craft-vite.

khalwat avatar khalwat commented on August 12, 2024

Okay, I think I found a fix... give me one moment...

from craft-vite.

khalwat avatar khalwat commented on August 12, 2024

Released as:

Craft 4: https://github.com/nystudio107/craft-vite/releases/tag/4.0.0
Craft 3: https://github.com/nystudio107/craft-vite/releases/tag/1.0.25

from craft-vite.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.