$ npm i -D html-webpack-plugin
const path = require('path');
const HtmlPlugin = require('html-webpack-plugin');
// export
module.exports = {
entry: './js/main.js',
output: {
// path: path.resolve(__dirname, 'dist'),
// filename: 'main.js',
clean: true,
},
// 번들링 후 결과물의 처리 방식 등 다양한 플러그인들을 설정
plugins: [
new HtmlPlugin({
template: './index.html',
}),
],
};
devServer: {
host: 'localhost';
}