Skip to content

filter function must return 'true' for css file as well as the output html file #16

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

Closed
aKzenT opened this issue Sep 4, 2019 · 3 comments
Assignees

Comments

@aKzenT
Copy link

aKzenT commented Sep 4, 2019

If I understand the code correctly, the filter function is not only called for the CSS files to decide if they should be inlined or not, but also for the target .html-file in which the styles should be injected.

I don't think this is very intuitive and at the very least it should be mentioned in the documentation. I had to debug through the plugin to find out, why my CSS does not get inlined.

@aKzenT
Copy link
Author

aKzenT commented Sep 4, 2019

Another small gotcha is that the example target is using a HTML-comment which is removed by default by the html-webpack-plugin in production mode (https://github.com/jantimon/html-webpack-plugin#minification )

@runjuu runjuu self-assigned this Sep 5, 2019
@runjuu
Copy link
Owner

runjuu commented Sep 6, 2019

Hi @aKzenT , I have updated REAMED according to your advice. Let me know if there is any problem. 😄

@aKzenT
Copy link
Author

aKzenT commented Sep 6, 2019

Thanks!

@runjuu runjuu closed this as completed Sep 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants