![]() The -D command will install webpack-cli as a dev-dependency.Now that we have everything installed we need to modify the script section in our package.json file to this: ![]() Next up, we need to install webpack-cli as a dev dependency: npm i webpack-cli -D The ts-loader package is a typescript loader for Webpack. The webpack-dev-server will help us spin up a server running on port 8080 by default. Npm i webpack webpack-dev-server typescript ts-loader Next, we’ll use npm to install Webpack and TypeScript. Running this command will create a package.json file, this is where we will store all our project dependencies. The npm init -y will set up a node project for us. This will create a new folder on our desktop, after creating it we will use the cd command to move into the folder. Mkdir typescriptconfig & cd typescriptconfig I will use the terminal to do that: cd desktop We will start by creating a new folder on our desktop for this application. In this article, we will set up our typescript application using Webpack. TypeScript is a compiler (or transpiler if you prefer) which adds support for type checking to your project. Webpack is a fast, efficient, very powerful code bundler.
0 Comments
Leave a Reply. |