Skip to content

Capture prototype#20

Open
goto-bus-stop wants to merge 12 commits into
defaultfrom
capture
Open

Capture prototype#20
goto-bus-stop wants to merge 12 commits into
defaultfrom
capture

Conversation

@goto-bus-stop

@goto-bus-stop goto-bus-stop commented Apr 6, 2018

Copy link
Copy Markdown
Owner

Supposed to look like:

splitRequire.capture(function (ondone) {
  ssr.render(state, ondone)
}, function (err, result, bundles) {
  // bundles is array of splitRequire()'d entry points
})
// or
var { bundles, result } = await splitRequire.capture(async function () {
  return await ssr.render(state)
})

@diffcunha

Copy link
Copy Markdown

Very interesting

@goto-bus-stop

Copy link
Copy Markdown
Owner Author

we probably need some sort of manifest file to relate the file path on disk to the dynamic bundle too

@diffcunha

Copy link
Copy Markdown

That makes sense, I also made that with choo-bundles, where the browserify plugin is heavily inspired in split-require. Unfortunately I needed more than the manifest so I couldn’t just extend split-require. Nevertheless I have some code to handle that there https://github.com/nearform/choo-bundles

@goto-bus-stop goto-bus-stop changed the base branch from master to default November 19, 2020 10:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants