Skip to content

Conversation

@icelam
Copy link
Owner

@icelam icelam commented Jan 22, 2021

Description

Related to issue #1, where it demonstrate the use of multiple html-webpack-plugin instances in a single webpack compiler.

In that scenario, the script assets was deleted early in the first beforeEmit hook, causing the build to throw:

ERROR in   TypeError: Cannot read property 'source' of undefined
  
  - HtmlInlineScriptPlugin.js:52 HtmlInlineScriptPlugin.processScriptTag
    [project-name]/[html-inline-script-webpack-plugin]/dist/HtmlInlineScriptPlugin.js:52:34
  
  - HtmlInlineScriptPlugin.js:67 
    [project-name]/[html-inline-script-webpack-plugin]/dist/HtmlInlineScriptPlugin.js:67:103
  
  - Array.map
  
  - HtmlInlineScriptPlugin.js:67 
    [project-name]/[html-inline-script-webpack-plugin]/dist/HtmlInlineScriptPlugin.js:67:69
  
  
  - new Promise
  
  
  - index.js:190 
    [project-name]/[html-webpack-plugin]/index.js:190:87

How has this been tested?

Have setup a minimal webpack which uses html-webpack-plugin instances in a single webpack compiler. Test the build is successful.

Types of changes

  • New feature - feat
  • Bug fix - fix
  • Refactor - refactor
  • Test cases - test
  • Other(s):

Remarks

N/A

Related to issue #1, where multiple instances of html-webpack-plugin is used
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

Successfully merging this pull request may close these issues.

2 participants