I have inherited an angular+Typescript project. The dev environment used gulp's webserver and I am trying to switch over to webpack-dev-server so that we can enable hot-module-replacement.
When I run webpack-dev-server from our build/ directory, the command fails, listing about 700 TypeScript errors. We would rather not fix them. Is there any way to use webpack-dev-server even with TypeScript errors?
My understanding was that webpack should still correctly create the build file and start the dev-server even if typescript errors occur, unless you enable the webpack-fail-plugin, which I do not have enabled.
Here is my current webpack.config.js file:
'use strict';
var webpack = require('webpack');
var CompressionPlugin = require("compression-webpack-plugin");
var config = {
entry: {
build: './app/core/bootstrap.ts',
//adminbuild: './app/core/adminbootstrap.ts',
//report: './app/core/reportbootstrap.ts',
vendor: ["angular", "angular-material"]
},
output: {
path: __dirname + '/build',
publicPath: '',
filename: '[name].bundle.js'
},
devtool: 'source-map',
resolve: {
extensions: ['', '.webpack.js', '.web.js', '.ts', '.js', '.json', '.jsx', '.js']
},
module: {
preloaders: [
/* {
test: /\.ts$/,
loader: 'tslint'
}*/
],
loaders: [
...
{
test: /\.ts$/,
loader: 'ts'
},
...
],
},
};
module.exports = config;