Comments (7)
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.
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.
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.
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.
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:
checkDevServer => true
- Start vite dev server.
- Hit your homepage, or visit
localhost:3000/@vite/client
in your browser directly (both should be broke) - Change
checkDevServer
tofalse
- Visit
localhost:3000/@vite/client
, ensure it's still inaccessible. - Visit your homepage, dev server assets should serve as normal.
- Visit
localhost:3000/@vite/client
and the file should properly load.
from craft-vite.
Okay, I think I found a fix... give me one moment...
from craft-vite.
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)
- Error entry does not get injected on twig error HOT 1
- includeCriticalCssTags adds unwanted underscore to critical css file path HOT 2
- [an error occurred while processing the directive] printed on all pages HOT 7
- ValueError: Path cannot be empty HOT 6
- Vite stopped working on MacOS 13.0 Ventura HOT 1
- CORS error (sitename.ddev.site <-> localhost:3000) HOT 1
- 400 Bad Request after starting vite dev HOT 1
- Template named "register" breaks HMR HOT 2
- criticalUrl in .env HOT 3
- Port 3000 now in use by DDEV HOT 1
- Access blocked by CORS: domain.site <> domain.site:3000 HOT 1
- `inline()` function not working with relative local path HOT 2
- craft.vite.asset no longer matches manifest format in Vite 3.x || 4.x HOT 3
- Generic "getHash" helper HOT 1
- Ability to prevent CSS from being extracted from the manifest HOT 1
- Multisite Compatible? HOT 2
- Twigpack::$plugin->manifest->getFileFromManifest() equivalent HOT 4
- Add registerAsset() function so register functionality can work directly with css HOT 1
- Your view on CSS style names coming from Craft's field HOT 2
- Multi-domain setup HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from craft-vite.