Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
@skava/bs / src / scripts
  ..
  .plugins
  bundle
  development
  jest
  shell
  .plugins
  development
  shell
  README.md
  distPackageDeps.ts
  paths.ts
  utils.ts
Size: Mime:

bundling

  • explain steps of bundling
  • conceptually is ~== "packaging"
  • take all js files, in all structure that is used, dependencies are walked, unused code is shaked out, ecmascript8+ is transpiled
  • assets are optimized
  • assets are deployed to cdn
  • nodejs is run on the server
  • build that goes to release branch only - it's more mature pipeline and well tested
  • Makefile is used to run shell scripts

plugins/env

These are process.env flags that you can use in your code in order to have advanced control over what is included/excluded in your bundles. For example you may only want certain parts of your code to be included/ran under certain conditions.

Any process.env.X values that are matched will be code substituted for the associated values below.

For example you may have the following in your code: if (process.env.BUILD_FLAG_IS_CLIENT === 'true') { console.log('Foo'); }

If the BUILD_FLAG_IS_CLIENT was assigned a value of false the above code would be converted to the following by the webpack bundling process:

  if ('false' === 'true') {
    console.log('Foo');
  }

When your bundle is built using the UglifyJsPlugin unreachable code blocks like in the example above will be removed from the bundle final output. This is helpful for extreme cases where you want to ensure that code is only included/executed on specific targets, or for

NOTE

We are stringifying the values to keep them in line with the expected type of a typical process.env member (i.e. string). @see https://github.com/ctrlplusb/react-universally/issues/395