2
0
mirror of https://github.com/tenrok/vue-select.git synced 2026-06-13 08:32:26 +03:00

build: fix webpack dev environment (#1593)

This commit is contained in:
Jeff Sagal
2022-02-18 12:49:42 -08:00
committed by GitHub
parent a662233af7
commit f8a41df594
3 changed files with 351 additions and 266 deletions
+8 -23
View File
@@ -1,36 +1,21 @@
const { merge } = require('webpack-merge')
const chokidar = require('chokidar')
const HtmlWebpackPlugin = require('html-webpack-plugin')
const baseWebpackConfig = require('./webpack.base.conf')
/**
*
*/
module.exports = merge(baseWebpackConfig, {
entry: './dev/dev.js',
devServer: {
open: true,
static: false,
client: { overlay: true },
watchFiles: ['dev/dev.html'],
},
stats: false,
plugins: [
new HtmlWebpackPlugin({
title: 'dev',
template: './dev/dev.html',
inject: true,
}),
],
optimization: {
noEmitOnErrors: true,
},
devServer: {
hot: 'only',
open: true,
// inline: true,
// stats: {
// children: false,
// modules: false,
// chunks: false,
// },
port: 8080,
// onBeforeSetupMiddleware(server) {
// chokidar.watch(['./**/*.html']).on('all', function () {
// server.sockWrite(server.sockets, 'content-changed')
// })
// },
},
})