@@ -10,8 +10,6 @@ Transformations applied depend on file content:
10
10
- [ Class fold] ( #class-fold ) , [ Scrub file] ( #scrub-file ) and [ Prefix functions] ( #prefix-functions ) : applied to Angular apps and libraries.
11
11
- [ Import tslib] ( #import-tslib ) : applied when TypeScript helpers are found.
12
12
13
- Non-transform optimizations are applied via the [ Purify Plugin] ( #purify-plugin ) .
14
-
15
13
Some of these optimizations add ` /*@__PURE__*/ ` comments.
16
14
These are used by [ UglifyJS] ( https://github.com/mishoo/UglifyJS2 ) to identify pure functions that can potentially be dropped.
17
15
@@ -85,7 +83,6 @@ var ComponentClazz = (function () {
85
83
### Prefix functions
86
84
87
85
Adds ` /*@__PURE__*/ ` comments to top level downleveled class declarations and instantiation.
88
- Webpack library imports are also marked as ` /*@__PURE__*/ ` when used with [ Purify Plugin] ( #purify-plugin ) .
89
86
90
87
Warning: this transform assumes the file is a pure module. It should not be used with unpure modules.
91
88
@@ -165,12 +162,6 @@ var ChangeDetectionStrategy = /*@__PURE__*/ (function () {
165
162
```
166
163
167
164
168
- ### Purify Plugin
169
-
170
- Performs regex based replacements on all bundles that add ` /*@__PURE__*/ ` comments to
171
- known pure webpack imports (used with [ Prefix functions] ( #prefix-functions ) ).
172
-
173
-
174
165
## Library Usage
175
166
176
167
``` typescript
@@ -192,11 +183,9 @@ export interface BuildOptimizerOptions {
192
183
```
193
184
194
185
195
- ## Webpack loader and plugin usage:
186
+ ## Webpack loader usage:
196
187
197
188
``` typescript
198
- const PurifyPlugin = require (' @angular-devkit/build-optimizer' ).PurifyPlugin ;
199
-
200
189
module .exports = {
201
190
module: {
202
191
rules: [
@@ -208,10 +197,7 @@ module.exports = {
208
197
}
209
198
}
210
199
]
211
- },
212
- plugins: [
213
- new PurifyPlugin ()
214
- ]
200
+ }
215
201
}
216
202
```
217
203
@@ -221,6 +207,4 @@ module.exports = {
221
207
``` bash
222
208
build-optimizer input.js
223
209
build-optimizer input.js output.js
224
- purify input.js
225
- purify input.js output.js
226
210
```
0 commit comments