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

Fix attempt for issue #3979: blank page login, qs bug from mapped custom domain #4432

Merged
merged 1 commit into from
Oct 1, 2017

Conversation

t100n
Copy link
Contributor

@t100n t100n commented Sep 8, 2017

Set semicolons=true in the build command that is passed to uglifyjs.
Added 'aphrodite/no-important' to the required packages in admin/client/packages.js.

Issue #3979 :
admin/public/js/packages.js generates a Uncaught SyntaxError: Unexpected string when minified, and fails to load the admin interface.
After some digging I found that uglifyjs compresses the typeof checks into the following format "undefined"==typeof x which triggers a syntax error after passing through another minification process when deployed.

packages.js generates a Uncaught SyntaxError: Unexpected string when minified, and fails to load the admin interface.
After some digging I found that uglifyjs compresses the typeof checks into the following format "undefined"==typeof x which triggers a syntax error after passing through another minification process when deployed.

A way to prevent this from happening is to allow semicolons in the uglifyjs command.
Also needed to add the 'aphrodite/no-important' to the required packages for the Admin UI.
@Noviny
Copy link
Contributor

Noviny commented Sep 22, 2017

@t100n So glad someone got to the bottom of this rabbit hole. We haven't encountered the issue, so I can't validate that this fixes it, but I take that it fixed the issue for you?

Also, why was adding aphrodite relevant to resolve this?

@Noviny Noviny self-assigned this Sep 24, 2017
@t100n
Copy link
Contributor Author

t100n commented Sep 29, 2017

@Noviny indeed this was the solution for my problem.

I was forced to add 'aphrodite/no-important' because it was triggering a missing module while loading the admin UI, during my testing of the new packages.js file. So it was just to make it work.

@Noviny
Copy link
Contributor

Noviny commented Oct 1, 2017

@t100n Thanks for providing this fix.

@Noviny Noviny merged commit a00c425 into keystonejs:master Oct 1, 2017
@stennie stennie changed the title Fix attempt for issue #3979 Fix attempt for issue #3979: blank page login, qs bug from mapped custom domain Jun 3, 2018
@stennie stennie added the bug label Jun 3, 2018
@Zedonboy
Copy link

Zedonboy commented Apr 1, 2019

@t100n where will i find all these "semicolons = true".... I should tamper with the npm package(keystone)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants