Skip to content

Commit

Permalink
fix(@angular/cli): ensure only in-memory output is served
Browse files Browse the repository at this point in the history
  • Loading branch information
Charles Lyding authored and filipesilva committed Mar 30, 2017
1 parent 3598a47 commit 1bc174b
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
"url-loader": "^0.5.7",
"walk-sync": "^0.3.1",
"webpack": "~2.2.0",
"webpack-dev-server": "~2.3.0",
"webpack-dev-server": "~2.4.2",
"webpack-merge": "^2.4.0",
"zone.js": "^0.8.4"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/@angular/cli/custom-typings.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
interface IWebpackDevServerConfigurationOptions {
contentBase?: string;
contentBase?: boolean | string | string[];
hot?: boolean;
historyApiFallback?: {[key: string]: any} | boolean;
compress?: boolean;
Expand Down
2 changes: 1 addition & 1 deletion packages/@angular/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
"url-loader": "^0.5.7",
"walk-sync": "^0.3.1",
"webpack": "~2.2.0",
"webpack-dev-server": "~2.3.0",
"webpack-dev-server": "~2.4.2",
"webpack-merge": "^2.4.0",
"zone.js": "^0.8.4"
},
Expand Down
3 changes: 2 additions & 1 deletion packages/@angular/cli/tasks/serve.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,8 @@ export default Task.extend({
poll: serveTaskOptions.poll
},
https: serveTaskOptions.ssl,
overlay: serveTaskOptions.target === 'development'
overlay: serveTaskOptions.target === 'development',
contentBase: false
};

if (sslKey != null && sslCert != null) {
Expand Down

2 comments on commit 1bc174b

@yoooee
Copy link

@yoooee yoooee commented on 1bc174b May 11, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems that after this change was introduced, we are no longer able to http.get a local .json file.

@filipesilva
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yoooee it was a bug that ng serve would serve files that were not included in a build. This would lead to scenarios where your app would work via ng serve, but not via any other server. The solution is to add all assets you use (like those json files) to the assets array.

Please sign in to comment.