Skip to content
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

Exclude paths from html minification #200 #292

Merged
merged 2 commits into from Jan 29, 2022

Conversation

Adibla
Copy link
Contributor

@Adibla Adibla commented Jan 26, 2022

Checklist

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@Adibla
Copy link
Contributor Author

Adibla commented Jan 27, 2022

lgtm

Thanks, I saw that CI failed in test stage. I cannot reproduce the error in local. Do you know the possible reason?

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
index.js Outdated Show resolved Hide resolved
index.js Outdated Show resolved Hide resolved
index.js Outdated
@@ -210,6 +215,8 @@ function fastifyView (fastify, opts, next) {

function readCallback (that, page, data) {
return function _readCallback (err, html) {
const requestedPath = that?.request?.context?.config?.url
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This syntax is not supported by the actual node10 CI

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for feedback. I removed optional chaining. Removing check on request existence causes errors on tests execution, in order to avoid these I added manual check.

@Eomm Eomm requested a review from darkgl0w January 28, 2022 08:04
Copy link
Member

@darkgl0w darkgl0w left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So far it seems good to me :)

Just a little question/nit: art-template and handlebars have not been tested with this new feature, is there a particular reason to this ?

@darkgl0w darkgl0w linked an issue Jan 28, 2022 that may be closed by this pull request
@Adibla
Copy link
Contributor Author

Adibla commented Jan 28, 2022

So far it seems good to me :)

Just a little question/nit: art-template and handlebars have not been tested with this new feature, is there a particular reason to this ?

Thanks. I have not included tests for art-template and handlebars because art-template currently has not tests for minification (I thought it's not implemented) and handlebars has only tests without routing.

@Eomm Eomm merged commit 8a4aa97 into fastify:master Jan 29, 2022
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

Successfully merging this pull request may close these issues.

ASK, how to exclude minify for spesific routes?
4 participants