Fix for upcoming FastBoot 1.0 breaking changes#89
Fix for upcoming FastBoot 1.0 breaking changes#89simonihmig wants to merge 1 commit intohtml-next:masterfrom
Conversation
|
Super awesome. I'll take a look and get her in. Thanks a bunch. |
| if (!process.env.EMBER_CLI_FASTBOOT) { | ||
| app.import('vendor/hammer.js'); | ||
| } | ||
| app.import('vendor/hammer.js'); |
There was a problem hiding this comment.
Do you need app.import if it is merged in the vendor tree?
There was a problem hiding this comment.
Yes, you do. You can only import from bower_component and vendor, that's why the file from node_modules needs to be moved to the vendor tree. But you still have to import it.
There was a problem hiding this comment.
aah didn't know about that magic. LGTM!
|
@eriktrom anything missing to get this merged? |
| }); | ||
| hammerTree = map(hammerTree, (content) => `if (typeof FastBoot === 'undefined') { ${content} }`); | ||
|
|
||
| return new MergeTrees([vendorTree, hammerTree]); |
There was a problem hiding this comment.
I'm getting an error with this:
BroccoliMergeTrees: Expected Broccoli node, got undefined for inputNodes[0]
I think it needs something like (edited it a bit):
treeForVendor(vendorTree) {
let hammerTree = new Funnel(path.dirname(require.resolve('hammerjs')), {
files: ['hammer.js']
});
hammerTree = map(hammerTree, (content) => `if (typeof FastBoot === 'undefined') { ${content} }`);
var trees = [
hammerTree
];
if (vendorTrees) {
trees.push(vendorTrees);
}
return new MergeTrees(trees);
}
|
Just merged some changes that should implement this 👍 |
process.env.EMBER_CLI_FASTBOOTwill be gone in FastBoot 1.0. This should now work in pre and post 1.0 versions ofember-cli-fastboot. See ember-fastboot/ember-cli-fastboot#360 for context.