官术网_书友最值得收藏!

Setting up PrimeNG project with Webpack

Webpack (https://webpack.js.org) is a de facto standard bundler for single-page applications. It analyzes dependencies between JavaScript modules, assets (styles, icons, and images) as well as other files in your application and bundles everything together. In Webpack, everything is a module . You can, for example, import a CSS file like a JavaScript file using require('./myfile.css') or import './myfile.css'.

Webpack can figure out the right processing strategy for imported files by means of the file extension and associated loader. It is not always reasonable to build one big bundle file. Webpack has various plugins to split your code and generate multiple bundle files. It can also load parts of your application asynchronously on demand (lazy loading). All these features make it a power tool. In this section, we will give a high-level overview of Webpack 2 core concepts and show essential steps for creating a Webpack-based Angular, PrimeNG application.

The complete seed project with PrimeNG and Webpack is available on GitHub at
https://github.com/ova2/angular-development-with-primeng/tree/master/chapter1/primeng-webpack-setup.
The project structure was kept the same as in the SystemJS-based setup.
主站蜘蛛池模板: 安岳县| 文登市| 饶平县| 仙游县| 华蓥市| 迁安市| 应用必备| 辽阳市| 辽源市| 灵山县| 昌图县| 佛教| 手机| 英德市| 灵璧县| 高安市| 镶黄旗| 剑川县| 昭平县| 怀安县| 象州县| 呼图壁县| 平湖市| 卫辉市| 辽阳县| 黄梅县| 青河县| 文成县| 永定县| 玛沁县| 仙居县| 德庆县| 平南县| 富宁县| 玉田县| 香港| 宁河县| 河南省| 金乡县| 新邵县| 龙门县|