Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Live reload #33

Open
raloliver opened this issue Nov 7, 2020 · 2 comments
Open

Live reload #33

raloliver opened this issue Nov 7, 2020 · 2 comments

Comments

@raloliver
Copy link

When I use serve from webpack, the live reload does not works when I change a partial file.

@colbyfayock
Copy link
Owner

hey @raloliver im guessing it's similar to this issue here? #15

this isn't currently utilizing the pipeline to effect where it could take advantage of live reload or more benefits from the full webpack / html webpack plugin system

open to ideas if you have any or are more familiar with the inner workings

@vincenttaglia
Copy link
Contributor

@raloliver check out https://github.com/pigcan/extra-watch-webpack-plugin. Live reload is working on the following configuration.

My directory structure:

├── /dist                    # Webpack and Tailwind output directory
│   ├── index.html              # Render of index.html template with partials
│   ├── main.js                 # Main output for Webpack/Stimulus
│   └── tailwind.css            # Main output for Tailwind
├── /src                     # Source folder
│   ├── /controllers            # Stimulus Controllers Folder
│   ├── /partials               # HTML Partials Folder
│   ├── /templates              # HTML Templates Folder
│   ├── index.js                # Webpack Entry Point
│   └── tailwind.css            # Tailwind CSS Entry Point
├── package.json             # Yarn package.json
├── postcss.config.js        # PostCSS config
├── tailwind.config.js       # Tailwind Config
├── webpack.config.js        # Webpack Config
└── yarn.lock                # Yarn Lockfile

And this is my webpack.config.js plugin:

new ExtraWatchWebpackPlugin({
    dirs: [ path.join(__dirname, 'src') ],
}),

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants