reactjs - Getting started with React -


i'm setting react first time following tutorial. created main.js , ran various commands. last command gives me error:

to install react dom , build bundle webpack:  $ npm install --save react react-dom babel-preset-react $ webpack 

when run webpack receive error:

output filename not configured

it points me usage docs. usage docs tells me command line interface expects input of form:

webpack <entry> <output> 

obviously command webpack shown in react tutorial not meet criteria. did wrong?

create webpack.config.js, eg.:

module.exports = {   context: __dirname + "/app",   entry: {     jsx: './main.js',     html: './index.html'   },   output: {     path: __dirname + '/dist',     filename: 'bundle.js'   } } 

Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -