Hello, I'm literally 2 hours into learning how to use Webpack. I'm trying to move away from using Gulp. I found your plugin and all is good. My one thing is trying to get my html file to reload the page when I edit and save them. I tried adding the index.html file name to the entry property in the array but that only seems to work when I save the main.js file. Only then will my index.html file show its new edits.
Do you have any advice on what I should do?
My webpack.config.js file:
var BrowserSyncPlugin = require('browser-sync-webpack-plugin');
plugins: [
new BrowserSyncPlugin({
// browse to http://localhost:3000/ during development,
// ./public directory is being served
host: 'localhost',
port: 3000,
server: { baseDir: ['./'] }
})
]
}
Hello, I'm literally 2 hours into learning how to use Webpack. I'm trying to move away from using Gulp. I found your plugin and all is good. My one thing is trying to get my html file to reload the page when I edit and save them. I tried adding the index.html file name to the entry property in the array but that only seems to work when I save the main.js file. Only then will my index.html file show its new edits.
Do you have any advice on what I should do?
My webpack.config.js file: var BrowserSyncPlugin = require('browser-sync-webpack-plugin');
module.exports = { entry: ['index.html', './main.js'], output: { path: __dirname, filename: 'bundle.js' },
plugins: [ new BrowserSyncPlugin({ // browse to http://localhost:3000/ during development, // ./public directory is being served host: 'localhost', port: 3000, server: { baseDir: ['./'] } }) ] }