Skip to content

Commit 0462b3c

Browse files
committed
fix(@angular/cli): enable dev server history fallback in ejected config
1 parent 2ce61f2 commit 0462b3c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/@angular/cli/tasks/eject.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,10 @@ class JsonWebpackSerializer {
320320
serialize(config: any): string {
321321
// config = Object.assign({}, config);
322322
config['plugins'] = this._pluginsReplacer(config['plugins']);
323+
// Routes using PathLocationStrategy break without this.
324+
config['devServer'] = {
325+
'historyApiFallback': true
326+
};
323327
config['resolve'] = this._resolveReplacer(config['resolve']);
324328
config['resolveLoader'] = this._resolveReplacer(config['resolveLoader']);
325329
config['entry'] = this._entryReplacer(config['entry']);

0 commit comments

Comments
 (0)