Skip to content

fix bug: Compatible with the condition that the html-webpack-plugin inject option value is false #45

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
wants to merge 1 commit into from

Conversation

imcamo
Copy link

@imcamo imcamo commented Jul 10, 2021

example:

plugins: [
     new HtmlWebpackPlugin({
            template: path.resolve(__dirname, '../../assets/pages/user/index.html'),
            inject: false,
        }),
        new HTMLInlineCSSWebpackPlugin()
]

before:

ERROR in   Error: Can not inject css style into "index.html", as there is not replace target "</head>"
  
  - base-plugin.js:86 PluginForHtmlWebpackPluginV4.BasePlugin.addStyle
    [www-soa]/[html-inline-css-webpack-plugin]/build/core/base-plugin.js:86:23
  
  - v4.js:60 
    [www-soa]/[html-inline-css-webpack-plugin]/build/core/v4.js:60:39
  
  - Array.forEach
  
  - v4.js:59 PluginForHtmlWebpackPluginV4.process
    [www-soa]/[html-inline-css-webpack-plugin]/build/core/v4.js:59:27
  
  - v4.js:78 
    [www-soa]/[html-inline-css-webpack-plugin]/build/core/v4.js:78:27
  
  
  - new Promise
  
  
  - Hook.js:22 Hook.PROMISE_DELEGATE [as _promise]
    [www-soa]/[tapable]/lib/Hook.js:22:14
  
  - index.js:347 injectedHtmlPromise.then
    [www-soa]/[html-webpack-plugin]/index.js:347:72
  
  - next_tick.js:68 process._tickCallback
    internal/process/next_tick.js:68:7

after:

<style>something...</style>

@imcamo imcamo changed the title fix bug: Compatible with the condition that the HTML webpack plugin i… fix bug: Compatible with the condition that the HTML webpack plugin inject option value is false Jul 10, 2021
@imcamo imcamo changed the title fix bug: Compatible with the condition that the HTML webpack plugin inject option value is false fix bug: Compatible with the condition that the html-webpack-plugin inject option value is false Jul 10, 2021
@github-actions
Copy link

github-actions bot commented Sep 9, 2021

Hello 👋, this PR has been opened for more than 2 months with no activity on it. If you think this is a mistake please comment and ping a maintainer to get this merged ASAP! Thanks for contributing! You have 7 days until this gets closed automatically

@github-actions github-actions bot added the Stale label Sep 9, 2021
@github-actions github-actions bot closed this Sep 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant