1 | # easywebpack
|
2 |
|
3 | [![NPM version][npm-image]][npm-url]
|
4 | [![build status][travis-image]][travis-url]
|
5 | [![Test coverage][codecov-image]][codecov-url]
|
6 | [![David deps][david-image]][david-url]
|
7 | [![npm download][download-image]][download-url]
|
8 |
|
9 | [npm-image]: https://img.shields.io/npm/v/easywebpack.svg?style=flat-square
|
10 | [npm-url]: https://npmjs.org/package/easywebpack
|
11 | [travis-image]: https://travis-ci.org/easy-team/easywebpack.svg?branch=master
|
12 | [travis-url]: https://travis-ci.org/easy-team/easywebpack
|
13 | [codecov-image]: https://codecov.io/gh/easy-team/easywebpack/branch/master/graph/badge.svg
|
14 | [codecov-url]: https://codecov.io/gh/easy-team/easywebpack
|
15 | [david-image]: https://img.shields.io/david/easy-team/easywebpack.svg?style=flat-square
|
16 | [david-url]: https://david-dm.org/easy-team/easywebpack
|
17 | [snyk-image]: https://snyk.io/test/npm/easywebpack/badge.svg?style=flat-square
|
18 | [snyk-url]: https://snyk.io/test/npm/easywebpack
|
19 | [download-image]: https://img.shields.io/npm/dm/easywebpack.svg?style=flat-square
|
20 | [download-url]: https://npmjs.org/package/easywebpack
|
21 |
|
22 |
|
23 | A Simple, Powerful Wepback Front-End Development Solution
|
24 |
|
25 | ## Feature
|
26 |
|
27 | - ✔︎ Provide Webapck Development and Build Capabilities, Such As Normal Webpack Plugin And Loaders
|
28 | - ✔︎ Provide Base Capabilities Support, Such As PostCss, Sass, Less, Stylus, Css Module, Service Worker
|
29 | - ✔︎ Provide Webpack Basic Development And Build Capabilities, Such As Dev server, Hot-Reload, TypeScript, Dll
|
30 | - ✔︎ Provide Webpack Efficient Development Tool, Such As Bundle Size Analysis, Bundle Build Cost Analysis, Mock Server, HTTP Web Server And So On.
|
31 | - ✔︎ Provide Multiple Types Of Project Building, Such As React, Vue, Weex, HTML, Weex Application
|
32 | - ✔︎ Provide Webpack Web (Browser Client Side Render) And Node (Node Server Side Render) Buiding Mode
|
33 | - ✔︎ Provide Strong Extend Capabilities For More Front-End Framework
|
34 |
|
35 |
|
36 | ![easywebpack](/docs/images/easywebpack.png)
|
37 |
|
38 |
|
39 | ## Document
|
40 |
|
41 | - https://www.yuque.com/easy-team/easywebpack
|
42 | - https://easy-team.github.io/
|
43 | - https://zhuanlan.zhihu.com/easywebpack
|
44 |
|
45 |
|
46 | ## Install
|
47 |
|
48 | ```bash
|
49 | $ npm i @easy-team/easywebpack --save-dev
|
50 | ```
|
51 |
|
52 | ## Usage
|
53 |
|
54 | - Webpack Config
|
55 |
|
56 | ```js
|
57 | // ${root}/webpack.config.js
|
58 | const easywebpack = requier('@easy-team/easywebpack');
|
59 | const env = process.env.BUILD_ENV; // support dev/test/prod
|
60 | const webpackConfig = easywebpack.getWebpackConfig({
|
61 | env,
|
62 | target: 'web',
|
63 | entry: {
|
64 | index: 'src/app.js'
|
65 | }
|
66 | });
|
67 | module.exports = webpackConfig;
|
68 | ```
|
69 |
|
70 |
|
71 | ## Front-End Framework
|
72 |
|
73 | - [easywebpack-vue](https://github.com/easy-team/easywebpack-vue.git)
|
74 | - [easywebpack-react](https://github.com/easy-team/easywebpack-react.git)
|
75 | - [easywebpack-weex](https://github.com/easy-team/easywebpack-weex.git)
|
76 | - [easywebpack-html](https://github.com/easy-team/easywebpack-html.git)
|
77 | - [easywebpack-js](https://github.com/easy-team/easywebpack-js.git)
|
78 |
|
79 | ## Webpack Command Tool
|
80 |
|
81 | ```bash
|
82 | npm install easy-team/easywebpack-cli -g
|
83 | ```
|
84 |
|
85 | #### QuickStart Programming
|
86 |
|
87 | [easywebpack-cli](https://github.com/easy-team/easywebpack-cli) Webpack Building Command Line And Boilerplate Init Tool for easywebpack
|
88 |
|
89 | ![easy-init](/docs/images/easy-init.png)
|
90 |
|
91 | ![easy-egg-vue](/docs/images/easy-egg-vue.png)
|
92 |
|
93 | ![easy-egg-react](/docs/images/easy-egg-react.png)
|
94 |
|
95 | #### Efficient Development
|
96 |
|
97 | - Use the plugin `webpack-bundle-analyzer` or `stats-webpack-plugin` for webpack build size analysis
|
98 |
|
99 | ```
|
100 | easy build --size
|
101 | ```
|
102 |
|
103 | ![easy-build-size](/docs/images/easy-build-size.png)
|
104 |
|
105 |
|
106 | - Use the plugin `speed-measure-webpack-plugin` for webpack build speed analysis and count the time spent on each loader and plugin
|
107 |
|
108 | ```
|
109 | easy build --speed
|
110 | ```
|
111 |
|
112 | - support start local file web http server and [data mock service](https://www.yuque.com/easy-team/easywebpack/mock) by node-http-server
|
113 |
|
114 | ```
|
115 | easy server -d mock
|
116 | ```
|
117 |
|
118 |
|
119 |
|
120 | ## Application Boilerplate
|
121 |
|
122 | ### Vue/React Client Side Render Application
|
123 |
|
124 | - [Vue-Webpack-Boilerplate](https://github.com/easy-team/easywebpack-awesome/tree/master/boilerplate/vue) Vue Front-End Application
|
125 |
|
126 | - [React-Wbpack-Boilerplate](https://github.com/easy-team/easywebpack-awesome/tree/master/boilerplate/react) React Front-End Application
|
127 |
|
128 | ### Egg + Vue Server/Client Side Render Webpack Building Application
|
129 |
|
130 | - [Egg + Vue Server Side Render Application](https://github.com/easy-team/egg-vue-webpack-boilerplate/tree/feature/green/multi)
|
131 |
|
132 | - [Egg + Vue + Vuex + Vue-Router Server Side Render Application](https://github.com/easy-team/egg-vue-webpack-boilerplate/tree/feature/green/spa)
|
133 |
|
134 | - [Egg + Vue + Vuex + Vue-Router Client Side Render Application](https://github.com/easy-team/egg-vue-webpack-boilerplate/tree/feature/green/asset)
|
135 |
|
136 | - [Egg + Vue + Nunjucks HTML Static Render Application](https://github.com/easy-team/egg-vue-webpack-boilerplate/tree/feature/green/html)
|
137 |
|
138 | - [Egg + Element Admin Application](https://github.com/easy-team/egg-vue-webpack-boilerplate/tree/element-admin)
|
139 |
|
140 | - [Egg + Vue + Typescript Web Application](https://github.com/easy-team/egg-vue-typescript-boilerplate) 和 [ves-admin](https://github.com/easy-team/ves-admin)
|
141 |
|
142 |
|
143 | ### Egg + React Server/Client Side Render Webpack Building Application
|
144 |
|
145 |
|
146 | - [Egg + React Server Side Render Application](https://github.com/easy-team/egg-react-webpack-boilerplate/tree/feature/green/multi)
|
147 | - [Egg + React + Nunjucks HTML Static Render Application](https://github.com/easy-team/egg-react-webpack-boilerplate/tree/feature/green/html)
|
148 | - [Egg + React + Nunjucks HTML Dynamic Render Application](https://github.com/easy-team/egg-react-webpack-boilerplate/tree/feature/green/asset)
|
149 | - [Egg + React + React Router + Redux Single Page Application](https://github.com/easy-team/egg-react-webpack-boilerplate/tree/feature/green/spa)
|
150 |
|
151 | - [Egg + AntD + React Router + Redux + React-Redux](https://github.com/easy-team/egg-react-webpack-boilerplate/tree/easy-admin)
|
152 |
|
153 | - [Egg + React + Typescript Web Application](https://github.com/easy-team/egg-react-typescript-boilerplate)
|
154 |
|
155 |
|
156 | ### Weex/HTML Webpack Building Application
|
157 |
|
158 | - [Weex-Webpack-Example](https://github.com/easy-team/easywebpack-weex-boilerplate) Weex Front-End Application
|
159 | - [Html-Webpack-Example](https://github.com/easy-team/easywebpack-multiple-html-boilerplate) HTML Front-End Application
|
160 |
|
161 |
|
162 | ## Questions & Suggestions
|
163 |
|
164 | Please open an issue [here](https://github.com/easy-team/easywebpack/issues).
|
165 |
|
166 | ## License
|
167 |
|
168 | [MIT](LICENSE)
|
169 |
|
\ | No newline at end of file |