Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/graphql/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

## Requirements

This plugin requires an [LTS](https://github.com/nodejs/Release) Node version (v14.0.0+) and Rollup v1.20.0+.
This plugin requires an [LTS](https://github.com/nodejs/Release) Node version (v14.0.0+) and Rollup v2.78.0+.

## Install

Expand Down
2 changes: 1 addition & 1 deletion packages/graphql/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
],
"peerDependencies": {
"graphql": ">=0.9.0",
"rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0"
"rollup": "^2.78.0||^3.0.0||^4.0.0"
},
"peerDependenciesMeta": {
"rollup": {
Expand Down
39 changes: 22 additions & 17 deletions packages/graphql/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,31 @@ export default function graphql({ include, exclude } = {}) {

return {
name: 'graphql',
transform(source, id) {
if (!filter(id)) return null;
if (!filterExt.test(id)) return null;
transform: {
filter: {
id: filterExt
},
handler(source, id) {
if (!filter(id)) return null;
if (!filterExt.test(id)) return null;

// XXX: this.cachable() in graphql-tag/loader
const code = toESModules(
loader.call(
{
cacheable() {}
},
source
)
);
// XXX: this.cachable() in graphql-tag/loader
const code = toESModules(
loader.call(
{
cacheable() {}
},
source
)
);

const map = { mappings: '' };
const map = { mappings: '' };

return {
code,
map
};
return {
code,
map
};
}
}
};
}
Loading