I am new in angular 2, I want to know how to build my angular 2 app without using CLI for production.
Thanks in Advance.
We will start by setting up the module loader, then use npm to install Angular and its dependencies, as well as some tools and polyfills we will need, such as the TypeScript compiler. Finally, we will create a minimal application skeleton, and write the code for bootstrapping it.
Installing Angular CLI on Windows First, you need to have Node and npm installed on your development machine. There are many ways to do that, such as: using NVM (Node Version Manager) for installing and working with multiple versions of node in your system. using the official package manager of your operating system.
If you have used CLI for your existing application You can migrate from Angular CLI to Webpack and tweak it accordingly for
(local, development, production).
Since Angular CLI v1.0 there’s the “eject” feature, that allows you to extract thewebpack
config file and manipulate it as you wish.
Run ng eject
so Angular CLI generates the webpack.config.js file.
Run npm install
so the new dependencies generated by CLI are satisfied
Refer this Angular CLI to webpack
if you don't want to use CLI at all Refer This An Angular 2 Webpack setup for development and production and Webpack: An Introduction
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With