This repository was archived by the owner on Apr 4, 2025. It is now read-only.
File tree 2 files changed +7
-4
lines changed
packages/angular_devkit/build_optimizer/src/purify
2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import { readFileSync, writeFileSync } from 'fs';
10
10
import { join } from 'path' ;
11
11
import { purify } from './purify' ;
12
12
13
+ console . warn ( 'purify is deprecated and will be removed in 0.7.0.' ) ;
13
14
14
15
if ( process . argv . length < 3 || process . argv . length > 4 ) {
15
16
throw new Error ( `
Original file line number Diff line number Diff line change 6
6
* found in the LICENSE file at https://angular.io/license
7
7
*/
8
8
// tslint:disable-next-line:no-implicit-dependencies
9
- import * as webpack from 'webpack' ;
9
+ import { Compiler , compilation } from 'webpack' ;
10
10
import { ReplaceSource } from 'webpack-sources' ;
11
11
import { purifyReplacements } from './purify' ;
12
12
@@ -17,9 +17,11 @@ interface Chunk {
17
17
18
18
export class PurifyPlugin {
19
19
constructor ( ) { }
20
- public apply ( compiler : webpack . Compiler ) : void {
21
- // tslint:disable-next-line:no-any
22
- compiler . plugin ( 'compilation' , ( compilation : any ) => {
20
+ public apply ( compiler : Compiler ) : void {
21
+ compiler . plugin ( 'compilation' , ( compilation : compilation . Compilation ) => {
22
+ // Webpack 4 provides the same functionality as this plugin and TS transformer
23
+ compilation . warnings . push ( 'PurifyPlugin is deprecated and will be removed in 0.7.0.' ) ;
24
+
23
25
compilation . plugin ( 'optimize-chunk-assets' , ( chunks : Chunk [ ] , callback : ( ) => void ) => {
24
26
chunks . forEach ( ( chunk : Chunk ) => {
25
27
chunk . files
You can’t perform that action at this time.
0 commit comments