webpack-autoconf
webpack-autoconf copied to clipboard
Add webpack-dev-server to Vanilla JS projects (No React or VueJS)
This is also a good idea, will work on this also next time I have time to work on this project. Always feel free to send PR :)
@JuanmaMenendez
Are you asking functionality similar to nodemon
? Like you need webpack-dev-server just to watch and bundle the js files?
Or do you have any other expectations?
@theajr I am asking we can start a Vanilla project and have (babel, css preprocesor, typescript, etc.. )
@jakoblind I think that is possible right now, I am ok ? Maybe we should close this issue?
Most of it is possible right now, but webpack-dev-server
is only available as a script
in package.json
if you select React hot loader
. Should we consider having the script there at all times?
@jakoblind yes, we should give webpack-dev-server
script if user don't select any of the given framework.
Because in given use case, user don't need react. We don't show React Hot Loader
unless user selects React
.
But we should leave out --hot
parameter if React hot loader
is not selected I think. Because some extra code on frontend is needed for hot module replacement to work.
I don't think so, let me know if I am wrong. We need extra code only in case of react to utilise react-hot-loader's HMR feature instead of refreshing the entire browser tab. If we don't have extra code, then it will refresh the browser tab. I guess it should be okay in this case?
Yes, you are correct. There was some time ago I worked with this, thanks for reminding me how it works!
So the task is then to always show the start
script in package.json
(and make sure it works in Vue as well, if not, don't show for Vue)
Yeah, we should do it. You may assign this to me.