philipp-winterle / crittr

High performance critical css extraction with a great configuration abilities

Home Page:https://hummal.github.io/crittr/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Allow internal HTML files to be processed

andershagbard opened this issue · comments

Is your feature request related to a problem? Please describe.

I wan't to be able to use internal HTML files, instead of URLs. This feature would be good to have, if the URL is behind a password or similar.

Describe the solution you'd like

I wan't to be able to pass in a internal URL in the urls field.

const urls = [
  './crittr/index.html',
  'https://example.com/about',
];

That should be possible. But not without some work. Iam not sure but as I remember correctly Chrome does not allow to access local files via headless. Also the external CSS and JS will not be loaded properly then. But I need to check that. Am not sure.

Anyway, the workaround would be to set up an webserver for file urls and load the localhost url into the browser. Guess this is the easy way. Will take some time tho.

With the release of 1.3.0 you should be able to work with local html files.
Enjoy