UNPKG

2.68 kBMarkdownView Raw
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[![chat][chat]][chat-url]
12
13# ${package}
14
15${description}
16
17## Requirements
18
19This module requires a minimum of Node v6.9.0 and Webpack v4.0.0.
20
21## Getting Started
22
23To begin, you'll need to install `${package}`:
24
25```console
26$ npm install ${package} --save-dev
27```
28
29<!-- isLoader ? use(this) : delete(isPlugin) -->
30Then add the loader to your `webpack` config. For example:
31
32<!-- isPlugin ? use(this) : delete(isLoader) -->
33Then add the plugin to your `webpack` config. For example:
34
35**file.ext**
36```js
37import file from 'file.ext';
38```
39
40<!-- isLoader ? use(this) : delete(isPlugin) -->
41**webpack.config.js**
42```js
43module.exports = {
44 module: {
45 rules: [
46 {
47 test: /\.ext$/,
48 use: [
49 {
50 loader: `${name.toLowerCase()}-loader`,
51 options: {...options}
52 }
53 ]
54 }
55 ]
56 }
57}
58```
59
60<!-- isPlugin ? use(this) : delete(isLoader) -->
61**webpack.config.js**
62```js
63module.exports = {
64 plugins: [
65 new `${name}`Plugin(options)
66 ]
67}
68```
69
70And run `webpack` via your preferred method.
71
72## Options
73
74### `[option]`
75
76Type: `[type|other-type]`
77Default: `[type|null]`
78
79[ option description ]
80
81<!-- isLoader ? use(this) : delete(isPlugin) -->
82```js
83// in your webpack.config.js
84{
85 loader: `${name.toLowerCase()}-loader`,
86 options: {
87 [option]: ''
88 }
89}
90```
91
92<!-- isPlugin ? use(this) : delete(isLoader) -->
93```js
94// in your webpack.config.js
95new `${name}`Plugin({
96 [option]: ''
97})
98```
99
100## Examples
101
102[ example outline text ]
103
104**webpack.config.js**
105```js
106// Example setup here..
107```
108
109**file.ext**
110```js
111// Source code here...
112```
113
114**bundle.js**
115```js
116// Bundle code here...
117```
118
119## License
120
121#### [MIT](./LICENSE)
122
123[npm]: https://img.shields.io/npm/v/${package}.svg
124[npm-url]: https://npmjs.com/package/${package}
125
126[node]: https://img.shields.io/node/v/${package}.svg
127[node-url]: https://nodejs.org
128
129[deps]: https://david-dm.org/webpack-contrib/${package}.svg
130[deps-url]: https://david-dm.org/webpack-contrib/${package}
131
132[tests]: https://img.shields.io/circleci/project/github/webpack-contrib/${package}.svg
133[tests-url]: https://circleci.com/gh/webpack-contrib/${package}
134
135[cover]: https://codecov.io/gh/webpack-contrib/${package}/branch/master/graph/badge.svg
136[cover-url]: https://codecov.io/gh/webpack-contrib/${package}
137
138[chat]: https://img.shields.io/badge/gitter-webpack%2Fwebpack-brightgreen.svg
139[chat-url]: https://gitter.im/webpack/webpack
\No newline at end of file