jantimon/html-webpack-plugin

Error while upgrading from 4.5.2 to 5.5.0

Distance71 opened this issue · 1 comments

Current behaviour 💣

Error: module is not defined
  - index.html:20 Object.601
    webapp/public/inde    x.html:20:1
  
  - index.html:44 __webpack_require__
    webapp/public/inde    x.html:44:41
  
  - index.html:60 
    webapp/public/inde    x.html:60:11
  
  - index.html:65 
    webapp/public/inde    x.html:65:12
  
  - node:vm:139 Script.runInContext
    node:vm:139:12
  
  - index.js:142 HtmlWebpackPlugin.evaluateCompilationResult
    [webapp]/[html-webpack-plugin]/index.js:142:28
  
  - index.js:324 
    [webapp]/[html-webpack-plugin]/index.js:324:26
  
  - task_queues:96 processTicksAndRejections
    node:internal/process/task_queues:96:5
  
  - async Promise.all
  
  - async Promise.all

Expected behaviour ☀️

The build actually works

Reproduction Example 👾

Create a project with a webpack file
Update HtmlWebpackPlugin from 4.5.2 to 5.5.0
Generate build

Environment 🖥

Node.js v16.13.0
darwin 20.6.0
npm v8.1.0

can you please provide a codesandbox?