Skip to content

Commit

Permalink
readme update
Browse files Browse the repository at this point in the history
  • Loading branch information
crsandeep committed Nov 11, 2018
1 parent 66cdd37 commit ea81117
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ const CleanWebpackPlugin = require("clean-webpack-plugin");
const outputDirectory = "dist";

module.exports = {
entry: "./src/client/index.js",
entry: ["babel-polyfill", "./src/client/index.js"],
output: {
path: path.join(__dirname, outputDirectory),
filename: "bundle.js"
Expand Down Expand Up @@ -156,7 +156,8 @@ module.exports = {
};
```

1. **entry:** Here the application starts executing and webpack starts bundling
1. **entry:** entry: ./src/client/index.js is where the application starts executing and webpack starts bundling.
Note: babel-polyfill is added to support async/await. Read more [here](https://babeljs.io/docs/en/babel-polyfill#usage-in-node-browserify-webpack).
2. **output path and filename:** the target directory and the filename for the bundled output
3. **module loaders:** Module loaders are transformations that are applied on the source code of a module. We pass all the js file through [babel-loader](https://github.com/babel/babel-loader) to transform JSX to Javascript. CSS files are passed through [css-loaders](https://github.com/webpack-contrib/css-loader) and [style-loaders](https://github.com/webpack-contrib/style-loader) to load and bundle CSS files. Fonts and images are loaded through url-loader.
4. **Dev Server:** Configurations for the webpack-dev-server which will be described in coming section.
Expand Down

0 comments on commit ea81117

Please sign in to comment.