GoogleChromeLabs / critters

🦔 A Webpack plugin to inline your critical CSS and lazy-load the rest.

Home Page:https://npm.im/critters-webpack-plugin

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Incompatible with html-webpack-plugin v4

dominykas opened this issue · comments

When used with latest version of html-webpack-plugin, it crashes with Error: Could not find HTML asset.

It seems the html-webpack-plugin no longer uses the file name as the key in the assets object?

I can also see there's a #43 - anything I can do to move this forward?

Just spotted that this may just be a duplicate of #5?

+1 same issue

+1, would be great to fix this issue

@dominykas - if you're able to test that PR against your codebase that would be useful. I will try to find some time as well.

Thanks, will do. Wasn't sure if that PR is usable.

I can't get that to build: Error: Plugin 'jsx' not found... Deps are somewhat out of date, so maybe it is that? I'll try to update the deps and see if that makes it compile, unless someone else gets there first.

I patched the dist file manually and tested on one of the repos - the HTML output is identical as before (for practical purposes), so it seems to me that it works 👍.

Upgrading microbundle makes the jsx error go away, but produces a 7MB file in dist, which is probably not what needs to happen here, so I think I'll leave this be, unless there's something specific that you want me to do.

@dominykas yep, I can take care of that. It needs the new microbundle --target node flag.

@developit is there any changes this issue will be fixed?

Would love to see it fixed too! Currently makes it impossible to use with nextjs :/

+1

+10000 !!!!!

Hopefully fixed by #84.

Thanks! 😱

Can't wait to try it out [on Monday].