Skip to content

Commit

Permalink
feat: import node fs library instead of relying on webpack passed one
Browse files Browse the repository at this point in the history
  • Loading branch information
NetCZ committed May 30, 2019
1 parent 12f8f21 commit 3475184
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
var loaderUtils = require('loader-utils'),
_ = require('lodash'),
path = require('path'),
fs = require('fs'),
helper = require('./src/helper');

var defaultOptions = {
Expand All @@ -19,7 +20,7 @@ module.exports = function (content, map) {
var inputFile = map.file || path.basename(this.resourcePath),
options = _.assign({}, _.cloneDeep(defaultOptions), loaderOptions),
dirPath = this.context,
fileNames = this.fs.readdirSync(dirPath).filter(function (file) {
fileNames = fs.readdirSync(dirPath).filter(function (file) {
return !file.match(/^\./);
});

Expand Down

0 comments on commit 3475184

Please sign in to comment.