我hava webpack.config.js文件。当我运行命令它完美构建但它不会复制构建文件夹中的html文件。 我在client / app.html中有html文件。任何帮助将不胜感激。
var webpack = require('webpack'),
path = require('path');
function root(args) {
args = Array.prototype.slice.call(arguments, 0);
return path.join.apply(path, [__dirname].concat(args));
}
module.exports = {
devtool: 'source-map',
debug: true,
entry: './client/boot.ts',
resolve: {
extensions: ['', '.ts', '.js']
},
output: {
path: './build',
filename: 'bundle.js'
},
module: {
preLoaders: [
{ test: /\.js$/, loader: 'source-map-loader', exclude: [ root('node_modules/rxjs'), root('node_modules/@ngrx') ] }
],
loaders: [
{ test: /\.ts$/, loader: 'awesome-typescript-loader', exclude: [ /\.(spec|e2e)\.ts$/ ] },
{ test: /\.html$/, loader: 'raw' }
]
},
devServer: {
historyApiFallback: true
}
};