Created
September 7, 2019 07:43
-
-
Save thanapongp/8f817a1884ed8196b5765b43f9114955 to your computer and use it in GitHub Desktop.
webpack.config.js with HtmlWebpackPlugin
This file contains hidden or 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/js/main.js', | |
| mode: 'development', | |
| plugins: [ | |
| new HtmlWebpackPlugin({ | |
| filename: 'index.html', | |
| template: 'src/index.html' | |
| }) | |
| ], | |
| output: { | |
| filename: 'index.js', | |
| path: path.resolve(__dirname, 'dist') | |
| } | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment