Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
process(src) {
// call directly the webpack loader with a mocked context
// as graphql-tag/loader leverages `this.cacheable()`
return loader.call({ cacheable() {} }, src);
},
};
process(src) {
// call directly the webpack loader with a mocked context
// as graphql-tag/loader leverages `this.cacheable()`
return loader.call({ cacheable() {} }, src);
},
};
process(source) {
return loader.call({
cacheable() {
// empty
}
}, source)
}
}
process(src) {
return loader.call({ cacheable() {} }, src);
},
};
process(src: any) {
return loader.call({ cacheable() {} }, src);
},
};
process(src) {
return loader.call({ cacheable() {} }, src)
},
}
.forEach((file) => {
const path = `${file.getPathInPackage()}.js`;
const content = file.getContentsAsString().trim();
try {
const data = loader.call(context, content);
file.addJavaScript({
data,
path,
});
} catch (e) {
if (e.locations) {
file.error({
message: e.message,
line: e.locations[0].line,
column: e.locations[0].column,
});
} else {
throw e;
}
}