Skip to content

Commit

Permalink
Fix module loading for webpack v4 (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
yuriymanakov authored and leoasis committed Sep 10, 2019
1 parent 524abe5 commit 35504ca
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 55 deletions.
3 changes: 1 addition & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ const os = require('os');
const loaderUtils = require('loader-utils');
const { ExtractGQL } = require('persistgraphql/lib/src/ExtractGQL');
const queryTransformers = require('persistgraphql/lib/src/queryTransformers');
const loadModuleRecursively = require('./load-module-recursively');

module.exports = function graphQLPersistedDocumentLoader(content) {
const deps = [];
Expand All @@ -15,7 +14,7 @@ module.exports = function graphQLPersistedDocumentLoader(content) {
const sandbox = {
require(file) {
deps.push(new Promise((resolve, reject) => {
loadModuleRecursively(context, file, (err, source, sourceMap, module) => {
context.loadModule(file, (err, source, sourceMap, module) => {
if (err) {
reject(err);
} else {
Expand Down
53 changes: 0 additions & 53 deletions load-module-recursively.js

This file was deleted.

0 comments on commit 35504ca

Please sign in to comment.