-
Notifications
You must be signed in to change notification settings - Fork 0
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
app.js is too large and contains plain source code #356
Comments
More explanation on the problem: the dist/app.js file that is the output of the build process contains plain-readable file (meaning anyone can copy/read the code from the application). Published code is here: http://studio.theweflex.com/app.js
Usually, production build (uglification/minification), this should be a much smaller file that is hard to reverse-engineer. Current
if we change this to use the
output:
and now app.js content looks like this:
|
This has been there for a long time (since January 2017) where this commit dropped the -p:
|
@rngadam
These are the steps that @ruoru has taken:
|
@cliuless have you checked that the versions of NodeJS and the dependencies match on both the local machine and the server? |
@ruoru will try the following solutions
|
|
Investigating this, seems that "TypeError: Right-hand side of 'instanceof' is not an object" is an error at load in the calendar component (the app redirects to the calendar when the main index.jsx loads). It occurs in an incognito window so there's no logged in user yet. It seems to be within a promise chain. If I put some debug code, I can see that this code:
Receives an My hypothesis is that there's some code that uses promises but poorly handles failure or some missing resource when deployed on the dev server. It should have to do with serving from the nginx server / dev.theweflex.com domain instead of localhost. Maybe webpack going into a different code path and behaving differently doing it? Recommendations:
List of other things that are problematic here when looking at this:
|
Another thing that we can test: what happens when we use a local machine nginx setup instead? |
And a note that this happens whether we build on the server or use the locally built version of app.js and push it to the server. |
app.js is 3.7MB and non-uglified (source is visible) on http://studio.theweflex.com/
Steps to reproduce:
Steps to solve:
The text was updated successfully, but these errors were encountered: