I just set up the environment for a webapp using react.
setInitialStates = () => {
this.state = {showAuthorModal: false};
};
NOTE: This is the correct syntax!
This happens when I tried to run webpack --config webpack.config.js
This is my webpack.config.js.
const path = require('path');
module.exports = {
entry: {
component: [
'./public/javascripts/Rendering.jsx',
'./public/javascripts/CentreQuote.jsx',
'./public/javascripts/AuthorModal.jsx',
'./public/javascripts/LeftNav.jsx'
]
},
output: {
path: path.resolve('public/javascripts'),
filename: 'index_bundle.js'
},
module: {
loaders: [
{ test: /\.js$/, loader: 'babel-loader', exclude: /node_modules/ },
{ test: /\.jsx$/, loader: 'babel-loader', exclude: /node_modules/ }
]
}
}
.babelrc
,
{
"presets":[
"es2015", "react"
],
"plugins": ["transform-es2015-arrow-functions"]
}
I think I'm missing some wiring step that links babelrc to the loader config?