Getting ready

WebPack as a build system provides a robust configuration tool for bundling files together for web applications. It's most commonly used for front-end applications, such as Angular, but it can also be used for back-end applications, such as Express.

To configure WebPack for our Express application, we will need to install it and some other dependencies in our application. It is recommended that you save these as dev-dependencies since they are only relevant to the building of our application, and not the underlying business logic of our application itself:

npm install --save-dev webpack ts-loader copy-webpack-plugin webpack-node-externals

These modules provide tools that will make working with WebPack in Node.js much easier:

  • webpack: The WebPack build system core library and CLI
  • ts-loader: A WebPack TypeScript loader to work with TypeScript files
  • copy-webpack-plugin: A Webpack plugin to copy a directory of files into WebPack build
  • webpack-node-externals: A Webpack utility to work with node_modules dependencies
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.216.159.19