AriaFallah / WebpackTutorial

A simple webpack tutorial

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How do you hotreload multiple entries of HTML files ?

pxwee5 opened this issue · comments

entry: { // 'webpack/hot/dev-server', added with --inline --hot
    index: ['webpack-dev-server/client?http://localhost:8080', './src/index/index.js'],
    biz: ['webpack-dev-server/client?http://localhost:8080', './src/biz/biz.js'],
    home: ['webpack-dev-server/client?http://localhost:8080', './src/home/home.js']
  },

This is what I tried and it didn't work as expected. What did I do wrong ?

Sorted it with

entry: { 
    index: ['webpack-dev-server/client?' + publicPath1, 'webpack/hot/only-dev-server', './src/index/index.js'],
    biz: ['webpack-dev-server/client?' + publicPath1, 'webpack/hot/only-dev-server', './src/biz/biz.js'],
    home: ['webpack-dev-server/client?' + publicPath1, 'webpack/hot/only-dev-server', './src/home/home.js']
  },