critical: Error when using local url as source
Using a HTML file url works great, so does a remote url. But when I try to use a local url through MAMP, I get this error…
Unhandled rejection Wrong status code 403 for [object Object]
Any ideas?
Using via npm and Gulp v.0.7.2
Here is my code…
var critical = require('critical');
gulp.task('critical', function(cb) {
critical.generate({
base: './',
src: 'http://localurl.dev',
css: ['css/styles.css'],
dimensions: [{
width: 320,
height: 480
}, {
width: 768,
height: 1024
}, {
width: 1280,
height: 960
}],
dest: '_templates/default_site/_embeds/critical_css_home.html',
extract: false,
include: ['.c-slideshow, .c-more-to-see, .c-slideshow-gallery__container, .c-loader, .c-slideshow--hero'],
exclude: ['@font-face']
});
});
Let me know if you need more information.
Thanks!
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 18 (1 by maintainers)
Commits related to this issue
- Added test for #130 — committed to addyosmani/critical by bezoerb 8 years ago
- Added fix for #130 — committed to addyosmani/critical by bezoerb 8 years ago
- Added fix for #130 — committed to addyosmani/critical by bezoerb 8 years ago
@miralize, @mikeebee I’ve added a fix for this issue. Could you please check again using the
master
branch? Thanks @pocketjoso 😃