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

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.
主站蜘蛛池模板: 崇左市| 北海市| 万源市| 郧西县| 石渠县| 泾阳县| 星子县| 长泰县| 南通市| 乌海市| 井陉县| 恭城| 高平市| 辽阳县| 乌兰浩特市| 濮阳县| 上虞市| 平顺县| 青海省| 启东市| 牡丹江市| 丰原市| 项城市| 清水河县| 洛川县| 绍兴市| 云安县| 怀化市| 凤山市| 林州市| 班玛县| 绍兴县| 板桥市| 荥经县| 齐齐哈尔市| 金平| 山东省| 高雄县| 湖口县| 定边县| 手游|