25 lines
716 B
JavaScript
25 lines
716 B
JavaScript
const autoprefixer = require('autoprefixer');
|
|
const path = require('path');
|
|
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
|
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
|
|
|
|
module.exports = {
|
|
entry: './src/index.js',
|
|
output: {
|
|
filename: 'bundle.js',
|
|
// path: path.resolve(__dirname, 'dist'),
|
|
},
|
|
plugins: [
|
|
new CleanWebpackPlugin(),
|
|
new HtmlWebpackPlugin({
|
|
hash: true,
|
|
template: './src/index.html',
|
|
filename: '.././dist/index.html' //relative to root of the application
|
|
})
|
|
],
|
|
devServer: {
|
|
contentBase: path.join(__dirname, 'dist'),
|
|
compress: true,
|
|
port: 8888
|
|
}
|
|
}; |