Under Addon Authors guide, for Third Party Dependencies,
We need to include Funnel and mergeTrees dependencies
CURRENT
var map = require('broccoli-stew').map;
treeForVendor(defaultTree) {
var browserVendorLib = new Funnel(<path to your third party lib>);
browserVendorLib = map(browserVendorLib, (content) => `if (typeof FastBoot === 'undefined') { ${content} }`);
return new mergeTrees([defaultTree, browserVendorLib]);
}
included() {
// this file will be loaded in FastBoot but will not be eval'd
app.import('vendor/<third party lib file name>.js');
}
EXPECTED
var map = require('broccoli-stew').map;
var Funnel = require('broccoli-funnel');
var mergeTrees = require('broccoli-merge-trees');
treeForVendor(defaultTree) {
var browserVendorLib = new Funnel(<path to your third party lib>);
browserVendorLib = map(browserVendorLib, (content) => `if (typeof FastBoot === 'undefined') { ${content} }`);
return new mergeTrees([defaultTree, browserVendorLib]);
}
included() {
// this file will be loaded in FastBoot but will not be eval'd
app.import('vendor/<third party lib file name>.js');
}
Under Addon Authors guide, for Third Party Dependencies, We need to include Funnel and mergeTrees dependencies
CURRENT
EXPECTED
Example code referred from https://github.com/soulim/ember-cli-bootstrap-datepicker/pull/100/files#diff-168726dbe96b3ce427e7fedce31bb0bcR7