Skip to content

Commit ca71d71

Browse files
committed
Handle older node versions
1 parent a2605d5 commit ca71d71

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

index.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
'use strict';
22

3-
module.exports = class CreateFilePlugin {
4-
write = require('write');
5-
path = require('path');
3+
const write = require('write');
4+
const path = require('path');
65

6+
module.exports = class CreateFilePlugin {
77
constructor(options) {
88
if (!options) {
99
throw new Error(`Please provide 'options' for the CreateFilePlugin config`);
@@ -26,9 +26,9 @@ module.exports = class CreateFilePlugin {
2626
}
2727

2828
_createFile({ filePath, fileName, content }, compilation) {
29-
const fullPath = this.path.join(filePath, fileName);
29+
const fullPath = path.join(filePath, fileName);
3030
const contentData = typeof content === 'function' ? content({ filePath, fileName, compilation }) : content;
31-
this.write.sync(fullPath, contentData);
31+
write.sync(fullPath, contentData);
3232
}
3333

3434
apply(compiler) {

0 commit comments

Comments
 (0)