Skip to content
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

Capture prototype #20

Open
wants to merge 12 commits into
base: default
Choose a base branch
from
Open

Capture prototype #20

wants to merge 12 commits into from

Conversation

goto-bus-stop
Copy link
Owner

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

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

Very interesting

@goto-bus-stop
Copy link
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

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.

None yet

2 participants