File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 1
1
'use strict' ;
2
2
3
- module . exports = class CreateFilePlugin {
4
- write = require ( 'write' ) ;
5
- path = require ( 'path' ) ;
3
+ const write = require ( 'write' ) ;
4
+ const path = require ( 'path' ) ;
6
5
6
+ module . exports = class CreateFilePlugin {
7
7
constructor ( options ) {
8
8
if ( ! options ) {
9
9
throw new Error ( `Please provide 'options' for the CreateFilePlugin config` ) ;
@@ -26,9 +26,9 @@ module.exports = class CreateFilePlugin {
26
26
}
27
27
28
28
_createFile ( { filePath, fileName, content } , compilation ) {
29
- const fullPath = this . path . join ( filePath , fileName ) ;
29
+ const fullPath = path . join ( filePath , fileName ) ;
30
30
const contentData = typeof content === 'function' ? content ( { filePath, fileName, compilation } ) : content ;
31
- this . write . sync ( fullPath , contentData ) ;
31
+ write . sync ( fullPath , contentData ) ;
32
32
}
33
33
34
34
apply ( compiler ) {
You can’t perform that action at this time.
0 commit comments