title: Module build failed (from ./node_modules/html-loader/dist/cjs.js):
body: <p>I'm trying to make a quick-start for ava electron webpack and three but something went wrong in that process.</p>
  
  <p>here is the repository of the project :</p>
  
  <p><a href="https://github.com/etiennerin/ecsy-three-electron-ava-quick-start" rel="nofollow noreferrer">https://github.com/etiennerin/ecsy-three-electron-ava-quick-start</a></p>
  
  <p>By simply trying to use my project by typing <code>npm run dev</code> i get the following error message :</p>
  
  <p><a href="https://i.stack.imgur.com/IGqwY.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/IGqwY.png" alt="npm run dev output"></a></p>
  
  <p>I'm using windows.</p>
  
  <p>I think the mistake might be related with my webpack-configuration which strangely seemed to work befor i tried some npm-update :</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>'use strict'
  
  import { app, BrowserWindow } from 'electron'
  import * as path from 'path'
  import { format as formatUrl } from 'url'
  import * as THREE from '../../node_modules/three/build/three.module.js';
  //import {World} from '../../node_modules/ecsy/build/ecsy.module.js';
  
  const isDevelopment = process.env.NODE_ENV !== 'production'
  
  // global reference to mainWindow (necessary to prevent window from being garbage collected)
  let mainWindow
  
  function createMainWindow() {
    const window = new BrowserWindow({webPreferences: {nodeIntegration: true}})
  
    if (isDevelopment) {
      window.webContents.openDevTools()
    }
  
    if (isDevelopment) {
      window.loadURL(`http://localhost:${process.env.ELECTRON_WEBPACK_WDS_PORT}`)
    }
    else {
      window.loadURL(formatUrl({
        pathname: path.join(__dirname, 'index.html'),
        protocol: 'file',
        slashes: true
      }))
    }
  
    window.on('closed', () =&gt; {
      mainWindow = null
    })
  
    window.webContents.on('devtools-opened', () =&gt; {
      window.focus()
      setImmediate(() =&gt; {
        window.focus()
      })
    })
  
    return window
  }
  
  // quit application when all windows are closed
  app.on('window-all-closed', () =&gt; {
    // on macOS it is common for applications to stay open until the user explicitly quits
    if (process.platform !== 'darwin') {
      app.quit()
    }
  })
  
  app.on('activate', () =&gt; {
    // on macOS it is common to re-create a window even after all windows have been closed
    if (mainWindow === null) {
      mainWindow = createMainWindow()
    }
  })
  
  // create main BrowserWindow when electron is ready
  app.on('ready', () =&gt; {
    mainWindow = createMainWindow()
  })</code></pre>
  </div>
  </div>
  </p>
  
  <p>and my latest package.json :</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>{
    "name": "electron-webpack-quick-start",
    "version": "0.0.0",
    "license": "MIT",
    "scripts": {
      "start": "electron-webpack dev",
      "dev": "electron-webpack dev",
      "compile": "electron-webpack",
      "dist": "yarn compile &amp;&amp; electron-builder",
      "dist:dir": "yarn dist --dir -c.compression=store -c.mac.identity=null",
      "test": "ava"
    },
    "dependencies": {
      "source-map-support": "^0.5.16"
    },
    "ava": {
      "files": [
        "spec/**/*"
      ],
      "require": [
        "esm"
      ]
    },
    "devDependencies": {
      "ava": "^3.5.1",
      "ecsy": "^0.2.3",
      "electron": "8.1.1",
      "electron-builder": "^22.4.1",
      "electron-webpack": "^2.7.4",
      "esm": "^3.2.25",
      "html-loader": "^1.0.0",
      "three": "^0.112.1",
      "webpack": "^4.42.0"
    }
  }</code></pre>
  </div>
  </div>
  </p>
  
  <p>Thank you very much for every piece of advice !</p>