-
Notifications
You must be signed in to change notification settings - Fork 44
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
Update preact-cli, clean up client build #133
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Update preact-cli to 3.0.0-rc.10 (the RC versions are being used by the default template). Also move `client/src/pages` to `client/src/routes` to enable route splitting, move icons to within the `client/src` tree, and move contents of `public` directory to the appropriate places within the `client/src` tree.
Update HTML template to latest from preact-cli. Also disable prerendering, which now breaks on build (attempting to read sourcemaps). This change injects inline scripts into the built HTML.
Since updating preact-cli fixed the import resolution issues causing unmounting portals to crash, we can now use portals in the Modal component.
Explicitly check to fetch data for profile page on component mount as well as update.
Preact will crash if `false` is passed as a ref, so ensure we pass either a valid ref or `null`.
We no longer have any shell scripts in client/, so don't try to shellcheck them.
ginkoid
approved these changes
Mar 28, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
@ethanwu10 Are we ready to merge this? |
We can merge this now and make the sprite sheet a separate issue / PR. |
This was referenced Mar 28, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Update preact-cli to 3.0.0-rc.10 (since the RC versions are being used by the default template) and update the HTML template to match.
Build changes
client/build.sh
has been removed, with the build now being done entirely by preact-cli. The static build output is no longer being served under/static
, and is now served directly at the root.preact watch
now also proxies API requests; it is no longer necessary to changeconfig/client.js
to have API endpoints point tolocalhost:3000
.Source structure changes
Move
client/src/pages
toclient/src/routes
to enable route splitting, move icons to within theclient/src
tree, and move contents ofpublic
directory to the appropriate places within theclient/src
tree.Misc
PurgeCSS has been updated to the latest version.
Prerendering is still disabled due to build failures from sourcemap resolution (we might want to look into this in a separate issue).
This PR also contains small bugfixes in components and routes that were discovered in the process of migration:
/profile
now will load data on initial mount instead of only on a state changefalse
as aref
(which crashes the app)Will close #131
Still TODO: