Conversation
e6a84f7 to
bee43a9
Compare
| export default function() { | ||
| return flooring(); | ||
| } | ||
| export { default } from 'outdated/utils/floor-type'; |
There was a problem hiding this comment.
This is intentionally different than the addon module and should not re-export the module from the addon.
There was a problem hiding this comment.
please coordinate before doing work on this branch. I am in the process of fixing these issues.
…cting them itself.
This is to allow StubGenerator to rewrite app files which import npm modules. Allowing them to uniquely address Browserify modules.
* browserify_stubs needs to be provided to CachingBrowserify * everything else, is merged with the existing tree. This should only include the files that contain `npm:x` import statements.
1edc86e to
e3c8b59
Compare
|
@nathanhammond the tests have been updated to work with some known add-on limitations. There still exist further issues, but this now works around a resolving bug in ember-cli. So it is at-least closing to possibly working. |
|
Im heading to a meeting, and wont be looking at this for the next hour or so. My latest changes have been updated. Please review the new lib structure, especially how in-repo modules dependencies are setup. Including that they declare their dependency on ember-browserify itself (this way ember browserify atleast runs for them). There are more issues yet, although this is getting closer... |
Exists in tests/dummy/app/routes/application.js This reverts commit d25ff36.
Rework tests, add reexports scenario.
|
The next step on this, which I've started, is to switch to pushing a preprocessor into the parent addon and away from |
| "ember-addon": { | ||
| "configPath": "tests/dummy/config", | ||
| "paths": [ | ||
| "node_modules/modern", |
There was a problem hiding this comment.
why is this not tests/dummy/lib/modern and tests/dumy/lib/outdated ?
There was a problem hiding this comment.
Because by the time we actually need them in test they're present in node_modules because of the link behavior we use. Probably results in duplication, I need to think about this.
There was a problem hiding this comment.
I believe we should be explicit, the indirection via symlink I think is unneeded.
|
Some notes:
We most likely need to address:
Something to consider:
|
lib/stub-generator.js
Outdated
| var needsImportsReWritten = false; | ||
|
|
||
| Object.keys(imports).forEach(function(name) { | ||
| needsImportsReWritten = true; |
There was a problem hiding this comment.
Do we want to try comparing the imports object across runs?
There was a problem hiding this comment.
ya, i'll fix in the work im about todo.
e4b6e7f to
a70c006
Compare
| toTree: function(tree) { | ||
| var type = 'js'; | ||
| var root = findRoot(instance); | ||
| var target = findTarget(instance); |
There was a problem hiding this comment.
I believe this is already via the add-on API, we should use that reference to it instead.
lib/index.js
Outdated
| ext: 'js', | ||
| toTree: function(tree) { | ||
| var type = 'js'; | ||
| var root = findRoot(instance); |
There was a problem hiding this comment.
I don't believe this is currently being used. We should remove it.
|
Order of execution:
Can use Looking into available workarounds for the |
TL;DR this opens support (improved support, not quite perfect) for add-on and nested add-on usage.
The aim is to mangle imports/exports such that, each browserify bundle will uniquely identify each module by version. The associated importing module will also refer to that version. This will in-theory allow duplicate versions to co-exist. We would prefer this not to work, but shrug.... 🔥
browserify/browserify.jsimports.