This repository was archived by the owner on Nov 17, 2020. It is now read-only.
React4xp: easy react rendering in XP#3
Open
espen42 wants to merge 96 commits into
Open
Conversation
…king (separate) chunks for node_modules and common code shared between components
…plate. Assets folder name appears twince, when we consider the {{assetUrl}}. How to?
…e URLs in HtmlWebpackPlugin references to hashed files, so in order to use it along with {{assetUrl}}, they must refer to the same root - lest all other refs be confused. Therefore, assets is the root path of the webpack build - and index.html must be manually placed in the right place after the webpack build (or with some path magic here, putting it in the right place).
…lder, with only _common and vendors as higher priority chunks.
…tension array instead of having to run three times.
…lso fixed import component problem.
…this, then implement the plan, doing the server-side-rendered HTML last.
…ning up for jsx components in parts (but in the process, index.html is built less good - the relative path after {{assetUrl}} now messes up the way the path is resolved by XP and the browser, making the asset urls return the index.html itself instead).
…But {{assetsUrl}}/assets must still be changed to only {{assetsUrl}}
…tracts hashed common-chunk names to commonChunks.xml
…STONE: produces an XP part with a react-pluggable placeholder.
…omponent jsx (that is, js after compilation) file from a service, but that doesn't work. Not even placeholders in the service: error "not found". Why? Made in main.js instead, for proof of concept, but should be moved to services.
….starter.react/react4xp/... (turns out router has a bug and can't be used in services for now). Removed the makeshift service from main.js
… to trigger. Why.
…riggers the exported function with inserted props.
…t: turn the procedures in the controller and the component into importable, generalized util methods.
…een entries and dependency chunks.
… to encapsulate related/interdependent functionality.
…available top-level components.
…__STATE__ step needed?
…e custom Duckfactory wrapper.
…, inlined content (e.g. SSR before hydration) can be rendered before fetching assets.
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Pull request to get started looking at stuff. Main question for now: is this a viable approach? Unpolished, I will add documentation, comments and cleanup, but this works pretty nicely.
Update: deleted the overview, look at the README.md instead.