const HtmlWebPackPlugin = require("html-webpack-plugin");
module.exports = {
entry: './app/public/javascripts/main.js',
output: {
filename: './bundle.js'
},
module: {
rules: [
{
test: /\.js$/,
exclude: ["bower_components", "node_modules"],
use: {
loader: "babel-loader"
}
},
{
test: /\.html$/,
use: [
{
loader: "html-loader",
options: { minimize: true }
}
]
}
]
},
plugins: [
new HtmlWebPackPlugin({
template: "./app/public/index.html",
filename: "./index.html",
inject: true
})
]
};
const HtmlWebPackPlugin = require("html-webpack-plugin");
module.exports = {
entry: './app/public/javascripts/main.js',
output: {
filename: './bundle.js'
},
module: {
rules: [
{
test: /\.js$/,
exclude: /\.node_modules/,
use: {
loader: "babel-loader"
}
},
{
test: /\.html$/,
use: [
{
loader: "html-loader",
options: { minimize: true }
}
]
}
]
},
node: {
fs: "empty"
},
plugins: [
new HtmlWebPackPlugin({
template: "./app/public/index.html",
filename: "./index.html",
inject: true
})
]
};