Skip to content

Commit 4816bef

Browse files
committed
fix: avoid html-webpack-plugin requiring incomaptible webpack internals
1 parent 52e04c4 commit 4816bef

File tree

3 files changed

+16
-15
lines changed

3 files changed

+16
-15
lines changed

lib/dev.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ module.exports = async function dev (sourceDir, cliOptions = {}) {
88
const convert = require('koa-connect')
99
const mount = require('koa-mount')
1010
const serveStatic = require('koa-static')
11-
const HTMLPlugin = require('html-webpack-plugin')
1211
const history = require('connect-history-api-fallback')
1312
const portfinder = require('portfinder')
1413

@@ -55,7 +54,9 @@ module.exports = async function dev (sourceDir, cliOptions = {}) {
5554

5655
config
5756
.plugin('html')
58-
.use(HTMLPlugin, [{
57+
// using a fork of html-webpack-plugin to avoid it requiring webpack
58+
// internals from an incompatible version.
59+
.use(require('vuepress-html-webpack-plugin'), [{
5960
template: path.resolve(__dirname, 'app/index.dev.html')
6061
}])
6162

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
"file-loader": "^1.1.11",
5757
"fs-extra": "^5.0.0",
5858
"globby": "^8.0.1",
59-
"html-webpack-plugin": "^3.2.0",
59+
"vuepress-html-webpack-plugin": "^3.2.0",
6060
"koa-connect": "^2.0.1",
6161
"koa-mount": "^3.0.0",
6262
"koa-static": "^4.0.2",

yarn.lock

+12-12
Original file line numberDiff line numberDiff line change
@@ -2647,18 +2647,6 @@ html-minifier@^3.2.3:
26472647
relateurl "0.2.x"
26482648
uglify-js "3.3.x"
26492649

2650-
html-webpack-plugin@^3.2.0:
2651-
version "3.2.0"
2652-
resolved "https://registry.yarnpkg.com/html-webpack-plugin/-/html-webpack-plugin-3.2.0.tgz#b01abbd723acaaa7b37b6af4492ebda03d9dd37b"
2653-
dependencies:
2654-
html-minifier "^3.2.3"
2655-
loader-utils "^0.2.16"
2656-
lodash "^4.17.3"
2657-
pretty-error "^2.0.2"
2658-
tapable "^1.0.0"
2659-
toposort "^1.0.0"
2660-
util.promisify "1.0.0"
2661-
26622650
htmlparser2@^3.8.2:
26632651
version "3.9.2"
26642652
resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-3.9.2.tgz#1bdf87acca0f3f9e53fa4fcceb0f4b4cbb00b338"
@@ -6407,6 +6395,18 @@ vue@^2.5.16:
64076395
version "2.5.16"
64086396
resolved "https://registry.yarnpkg.com/vue/-/vue-2.5.16.tgz#07edb75e8412aaeed871ebafa99f4672584a0085"
64096397

6398+
vuepress-html-webpack-plugin@^3.2.0:
6399+
version "3.2.0"
6400+
resolved "https://registry.yarnpkg.com/vuepress-html-webpack-plugin/-/vuepress-html-webpack-plugin-3.2.0.tgz#219be272ad510faa8750d2d4e70fd028bfd1c16e"
6401+
dependencies:
6402+
html-minifier "^3.2.3"
6403+
loader-utils "^0.2.16"
6404+
lodash "^4.17.3"
6405+
pretty-error "^2.0.2"
6406+
tapable "^1.0.0"
6407+
toposort "^1.0.0"
6408+
util.promisify "1.0.0"
6409+
64106410
w3c-hr-time@^1.0.1:
64116411
version "1.0.1"
64126412
resolved "https://registry.yarnpkg.com/w3c-hr-time/-/w3c-hr-time-1.0.1.tgz#82ac2bff63d950ea9e3189a58a65625fedf19045"

0 commit comments

Comments
 (0)