electron-compile
electron-compile copied to clipboard
Added per mimetype reload strategies and stylesheet live reloading.
Per mimeType reload strategies have been added. Now you should be able to call enableLiveReload() without any arguments and get something that works very out of the box. Alternatively you can pass in an options object that contains your reload strategy.
'strategy': {
'text/html': 'naive',
'text/tsx': 'react-hmr',
'text/jsx': 'react-hmr',
'application/javascript': 'react-hmr',
'text/stylus': 'hot-stylesheets',
'text/sass': 'hot-stylesheets',
'text/scss': 'hot-stylesheets',
'text/css' : 'hot-stylesheets'
}
Additionally, stylesheets can now be hot reloaded. Their link.href will be reset upon the file changing.
This doesn't work for dependencies for stylesheets. I've opened an issue regarding electron-compile-compiled-file not being sent for dependencies for stylesheets in #188.
This is awesome! I'm gonna have a look at this later today
any news on this? would love hot-reload for css
Yes please! Hot reloading for CSS (I use Stylus) would make this package even more amazing than it already is!
@paulcbetts @malept @mnquintana Can’t wait!
Any news?
I could have sworn I reviewed and merged this. I'll have a look soon now that I'm back in the US
Ok thanks
Hey @paulcbetts could you merge this? ;)
Any news?
This looks like a great change, any reason it hasnt been merged yet?
Not sure... I'm waiting for this too
On Sep 14, 2017, at 3:44 PM, shanehyde [email protected] wrote:
This looks like a great change, any reason it hasnt been merged yet?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.
Hey, this PR has been opened for a year and it looks like something every body would want. Any reason it never got merged ?