I'm assuming this ticket means you want to be able to require('your-entry-point') in your page's JavaScript? I have the same need.
My entry point scripts tend to expose a single init function that takes in parameters from the rendered html, ie I do this at the bottom of my document:
<script>
$(function() {
var config = {foo: 'bar'};
var init = require('my/module/name');
init(config);
});
</script>
If I'm weren't using factor-bundle, I'd simply use bundle.require(moduleSourcePath, {expose: 'my/module/name'}); for each entry point in my project. But I can't figure out a way to get the same results using factor-bundle.
I'm assuming this ticket means you want to be able to require('your-entry-point') in your page's JavaScript? I have the same need.
My entry point scripts tend to expose a single init function that takes in parameters from the rendered html, ie I do this at the bottom of my document:
If I'm weren't using factor-bundle, I'd simply use
bundle.require(moduleSourcePath, {expose: 'my/module/name'});
for each entry point in my project. But I can't figure out a way to get the same results using factor-bundle.