Reputation: 635
I'm doing the React tutorial (http://www.tutorialspoint.com/reactjs/reactjs_components.htm) and I'm confused as to what webpack entry and output filename do exactly?
In the example they have created a file index.html and App.jsx. However, in the HTML they have "". But no index.js file has been created. Although, the output filename in the webpack.config file is index.js
What I believe is happening, is the entry point is where the server tells client to start out at and the output filename (index.js) is where the server is writing out all of the necessary data that will be sent to the the client... is this right?
Upvotes: 0
Views: 79
Reputation: 1074
Yes that is basically correct you have an entry file where webpack starts to require and compile all other files from and it will export the output/ bundled file to where every you want it to go. Most of the time this compiled and minified depending on which loaders you are using.
entry: 'index.js',
output: {
filename: 'bundle.js',
path: './app/assets'
},
Upvotes: 1