Closed MidasVE closed 3 years ago
Hi Midas!
Run bin/vite dev to start the Vite development server, and then restart your Jekyll server with bin/jekyll serve
Visit any page and you should see a printed console output: Vite ⚡️ Ruby.
I should clarify that you should visit any page in your Jekyll server. The Vite dev server will only serve assets.
Edit: See jekyll-vite-minima
for information on how to setup Vite Ruby with the minima theme.
@MidasVE
Here's a patch that you could apply to your example repo to get started with Vite.js.
Because you are using the minima
theme, the default installation does not have a layout where it can write, so it requires some setup.
If you are using minima higher than 2.5.1 (see https://github.com/jekyll/minima/issues/472), for example by using it directly from master, then the setup is a lot simpler since you can provide _includes/custom-head.html
with:
{% vite_client_tag %}
{% vite_javascript_tag application %}
Thanks @ElMassimo ! I'll try your suggestions and let you know how it went
bundle update jekyll-vite
.Description 📖
When running bin/vite serve, the local server url returns a 404
Reproduction 🐞
https://github.com/MidasVE/vitejekylltest
(Just ran jekyll new command and then followed the installation instructions from this repo)
Logs 📜
Ran
DEBUG=vite-plugin-ruby:* bin/vite dev
, provided the output:Output
``` vite-plugin-ruby:config { vite-plugin-ruby:config base: '/vite-dev/', vite-plugin-ruby:config build: { vite-plugin-ruby:config emptyOutDir: true, vite-plugin-ruby:config sourcemap: false, vite-plugin-ruby:config assetsDir: 'assets', vite-plugin-ruby:config manifest: true, vite-plugin-ruby:config outDir: '..\\..\\.jekyll-cache\\vite-dev', vite-plugin-ruby:config rollupOptions: { input: {}, output: [Object] } vite-plugin-ruby:config }, vite-plugin-ruby:config root: 'D:\\Development\\vitejekylltest\\_frontend\\entrypoints', vite-plugin-ruby:config server: { vite-plugin-ruby:config host: 'localhost', vite-plugin-ruby:config https: false, vite-plugin-ruby:config port: 3036, vite-plugin-ruby:config strictPort: true, vite-plugin-ruby:config fsServe: { root: 'D:/Development/vitejekylltest' } vite-plugin-ruby:config }, vite-plugin-ruby:config entrypoints: {} vite-plugin-ruby:config } +0ms ```Screenshots 📷