Open chrisfay opened 8 years ago
Do you mean your css is embedded inline in the import?
No, not inline. The html import links to a stylesheet.
ok, well either way if the element you want reloading is not on the same page as the Browsersync JS file, then I don't think this will be possible
Bummer :(
@chrisfay I'm just not sure if the current page has access to resources loaded within an import - I have no experience in this area. If anyone else does, please enlighten us :)
I just tried this with CodeKit and it worked as expected, where changes to css linked from inside an html import were properly live-reloaded in the main html page, so I know it's technically possible.
Same with css imports apparently, forcing a reload would be fine no? vs injecting
Issue details
I'm using browsersync + grunt-contrib-watch using the instructions here https://www.browsersync.io/docs/grunt/. Will browsersync work with css that is included within an HTML import? I'm including css within an HTML import and browsersync ignores any changes within those css files, but works fine on css NOT included within an import. This is an architectural requirement for a unique project I'm working on, so simply rerouting the compiled css to a file outside the import isn't an option.
e.g.
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8">
<!-- // CSS compiled here refreshes properly--> <link rel="stylesheet" href="styles.css">
<!-- CSS compiled and linked via this import NOT injected into the page after sass compilation --> <link rel="import" href="import.html">
</head> <body>
</body> </html>
Steps to reproduce/test case
Please specify which version of Browsersync, node and npm you're running
Affected platforms
Browsersync use-case
If CLI, please paste the entire command below
{cli command here}
for all other use-cases, (gulp, grunt etc), please show us exactly how you're using Browsersync
NA