I want to build multiple HTML files, each with a separate entry point. Seems like webpack-dev-server is only serving a single HTML file.
            Asked
            
        
        
            Active
            
        
            Viewed 1,656 times
        
    7
            
            
        - 
                    I think I'm having the same problem (http://stackoverflow.com/questions/39798095/multiple-html-files-using-webpack). Did you solve it? Thanks! – miguelitomp Oct 02 '16 at 10:41
1 Answers
-2
            
            
        You can take advantage of npm script and have to separate configs.
package.json:
"scripts": {
  "build-first-app": "webpack-dev-server --env=first",
  "build-second-app": "webpack-dev-server --env=second"
}
webback.config.js:
module.exports = function(env) {
  return require(`./webpack.config.${env}.js`)
};
Now you need to separate files(webpack.config.first.js and webpack.config.second.js) each with there own webpack configuration. Run the command npm run build-first-app to display the first app and npm run build-second-app for the second.
 
    
    
        Lazar Muresan
        
- 25
- 4
