I'm new to this React and Webpack stuff, and I'm studying hard, but I came up with a problem that I'm not finding a way to solve.
const webpack = require('webpack')
module.exports = {
entry: './html/js/index.jsx',
output: {
path: __dirname + '/deploy/assets/',
publicPath: '/deploy/assets/',
filename: './js/bundle.js'
},
devServer: {
port: 8080,
contentBase: './deploy'
},
resolve: {
extensions: ['', '.js', '.jsx']
},
module: {
loaders: [{
test: /.jsx?$/,
loader: 'babel-loader',
exclude: /node_modules/,
query: {
presets: ['es2015', 'react'],
plugins: ['transform-object-rest-spread']
}
}]
}
}
This is my webpack.config.js.
The problem is that even though I save my files in the project and the webpack showing in the console that was compiled, the screen does not show my changes. I've even tried to go through the localhost path: 8080 / webpack-dev-server to see if my changes were there, and they were!
Even though they are there, my HTML does not update, forcing me to run ./node-modules/.bin/webpack again to work.
Does anyone have any ideas?