Comments (6)
I ran into this problem as well. I realized that it wasn't only not reloading but it was also not recompiling. It took a little digging but it appears that you need to do this:
{ loader: 'elm-webpack-loader', options: { /* your normal options and then */ cwd: '/path/to/source' }
https://github.com/elm-community/elm-webpack-loader#cwd-default-null-recommended
Adding cwd: './'
to my loader options fixed the problem.
from elm-hot-loader.
Hi,
I tried to reproduce this issue here:
https://github.com/fluxxu/elm-hot-loader-issue-29
But HMR works on my side...
Could you try to break it so I can debug the issue?
from elm-hot-loader.
Exact same problem.
I was using create-elm-app v0.4.0 but there have been a few releases lately that fix this issue.
from elm-hot-loader.
@mattraykowski Ah yeah you're right, it's actually not even recompiling. However the cwd
option didn't seem to fix my issue; saving the child component still doesn't trigger recompile.
@joanllenas I was using create-elm-app v0.4.0 as well, so I'll try upgrading and remaking my boilerplate.
from elm-hot-loader.
@joanllenas that worked for me. I looked at the new config generated by create-elm-app v0.6.0 and copied some new things over.
It seems that the fix is to add forceWatch: true
to the elm-webpack-loader options:
{
test: /\.elm$/,
exclude: [ /elm-stuff/, /node_modules/, /MainCss\.elm/ ],
use: [
{
loader: 'elm-hot-loader'
},
{
loader: 'elm-webpack-loader',
options: {
verbose: true,
warn: true,
debug: true,
pathToMake: paths.elmMake,
forceWatch: true
}
}
]
},
from elm-hot-loader.
Thanks for your help everyone!
from elm-hot-loader.
Related Issues (20)
- Error on 0.3.0 when no ports are present
- Incompatible with [email protected] HOT 2
- Websockets and reloading: one subscription - two open requests upon reload HOT 3
- Object.assign HOT 2
- Peer dependency on elm-webpack-loader -- can it be removed? HOT 7
- Initial command obliterates previous state HOT 4
- Document how to use the plugin with a compiled-to-js Elm app HOT 3
- 0.18 support HOT 1
- Only works with programWithFlags ? HOT 1
- I see a weird error when not using Html.Events HOT 2
- Changes not detected when elm-webpack "cache" option is enabled HOT 3
- Update elm-hot-loader to use latest elm-webpack-loader HOT 7
- doesn't work on webpack-dev-server 2 HOT 3
- Feature: Flag to hot reload only after successful compile HOT 1
- BUG: Not reloading Model in Module HOT 1
- Recursion?
- add flag for disabling console message logging
- Compiler errors in the browser HOT 1
- Hotloading fails to retain state after compile error
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 elm-hot-loader.