Last active
October 6, 2020 10:57
-
-
Save FazioNico/257b6282492e4c24c9343952a1e0b2b5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const path = require('path'); | |
const HtmlWebPackPlugin = require("html-webpack-plugin"); | |
module.exports = { | |
entry: './src/app/app.js', | |
output: { | |
filename: 'main.js', | |
path: path.resolve(__dirname, 'dist') | |
}, | |
resolve: { | |
extensions: ['.js'] | |
}, | |
module: { | |
rules: [ | |
{ | |
test: /\.html$/, | |
use: [ | |
{ | |
loader: "html-loader", | |
// options: { minimize: true } | |
} | |
] | |
}, | |
{ | |
test: [/.css$/], | |
use:[ | |
'style-loader', | |
'css-loader' | |
] | |
} | |
] | |
}, | |
plugins: [ | |
new HtmlWebPackPlugin({ | |
template: "./src/index.html", | |
filename: "./index.html" | |
}) | |
] | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment