-
Notifications
You must be signed in to change notification settings - Fork 3
Description
previously, the builder would assemble all required modules into an imports object, however now it does not.
it would require one to "derequire" the source for it to work (and a new require function was defined). disregarding the other problems that custom require function made, the new version does not do anything at all with the imports. it doesn't even make adependencyBlock any more.
this works ok for all require statements which are npm modules, however if one of the require statements is a local path - require('../lala/my/lib'), it will no longer work, because gobble will do its browserify requiring after rollup (and so those files files won't exist).
this has an advantage where one can provide a partitioned bundle with a little work (not all deps need to be in the same app.js).
however, for this to work properly for local paths, consider this case:
component.exports = {
decorators: {
lala: require('../decorators/lala')
}
}the require statement will need to be replaced with the appropriate __imports${counter}___ so it would look something like this:
import __imports0__ from '../decorators/lala'
component.exports = {
decorators: {
lala: __imports0__
}
}I'm working on this change now, but actually, considering this change, there will now be duplicate functionality in rcu and rcu-builders.
PR probably coming soon. code is a bit messy atm
thoughts?