Skip to content

Commit

Permalink
build: add root to the sourcemap so it won't use absolute pathing
Browse files Browse the repository at this point in the history
  • Loading branch information
hansl committed Jun 7, 2016
1 parent 7419a12 commit 2ba0674
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 9 deletions.
9 changes: 6 additions & 3 deletions angular-cli-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ function _buildAppTree(defaults) {

return new Angular2App(defaults, inputNode, {
sourceDir: sourceDir,
bundle: {
bundles: []
},
polyfills: [
'vendor/core-js/client/core.js',
'vendor/systemjs/dist/system.src.js',
Expand All @@ -101,10 +104,10 @@ function _buildAppTree(defaults) {
vendorNpmFiles: [
'systemjs/dist/system-polyfills.js',
'systemjs/dist/system.src.js',
'zone.js/dist/*.js',
'zone.js/dist/*.+(js|js.map)',
'core-js/client/core.js',
'rxjs/**/*.js',
'@angular/**/*.js',
'rxjs/**/*.+(js|js.map)',
'@angular/**/*.+(js|js.map)',
'hammerjs/*.min.+(js|js.map)'
]
});
Expand Down
11 changes: 8 additions & 3 deletions src/demo-app/system-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ const components = [
'toolbar'
];


/** Map relative paths to URLs. */
const map: any = {
'@angular2-material/core': 'core',
Expand All @@ -45,6 +44,7 @@ components.forEach(name => {
};
});


////////////////////////////////////////////////////////////////////////////////////////////////
/***********************************************************************************************
* Everything underneath this line is managed by the CLI.
Expand All @@ -63,8 +63,13 @@ const barrels: string[] = [
'rxjs',

// App specific barrels.
'app',
'app/shared',
'demo-app',
'button-toggle',
'gestures',
'live-announcer',
'portal',
'overlay',
...components
/** @cli-barrel */
];

Expand Down
2 changes: 1 addition & 1 deletion src/demo-app/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"declaration": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"mapRoot": "",
"mapRoot": "/",
"module": "commonjs",
"moduleResolution": "node",
"noEmitOnError": true,
Expand Down
3 changes: 1 addition & 2 deletions src/e2e-app/system-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,7 @@ const barrels: string[] = [
'rxjs',

// App specific barrels.
'app',
'app/shared',
'e2e-app',
/** @cli-barrel */
];

Expand Down

0 comments on commit 2ba0674

Please sign in to comment.