vue-skeleton-webpack-plugin icon indicating copy to clipboard operation
vue-skeleton-webpack-plugin copied to clipboard

webpack4 使用 chainwebpack 报错 VueSkeletonWebpackPlugin must be placed after HtmlWebpackPlugin in `plugins`

Open negativeentropy9 opened this issue 6 years ago • 3 comments

webpack 版本: 4.26.0 webpack-chain 版本: 5.0.1

报错日志如下: VueSkeletonWebpackPlugin must be placed after HtmlWebpackPlugin inplugins

通过 webpack-chaintoString 打印出的 解析 VueSkeletonWebpackPlugin 的确在 HtmlWebpackPlugin后面(在webpack 配置中通过chainwebpack 的 after 指定顺序),解析结构片段如下:

/* config.plugin('html-webpack') */
    new HtmlWebpackPlugin(
      {
        filename: <output path>,
        template: <input path>,
        chunks: [
          <chunk-name>
        ],
        inject: true,
        minify: undefined
      }
    ),
    /* config.plugin('vue-skeleton-webpack') */
    new SkeletonPlugin(
      {
        webpackConfig: {
          entry: {
            <chunk-name>: <entry skeleton absolute path>
        }
      }
    )

negativeentropy9 avatar Dec 19 '18 17:12 negativeentropy9

这个如何解决的?

lucaslz2020 avatar May 08 '19 03:05 lucaslz2020

这个如何解决的?

不支持 html-webpack-plugin 4.x导致的,之前改了一版,没有时间提 code,短时间的解决方案看能不能先把 html-webpack-plugin 先降到 3.x 来使用

negativeentropy9 avatar Jun 10 '19 07:06 negativeentropy9

这个如何解决的?

不支持 html-webpack-plugin 4.x导致的,之前改了一版,没有时间提 code,短时间的解决方案看能不能先把 html-webpack-plugin 先降到 3.x 来使用

现在这个还没修复好吗

heyushuo avatar Sep 04 '20 11:09 heyushuo