1 | <div align="center">
|
2 | <a href="https://github.com/webpack/webpack">
|
3 | <img width="200" height="200" src="https://webpack.js.org/assets/icon-square-big.svg">
|
4 | </a>
|
5 | </div>
|
6 |
|
7 | [![npm][npm]][npm-url]
|
8 | [![node][node]][node-url]
|
9 | [![deps][deps]][deps-url]
|
10 | [![tests][tests]][tests-url]
|
11 | [![cover][cover]][cover-url]
|
12 | [![chat][chat]][chat-url]
|
13 | [![size][size]][size-url]
|
14 |
|
15 | # ${package}
|
16 |
|
17 | ${description}
|
18 |
|
19 | ## Getting Started
|
20 |
|
21 | To begin, you'll need to install `${package}`:
|
22 |
|
23 | ```console
|
24 | $ npm install ${package} --save-dev
|
25 | ```
|
26 |
|
27 |
|
28 |
|
29 | Then add the loader to your `webpack` config. For example:
|
30 |
|
31 |
|
32 |
|
33 | Then add the plugin to your `webpack` config. For example:
|
34 |
|
35 | **file.ext**
|
36 |
|
37 | ```js
|
38 | import file from 'file.ext';
|
39 | ```
|
40 |
|
41 |
|
42 |
|
43 | **webpack.config.js**
|
44 |
|
45 | ```js
|
46 | module.exports = {
|
47 | module: {
|
48 | rules: [
|
49 | {
|
50 | test: /\.ext$/,
|
51 | use: [
|
52 | {
|
53 | loader: `${name.toLowerCase()}-loader`,
|
54 | options: { ...options },
|
55 | },
|
56 | ],
|
57 | },
|
58 | ],
|
59 | },
|
60 | };
|
61 | ```
|
62 |
|
63 |
|
64 |
|
65 | **webpack.config.js**
|
66 |
|
67 | ```js
|
68 | module.exports = {
|
69 | plugins: [
|
70 | new `${name}`Plugin(options)
|
71 | ]
|
72 | }
|
73 | ```
|
74 |
|
75 | And run `webpack` via your preferred method.
|
76 |
|
77 | ## Options
|
78 |
|
79 | ### `[option]`
|
80 |
|
81 | Type: `[type|other-type]`
|
82 | Default: `[type|null]`
|
83 |
|
84 | [ option description ]
|
85 |
|
86 |
|
87 |
|
88 | **webpack.config.js**
|
89 |
|
90 | ```js
|
91 | module.exports = {
|
92 | module: {
|
93 | rules: [
|
94 | {
|
95 | loader: `${name.toLowerCase()}-loader`,
|
96 | options: {
|
97 | [option]: '',
|
98 | },
|
99 | },
|
100 | ],
|
101 | },
|
102 | };
|
103 | ```
|
104 |
|
105 |
|
106 |
|
107 | **webpack.config.js**
|
108 |
|
109 | ```js
|
110 | module.exports = {
|
111 | plugins: [
|
112 | new `${name}`Plugin({
|
113 | [option]: ''
|
114 | })
|
115 | ]
|
116 | };
|
117 | ```
|
118 |
|
119 | ## Examples
|
120 |
|
121 | [ example outline text ]
|
122 |
|
123 | **webpack.config.js**
|
124 |
|
125 | ```js
|
126 | // Example setup here..
|
127 | ```
|
128 |
|
129 | **file.ext**
|
130 |
|
131 | ```js
|
132 | // Source code here...
|
133 | ```
|
134 |
|
135 | **bundle.js**
|
136 |
|
137 | ```js
|
138 | // Bundle code here...
|
139 | ```
|
140 |
|
141 | ## Contributing
|
142 |
|
143 | Please take a moment to read our contributing guidelines if you haven't yet done so.
|
144 |
|
145 | [CONTRIBUTING](./.github/CONTRIBUTING.md)
|
146 |
|
147 | ## License
|
148 |
|
149 | [MIT](./LICENSE)
|
150 |
|
151 | [npm]: https://img.shields.io/npm/v/${package}.svg
|
152 | [npm-url]: https://npmjs.com/package/${package}
|
153 | [node]: https://img.shields.io/node/v/${package}.svg
|
154 | [node-url]: https://nodejs.org
|
155 | [deps]: https://david-dm.org/webpack-contrib/${package}.svg
|
156 | [deps-url]: https://david-dm.org/webpack-contrib/${package}
|
157 | [tests]: https://dev.azure.com/webpack-contrib/${package}/_apis/build/status/webpack-contrib.${package}?branchName=master
|
158 | [tests-url]: https://dev.azure.com/webpack-contrib/${package}/_build/latest?definitionId=2&branchName=master
|
159 | [cover]: https://codecov.io/gh/webpack-contrib/${package}/branch/master/graph/badge.svg
|
160 | [cover-url]: https://codecov.io/gh/webpack-contrib/${package}
|
161 | [chat]: https://img.shields.io/badge/gitter-webpack%2Fwebpack-brightgreen.svg
|
162 | [chat-url]: https://gitter.im/webpack/webpack
|
163 | [size]: https://packagephobia.now.sh/badge?p=${package}
|
164 | [size-url]: https://packagephobia.now.sh/result?p=${package}
|