Skip to content

Commit

Permalink
fix: avoid html-webpack-plugin requiring incomaptible webpack internals
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Apr 16, 2018
1 parent 52e04c4 commit 4816bef
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 15 deletions.
5 changes: 3 additions & 2 deletions lib/dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ module.exports = async function dev (sourceDir, cliOptions = {}) {
const convert = require('koa-connect')
const mount = require('koa-mount')
const serveStatic = require('koa-static')
const HTMLPlugin = require('html-webpack-plugin')
const history = require('connect-history-api-fallback')
const portfinder = require('portfinder')

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

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

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
"file-loader": "^1.1.11",
"fs-extra": "^5.0.0",
"globby": "^8.0.1",
"html-webpack-plugin": "^3.2.0",
"vuepress-html-webpack-plugin": "^3.2.0",
"koa-connect": "^2.0.1",
"koa-mount": "^3.0.0",
"koa-static": "^4.0.2",
Expand Down
24 changes: 12 additions & 12 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2647,18 +2647,6 @@ html-minifier@^3.2.3:
relateurl "0.2.x"
uglify-js "3.3.x"

html-webpack-plugin@^3.2.0:
version "3.2.0"
resolved "https://registry.yarnpkg.com/html-webpack-plugin/-/html-webpack-plugin-3.2.0.tgz#b01abbd723acaaa7b37b6af4492ebda03d9dd37b"
dependencies:
html-minifier "^3.2.3"
loader-utils "^0.2.16"
lodash "^4.17.3"
pretty-error "^2.0.2"
tapable "^1.0.0"
toposort "^1.0.0"
util.promisify "1.0.0"

htmlparser2@^3.8.2:
version "3.9.2"
resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-3.9.2.tgz#1bdf87acca0f3f9e53fa4fcceb0f4b4cbb00b338"
Expand Down Expand Up @@ -6407,6 +6395,18 @@ vue@^2.5.16:
version "2.5.16"
resolved "https://registry.yarnpkg.com/vue/-/vue-2.5.16.tgz#07edb75e8412aaeed871ebafa99f4672584a0085"

vuepress-html-webpack-plugin@^3.2.0:
version "3.2.0"
resolved "https://registry.yarnpkg.com/vuepress-html-webpack-plugin/-/vuepress-html-webpack-plugin-3.2.0.tgz#219be272ad510faa8750d2d4e70fd028bfd1c16e"
dependencies:
html-minifier "^3.2.3"
loader-utils "^0.2.16"
lodash "^4.17.3"
pretty-error "^2.0.2"
tapable "^1.0.0"
toposort "^1.0.0"
util.promisify "1.0.0"

w3c-hr-time@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/w3c-hr-time/-/w3c-hr-time-1.0.1.tgz#82ac2bff63d950ea9e3189a58a65625fedf19045"
Expand Down

0 comments on commit 4816bef

Please sign in to comment.