blackHawk blackHawk - 1 year ago 90
Javascript Question

html-webpack-plugin not working

webpack.config.js is here

var webpack = require("webpack");
var htmlwebpack = require('html-webpack-plugin');

module.exports = {
entry : "./src/main.ts",
output : {
path : "./dist",
filename : "app.bundle.js"

},

module : {
loaders : [
{test : /\.ts$/, loader : 'ts'}
]
},

resolve : {
extensions : ['', '.ts','.js']
},
Plugin :[
new htmlwebpack({
template : 'src/index.html'
})
]}


The above configuration generating only app.bundle.js in dist folder when running command "webpack --progress" and does not include index.html in the src folder also when im running this command webpack-dev-server --inline --progress
dist folder is not created but at the console there is output that compile process happened, like we see when we add flag --progress

Answer Source

Typos mistake obviously, watch out for it babe!

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download