Skip to content

Commit

Permalink
fix(build): fix broken sourcemaps
Browse files Browse the repository at this point in the history
  • Loading branch information
filipesilva committed May 19, 2016
1 parent 9b8334f commit 2376a68
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 11 deletions.
1 change: 0 additions & 1 deletion addon/ng2/blueprints/ng2/files/__path__/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"declaration": false,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"mapRoot": "",
"module": "commonjs",
"moduleResolution": "node",
"noEmitOnError": true,
Expand Down
8 changes: 4 additions & 4 deletions addon/ng2/blueprints/ng2/files/angular-cli-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ module.exports = function(defaults) {
vendorNpmFiles: [
'systemjs/dist/system-polyfills.js',
'systemjs/dist/system.src.js',
'zone.js/dist/*.js',
'zone.js/dist/**/*.+(js|js.map)',
'es6-shim/es6-shim.js',
'reflect-metadata/*.js',
'rxjs/**/*.js',
'@angular/**/*.js'
'reflect-metadata/**/*.+(js|js.map)',
'rxjs/**/*.+(js|js.map)',
'@angular/**/*.+(js|js.map)'
]
});
};
7 changes: 2 additions & 5 deletions lib/broccoli/angular2-app.js
Original file line number Diff line number Diff line change
Expand Up @@ -404,21 +404,18 @@ class Angular2App extends BroccoliPlugin {
}

_getBundleTree(preBundleTree){
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 assetsTree = this._getAssetsTree();

var scriptTree = new BroccoliFunnel(preBundleTree, {
include: scriptTagVendorFiles
include: this._options.polyfills
});

var nonJsTree = new BroccoliFunnel(preBundleTree, {
exclude: ['**/*.js', '**/*.js.map']
});
var jsTree = new BroccoliFunnel(preBundleTree, {
include: ['**/*.js']
include: ['**/*.js', '**/*.js.map']
});

var bundleTree = new BundlePlugin([jsTree]);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"shelljs": "^0.7.0",
"silent-error": "^1.0.0",
"symlink-or-copy": "^1.0.3",
"systemjs-builder": "^0.15.16",
"systemjs-builder": "0.15.17",
"typescript": "^1.8.10",
"typings": "^0.8.1"
},
Expand Down

0 comments on commit 2376a68

Please sign in to comment.