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
Post a Comment