How to generate bundle.js with react and webpack?

时间:2016-07-11 22:59:03

标签: reactjs webpack

I have started to play with react and soemhow get stucked. I have following code: github.com/gandra/my-lara-react-app

When I runn following code on the command-line:

npm install
webpack --config webpack.config.js

I expect to find file ./dist/bundle.js but this not happens. Any idea why?

1 个答案:

答案 0 :(得分:2)

问题中提及的文件webpack.config.js包含一个拼写错误wntry,应该是entry,即

module.exports = {
    entry: ['./app/main.js'],
    ...
}