Skip to content

Commit

Permalink
build: fix webpack dev environment (#1593)
Browse files Browse the repository at this point in the history
  • Loading branch information
sagalbot authored Feb 18, 2022
1 parent a662233 commit f8a41df
Show file tree
Hide file tree
Showing 3 changed files with 353 additions and 268 deletions.
31 changes: 8 additions & 23 deletions build/webpack.dev.conf.js
Original file line number Diff line number Diff line change
@@ -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')
// })
// },
},
})
22 changes: 9 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@
"peerDependencies": {
"vue": "2.x"
},
"resolutions": {
"ajv": "6.8.1"
},
"devDependencies": {
"@babel/core": "^7.4.0",
"@babel/eslint-parser": "^7.14.7",
Expand All @@ -48,9 +45,8 @@
"babel-eslint": "^10.0.3",
"babel-loader": "^8.0.5",
"bundlewatch": "^0.2.5",
"chokidar": "^3.5.2",
"commitizen": "^4.0.3",
"coveralls": "^3.0.2",
"coveralls": "^3.1.1",
"cross-env": "^5.2.0",
"css-loader": "^6.4.0",
"cssnano": "^5.0.8",
Expand All @@ -60,19 +56,19 @@
"eslint-loader": "^3.0.3",
"eslint-plugin-prettier": "^3.1.2",
"eslint-plugin-vue": "^6.2.1",
"html-loader": "^0.5.5",
"html-webpack-plugin": "^5.4.0",
"html-loader": "^3.1.0",
"html-webpack-plugin": "^5.5.0",
"jest": "^24.1.0",
"jest-serializer-vue": "^2.0.2",
"jest-transform-stub": "^2.0.0",
"mini-css-extract-plugin": "^2.4.3",
"mini-css-extract-plugin": "^2.5.3",
"postcss": "^8.3.11",
"postcss-import": "^14.0.2",
"postcss-loader": "^6.2.1",
"postcss-nested": "^5.0.6",
"postcss-loader": "^6.2.0",
"prettier": "2.2.1",
"semantic-release": "^17.0.4",
"terser-webpack-plugin": "^5.2.4",
"terser-webpack-plugin": "^5.3.1",
"url-loader": "^4.1.1",
"vue": "^2.6.10",
"vue-html-loader": "^1.2.4",
Expand All @@ -81,9 +77,9 @@
"vue-server-renderer": "^2.6.10",
"vue-style-loader": "^4.1.3",
"vue-template-compiler": "^2.6.10",
"webpack": "^5.59.1",
"webpack-cli": "^4.9.1",
"webpack-dev-server": "^4.3.1",
"webpack": "^5.69.1",
"webpack-cli": "^4.9.2",
"webpack-dev-server": "^4.7.4",
"webpack-merge": "^5.8.0"
},
"jest": {
Expand Down
Loading

0 comments on commit f8a41df

Please sign in to comment.