Skip to content

Conversation

goto-bus-stop
Copy link
Owner

Going to be useful for a loadable-component thing I'm working on.

var sr = require('split-require')
var component = loadableComponent({
  load: sr.bind(null, './whatever')
  // vs function (cb) { sr('./whatever', cb) }
})


function processBoundSplitRequire (row, node) {
var requirePath = node.arguments[1].arguments[0].value
var resolved = row.deps[requirePath]
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can also use this code for sr.call(null, 'whatever'), i think.

@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.

1 participant