-
Notifications
You must be signed in to change notification settings - Fork 371
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
Styelsheet URL breaks when moving up in the directory "../" #95
Comments
@julienetie could you provide some more information about your setup? |
Sure: So this is the css src
which critical outputs into the html as:
gulpfile.js
|
@julienetie i've made some tests but i couldn't reproduce your issue. Which version of critical are using? |
You also could use the |
Thanks @bezoerb, I'll give it a try. |
@julienetie any updates on this one? |
You must use option |
We've made some progress on this topic @julienetie. The asset paths inside the critical css should now stay relative in case they were relative the first place. Could you check if your issue is fixed in the
/cc @SerzN1 |
* add testcase for #119 * use vinyl * Keep relative images relative We now can campute the path prefix for asset references based on the location of the html file. This allows us to keep relative asset urls in stylesheets relative. Issues #57 and #95 * consider absolute stylesheet refs * Guess source path for piped html try to guess source path of the file by checking relative links inside the html source show warning to the user when no relative links are available * tests for auto pathPrefix * travis tweaks some weird issue requires a second npm install to add all deps without this module minimist required by gulp-util is missing * eslint fixes * minor changes * doc blocks * compatibility to vinyl < v0.5.3 * Check vinyl * Check vinyl * remove unused setMaxListeners(0) * guess path to html source also consider script sources * fixed jsdoc * add 'folder' option * updated jsdoc * text change * WiP * fixed tests * run all tests * some text changes * fixed tests * force re-run appveyor after penthouse fix * fixed tests * fixed last test
Closing this due to lack of feedback. Feel free to reopen if you still got problems on this one. |
This:
becomes:
It's not always convenient when taking src from a different directory (unless I'm doing something wrong) The same applies for multiple traversing. I found this but I'm not sure if the change will break anything:
lib/inline-styles.js
Maybe remove the back tracking of dir could be better as an option.
The text was updated successfully, but these errors were encountered: