liferay / liferay-js-toolkit

GNU Lesser General Public License v3.0
52 stars 41 forks source link

feat: #625 add specific build for fragments #648

Closed izaera closed 4 years ago

izaera commented 4 years ago

This is the final PR for the fragments build support. It supersedes #627.

I think the PR is self evident by reading the commits. Basically what we want to do is generating files for the fragments CLI to use as input.

This means compiling each React based fragment as a single webpack bundle that imports react from the Portal and bundles any other dependency inside the webpack bundle.

These bundles are then loaded by the fragment renderer in the Portal, leveraging ReactRenderer service.

You can see an example of how a fragment project would look like when using this PR in this repo.

wincent commented 4 years ago

I only skimmed this, but as it is isolated to 3.x-WIP it seems like the risk is pretty low, so from my side this is a green light...

green-light

izaera commented 4 years ago

@wincent also, it's almost the same as the previous PR (except for the refactors) and it was already reviewed.