Skip to content

Commit

Permalink
fix(mobile): include vendor scripts in bundle
Browse files Browse the repository at this point in the history
Closes #733
  • Loading branch information
jeffbcross committed May 13, 2016
1 parent 818fb19 commit 679d0e6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/broccoli/angular2-app.js
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,7 @@ class Angular2App extends BroccoliPlugin {
var indexFile = path.join(this._sourceDir, 'index.html');
var indexContent = fs.readFileSync(indexFile, 'utf8');
var scriptTagVendorFiles = indexContent.match(/vendor\/[^"']*\.js/gi);
var vendorTree = this._getVendorNpmTree();

var scriptTree = new BroccoliFunnel(preBundleTree, {
include: scriptTagVendorFiles
Expand All @@ -430,7 +431,7 @@ class Angular2App extends BroccoliPlugin {
var bundleTree = new BundlePlugin([jsTree]);

if (this.ngConfig.apps[0].mobile) {
bundleTree = concat(BroccoliMergeTrees([jsTree, scriptTree, bundleTree], {
bundleTree = concat(BroccoliMergeTrees([vendorTree, jsTree, scriptTree, bundleTree], {
overwrite: true
}), {
headerFiles: this._options.polyfills.concat([
Expand Down

0 comments on commit 679d0e6

Please sign in to comment.