I tried using the spread operator in one of my js files but I got an error. This is what my webpack config file looks like i.e. only the module section.
module: {
loaders: [
{
test: /\.jsx?$/,
exclude: /(node_modules|bower_components)/,
loader: 'babel',
query: {
presets: ['react', 'es2015']
}
}
]
}
I assume, I had an issue because spread is still in proposal stage. What do I need to do so that I can use the spread operator in my project?
UPDATE: Here's how I was using it:
import * as actions1 from './someActions';
import * as actions2 from './moreActions';
export {
...actions1,
...actions2
};