Over the past week, I've been attempting to get grunt, babel, and webpack to work together smoothly. Despite trying various solutions that I found during my research, nothing seems to be working as intended. Below is the relevant portion of my gruntfile.js:
webpack: {
options: {
entry: ['./js/main'],
output: {
filename: 'bundle.js'
},
module: {
loaders: [
{
test: /\.js$/,
loader: 'babel-loader',
query: {
presets: ['es2015', 'react']
}
}
]
},
},
}
It's worth noting that there is a main.js file in the "js" folder:
var React = require('react');
var ReactDOM = require('react-dom');
import Message from './Message' //Message.js also exists
ReactDOM.render(<Message/>, document.getElementById('react-container'));
I would expect grunt webpack to raise an issue if there were any problems with the requirements, but instead, the result is:
grunt webpack
Done, without errors.
This output suggests no bundle.js has been created. What could be causing this issue?