Skip to content

Commit

Permalink
devServer.historyApiFallback with HtmlWebpackPlugin was fixed.
Browse files Browse the repository at this point in the history
  • Loading branch information
ruchirsachdeva committed Oct 12, 2016
1 parent d3f9e61 commit 5391183
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 35 deletions.
6 changes: 0 additions & 6 deletions config/webpack.aot.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ const webpack = require('webpack');
const webpackMerge = require('webpack-merge');
const commonConfig = require('./webpack.common.js');

const HtmlWebpackPlugin = require('html-webpack-plugin');

const ENV = process.env.NODE_ENV = process.env.ENV = 'production';
const API_URL = process.env.API_URL || '';

Expand All @@ -30,10 +28,6 @@ module.exports = webpackMerge(commonConfig, {
chunkFilename: '[id].[chunkhash].chunk.js'
},
plugins: [
new HtmlWebpackPlugin({
template: 'src/index.prod.html',
chunksSortMode: 'dependency',
}),
new webpack.DefinePlugin({
'ENV': JSON.stringify(ENV),
'API_URL': JSON.stringify(API_URL)
Expand Down
5 changes: 5 additions & 0 deletions config/webpack.common.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
const webpack = require('webpack');
const helpers = require('./helpers');

const HtmlWebpackPlugin = require('html-webpack-plugin');
const ForkCheckerPlugin = require('awesome-typescript-loader').ForkCheckerPlugin;

module.exports = {
Expand Down Expand Up @@ -28,6 +29,10 @@ module.exports = {
]
},
plugins: [
new HtmlWebpackPlugin({
template: 'src/index.html',
chunksSortMode: 'dependency',
}),
new ForkCheckerPlugin(),
new webpack.ContextReplacementPlugin(
/angular(\\|\/)core(\\|\/)(esm(\\|\/)src|src)(\\|\/)linker/,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
"tslint-loader": "^2.1.3",
"typescript": "^2.0.3",
"webpack": "2.1.0-beta.25",
"webpack-dev-server": "^2.1.0-beta.8",
"webpack-dev-server": "^2.1.0-beta.9",
"webpack-merge": "~0.14.1"
}
}
3 changes: 0 additions & 3 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,5 @@
ga('create', 'UA-74585747-1', 'auto');
ga('send', 'pageview');
</script>
<script type="text/javascript" src="/polyfills.js"></script>
<script type="text/javascript" src="/vendor.js"></script>
<script type="text/javascript" src="/main.js"></script>
</body>
</html>
25 changes: 0 additions & 25 deletions src/index.prod.html

This file was deleted.

0 comments on commit 5391183

Please sign in to comment.