Skip to content
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
masterfrom
experiments-in-XP
Open

React4xp: easy react rendering in XP#3
espen42 wants to merge 96 commits into
masterfrom
experiments-in-XP

Conversation

@espen42

@espen42 espen42 commented Jan 25, 2019

Copy link
Copy Markdown

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.

…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.
…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
…riggers the exported function with inserted props.
…t: turn the procedures in the controller and the component into importable, generalized util methods.
@espen42 espen42 changed the title Experiments in xp React4xp: easy react rendering in XP Jan 25, 2019
… to encapsulate related/interdependent functionality.
…, inlined content (e.g. SSR before hydration) can be rendered before fetching assets.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant