Giter Club home page Giter Club logo

Comments (4)

goraxan avatar goraxan commented on September 16, 2024 1

Well, I'll stick to webpack then, which is working just fine. Thanks.

from craft-vite.

khalwat avatar khalwat commented on September 16, 2024

So probably you need to do something Windows-specific here, but I'm sorry, I just don't know what that would be.

I do know that it uses chokidar to detect filesystem changes:

https://github.com/paulmillr/chokidar

Here's the key bit:

    ViteRestart({
      reload: [
          './templates/**/*',
      ],

is ./templates/ the directory where your templates are? If not, you'll need to change it.

Maybe there's something Windows-specific that needs to be done here in specifying the directory?

This doesn't really have anything to do with the Vite plugin tho, it's related to Vite itself (or possibly chokidar or the ViteRestart plugin), so I'd check those resources for insights.

Sorry I don't have a better answer for your particular local dev setup.

from craft-vite.

khalwat avatar khalwat commented on September 16, 2024

webpack uses the same package (chokidar) to detect file system changes, FWIW.

from craft-vite.

khalwat avatar khalwat commented on September 16, 2024

Someone using Windows mentioned that you might need to turn polling on as per the instructions for Vagrant here:

https://nystudio107.com/docs/vite/#local-development-environment-setup

  server: {
    host: '0.0.0.0',
    watch: {
        usePolling: true,
    },
  },

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.