Skip to content

Guard against order with html-webpack-plugin always triggers #15

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
posva opened this issue Aug 26, 2019 · 6 comments
Closed

Guard against order with html-webpack-plugin always triggers #15

posva opened this issue Aug 26, 2019 · 6 comments
Assignees

Comments

@posva
Copy link

posva commented Aug 26, 2019

Hi,

It seems that the error about ordering this plugin after HTMLWebpackPlugin always triggers no matter the order:

const HtmlWebpackPlugin = require('html-webpack-plugin')
const HTMLInlineCSSWebpackPlugin = require('html-inline-css-webpack-plugin')
  .default
const path = require('path')

module.exports = () => {
  /** @type {import('webpack').Configuration} */
  const config = {
    entry: path.resolve(__dirname, './index.js'),
    mode: 'production',

    plugins: [
      new HtmlWebpackPlugin(),
      new HTMLInlineCSSWebpackPlugin(),
    ],
  }

  return config
}
@runjuu
Copy link
Owner

runjuu commented Aug 26, 2019

Hi @posva , can you provide a minimal demo that can produce the issue?

@runjuu runjuu self-assigned this Aug 26, 2019
@posva
Copy link
Author

posva commented Aug 26, 2019

Sure, I realized it happens with the beta version of html webpack plugin: https://github.com/posva/webpack-css-inline-report

@runjuu
Copy link
Owner

runjuu commented Aug 26, 2019

Seems the beta version of html-webpack-plugin are using a new way to executes tapable hooks. I will fix the issue ASAP.

@posva
Copy link
Author

posva commented Aug 26, 2019

I'm glad you find the culprit!
No rushes, whenever you find the time :)

@runjuu
Copy link
Owner

runjuu commented Aug 26, 2019

Hi @posva , I fixed the issue at 1.8.0. Let me know if there is any problem

@posva
Copy link
Author

posva commented Aug 26, 2019

Seems to be working perfectly

@posva posva closed this as completed Aug 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants