In my angular project if we use the app is compiling and working fine if we use [email protected]
. Whereas if we use version 2.0.0
, application is not working. What would be the difference between version 1.0.0 & 2.0.0?
webpack.config.ts
const webpack = require('webpack');
const HtmlWebpackPlugin = require('html-webpack-plugin');
module.exports = {
entry: './src/main.ts',
resolve: {
extensions: ['.ts', '.js']
},
module: {
rules: [
{
test: /\.ts$/,
use: ['ts-loader', 'angular2-template-loader'],
exclude: /node_modules/
},
{
test: /\.(html|css)$/,
use: 'raw-loader'
}
]
},
plugins: [
new HtmlWebpackPlugin({
template: './src/index.html',
filename: 'index.html',
inject: 'body'
}),
new webpack.DefinePlugin({
config: JSON.stringify({
apiUrl: 'http://localhost:9999'
})
})
],
devServer: {
historyApiFallback: true
}
};