Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • J js-stack-from-scratch
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 39
    • Issues 39
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 9
    • Merge requests 9
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Verekia
  • js-stack-from-scratch
  • Merge requests
  • !9

Added exclude node_modules to webpack.config's babel-loader.

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Administrator requested to merge github/fork/rouzazari/master into master Oct 14, 2016
  • Overview 2
  • Commits 1
  • Pipelines 0
  • Changes 6

Created by: rouzazari

The webpack update is great. Thank you for it. I want to make one recommendation, but please let me know if I'm misunderstanding, as I'm still learning:

Starting from commit https://github.com/verekia/js-stack-from-scratch/commit/300317b4f821ec9455e4ceebd26b23458b89d817 you introduced webpack.config.babel.js to manage the bundling and babel-loader. I believe it's common practice to either exclude: /node_modules/ or include specific files or folders to avoid having babel-loader go through the whole node_modules folder. I believe this affects chapters 7-12.

I made the change below and noticed that it decreased the run time of gulp task main from 15 seconds to 2.5 seconds when excluding /node_modules/ in chapter 11. The resulting client-bundle.js is slightly different but seems to work just the same.

The bolded line below shows the change to 6 files (webpack.config.babel.js in chapter 7-12):

loaders: [
{
  test: /\.jsx?$/,
  loader: "babel-loader",
  exclude: [/node_modules/],
}
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/rouzazari/master