Directly reference neo-scraper from github + add eslint

next
neobooru 2022-08-07 23:32:54 +02:00
parent b0ebc58711
commit 01f409ed63
13 changed files with 1250 additions and 766 deletions

23
.eslintrc.js Normal file
View File

@ -0,0 +1,23 @@
module.exports = {
"env": {
"browser": true,
"es2021": true
},
"extends": [
"eslint:recommended",
"plugin:vue/vue3-essential",
"plugin:@typescript-eslint/recommended"
],
"parserOptions": {
"ecmaVersion": "latest",
"parser": "@typescript-eslint/parser",
"sourceType": "module"
},
"plugins": [
"vue",
"@typescript-eslint"
],
"rules": {
semi: ["error", "always"],
}
};

111
README.md
View File

@ -4,50 +4,37 @@ Chrome/Firefox extension which can import media from various sites into a [szuru
## Supported sites ## Supported sites
- Danbooru (and Safebooru variant) | Engine | Sites | Features | Notes |
- Gelbooru/Safebooru/Rule34.xxx/tbib.org | -------------- | ------------------------------------------------------------- | -------------------------------------------------------------- | ------------------------------------------------------------------------------- |
- yande.re/konachan (Moebooru) | animepictures | anime-pictures.net | content, resolution, tags, tag_category | Rating is assumed to be safe. |
- SankakuComplex (doesn't currently work because of the hotlink protection) | danbooru | danbooru.donmai.us, safebooru.donmai.us | content, rating, resolution, tags, tag_category, source, notes | |
- Rule34 paheal (Shimmie2) | e621 | e621.net, e926.net | content, rating, resolution, tags, tag_category, source | |
- E-Shuushuu | furaffinity | www.furaffinity.net | content, rating, resolution, tags, tag_category | |
- Zerochan | gelbooru | safebooru.org, gelbooru.com, rule34.xxx, tbib.org, xbooru.com | content, rating, resolution, tags, tag_category, source, notes | Supported features might vary between hosts. |
- Reddit | inkbunny | inkbunny.net | content, rating, resolution, tags | |
- Twitter | moebooru | yande.re, konachan.com | content, rating, resolution, tags, tag_category, source, notes | |
- Fallback (simply grabs the largest image on a page) | pixiv | pixiv.net, www.pixiv.net | content | |
| reddit | reddit.com, new.reddit.com, old.reddit.com | content | |
| rule34us | rule34.us | content, resolution, tags, tag_category | Rating is assumed to be unsafe. |
| sankakucomplex | chan.sankakucomplex.com | content, rating, tags, tag_category, notes | Hotlink protection currently prevents szurubooru from importing from this site. |
| shimmie2 | rule34.paheal.net, rule34hentai.net | content, tags, source | Rating is assumed to be unsafe. |
| shuushuu | e-shuushuu.net | content, rating, resolution, tags, tag_category | Rating is assumed to be safe. |
| twitter | twitter.com, mobile.twitter.com | content | |
| zerochan | www.zerochan.net | content, resolution, tags, tag_category | Rating is assumed to be safe. |
| fallback | | content | Tries to find the largest image or video on the current page. |
## Installation ## Installation
_Work in progress_
For development see [build/debug](#Builddebug). For development see [build/debug](#Builddebug).
There also is a .xpi for Firefox on the [release tab](https://github.com/neobooru/SzuruChrome/releases).
There _isn't_ a .crx for Chrome because you can't install it anyway, so you'll have to use the unpacked extension.
This extension should also work on Firefox Android (I can't test this because Firefox Android doesn't support client certificates). ### Firefox
Same goes for Kiwi Browser and pretty much all other Chromium based browsers with extension support.
The Yandex browser does support client certificates and extensions (SzuruChrome works fine), but I'm not sure if I'd trust them with my data.
The layout is obviously not designed for mobile, so at times it looks less than ideal.
## How does it work? Just download the .xpi from [release tab](https://github.com/neobooru/SzuruChrome/releases) and install it.
This add-on has three parts. ### Chrome
The first part is the popup, which is what pops up when you click on the logo.
The second part is a content script which is injected on the page you visit. This script tries to find importable content on the current page and sends this to the popup. I can't create a valid .crx file, which means that you'll have to use [Chrome's "Load unpacked extension"](https://developer.chrome.com/docs/extensions/mv3/getstarted/#unpacked) feature.
You can download a .zip containing the needed files from the [release tab](https://github.com/neobooru/SzuruChrome/releases). Check [this stackoverflow answer](https://stackoverflow.com/a/38011386) if you want to get rid of the developer extension popup.
The third part is the background script which handles the upload functionality. This was previously part of the popup, but has since been moved to the background script.
### The popup
When opened (when you click on the add-on logo in your browser) it sends a message to the content script injected on the current page (active tab). This message asks the content script to scrape the DOM and return a SzuruPost element (with a source, contentUrl, safety, and a list of tags). Once it receives this element it renders it in the popup where you can make changes before importing it. When you click on the "Upload" button the SzuruPost will be sent to the background script which will handle the upload functionality. This is done so that the upload continues even after you close the popup. This means that you can close the popup after clicking the "Upload" button and it'll continue with the upload.
### The content script
This script is injected on every page and does absolutely nothing until it receives the 'grab_post' message from the popup. Once it does received this message it checks if there are any loaders available to scrape this page. If a matching loader is found it'll pass the DOM of this page to the loader. The loader then uses the DOM to fill (as much as possible) a SzuruPost object. The SzuruPost is then passed back to the popup where you can change the post before importing it.
### The background script
This script handles the uploading of a post. It will also update a tag's category in your szurubooru instance when it differs from what is imported.
## Build/debug ## Build/debug
@ -55,18 +42,16 @@ This script handles the uploading of a post. It will also update a tag's categor
# Install node modules # Install node modules
yarn install yarn install
# Use any of the following commands to build once # Use any of the following commands to build
yarn build yarn build
yarn build:dev yarn build:dev
# Or use one of these to build + rebuild on changes
yarn watch
yarn watch:dev
``` ```
After this you can load them in your browser. After this you can load them in your browser.
Chrome: `chrome://extensions/` -> "Load unpacked" -> Select `./dist` folder Chrome: `chrome://extensions/` → "Load unpacked" → Select `./dist` folder
Firefox: `about:debugging` -> "Load Temporary Add-on..." -> Select any file in the `./dist` folder (it will load all files) Firefox: `about:debugging` → "Load Temporary Add-on..." → Select any file in the `./dist` folder (it will load all files)
See [the developer docs](./docs/DEVELOPER.md) for more information.
## Planned features ## Planned features
@ -76,45 +61,5 @@ These are some things I might work on. Though honestly I don't expect this exten
- Right click any image on a page to import it - Right click any image on a page to import it
- Configurable list of tags to always ignore (e.g. tagme, highres) - Configurable list of tags to always ignore (e.g. tagme, highres)
- [low priority] Import artist commentary - [low priority] Import artist commentary
- [low priority] Import notes
- [lowest priority] Move from 'options_page' to 'options_ui' - [lowest priority] Move from 'options_page' to 'options_ui'
- [lowest priority] Multiple szurubooru instances (where you can choose to which one you want to upload the post) - [lowest priority] Multiple szurubooru instances (where you can choose to which one you want to upload the post)
## FAQ
### I can't connect to a szurubooru instance because it complains about CORS
See workaround below.
```apache
# CORS hack
Header always set Access-Control-Allow-Origin "*"
Header always set Access-Control-Allow-Methods "GET, POST, PUT, DELETE, OPTIONS"
Header always set Access-Control-Allow-Headers "Authorization, Content-Type"
# CORS custom response for OPTIONS request (because szurubooru doesn't handle this, yet)
RewriteEngine on
RewriteCond %{REQUEST_METHOD} OPTIONS
RewriteRule ^(.*)$ $1 [R=204,L]
```
### I can't connect to a szurubooru instance which requires a client certificate (Firefox only)
Because the CORS spec is a bitch the preflight request is sent without the client certificate. A workaround would be to add the following to your apache2 config. Chrome has a 'bug' where it does send the client certificate in the preflight request (the sane thing to do if you ask me).
```apache
<Location "/api">
# Can also be set to 'none'
SSLVerifyClient optional
</Location>
```
### Why send the DOM to the ILoader instead of just an url?
If we send an URL to the ILoader it has to download the page again itself, which can go wrong in a dozen ways:
1. The website might be offline now
2. If the website is a SPA it might not see the same version/content as you did
3. If you made changes to the DOM but didn't submit them to the server (e.g. edit post page) the ILoader would see a different page (kinda the same as point 2)
4. If any form of authentication (username+password/client certificate/etc) is involved it gets tricky
5. We already have the DOM, why download it again?

34
docs/DEVELOPER.md Normal file
View File

@ -0,0 +1,34 @@
# Developer notes
## How does it work?
This add-on has three parts.
The first part is the popup, which is what pops up when you click on the logo.
The second part is a content script which is injected on the page you visit. This script tries to find importable content on the current page and sends this to the popup.
The third part is the background script which handles the upload functionality. This was previously part of the popup, but has since been moved to the background script.
### The popup
When opened (when you click on the add-on logo in your browser) it sends a message to the content script injected on the current page (active tab). This message asks the content script to scrape the DOM and return a SzuruPost element (with a source, contentUrl, safety, and a list of tags). Once it receives this element it renders it in the popup where you can make changes before importing it. When you click on the "Upload" button the SzuruPost will be sent to the background script which will handle the upload functionality. This is done so that the upload continues even after you close the popup. This means that you can close the popup after clicking the "Upload" button, and it'll continue with the upload.
### The content script
This script is injected on every page and does absolutely nothing until it receives the 'grab_post' message from the popup. When it does receive this message it checks if there are any loaders available to scrape this page. If a matching loader is found it'll pass the DOM of this page to the loader. The loader then uses the DOM to fill (as much as possible) a SzuruPost object. The SzuruPost is then passed back to the popup where you can change the post before importing it.
### The background script
This script handles the uploading of a post. It will also update a tag's category in your szurubooru instance when it differs from what is imported.
## F.A.Q
### Why send the DOM to the ILoader instead of just a URL?
If we send a URL to the ILoader it has to download the page again itself, which can go wrong in a dozen ways:
1. The website might be offline now
2. If the website is an SPA it might not see the same version/content as you did
3. If you made changes to the DOM but didn't submit them to the server (e.g. edit post page) the ILoader would see a different page (kinda the same as point 2)
4. If any form of authentication (username+password/client certificate/etc.) is involved it gets tricky
5. We already have the DOM, why download it again?

View File

@ -1,6 +1,6 @@
{ {
"name": "szuru-chrome", "name": "szuru-chrome",
"version": "0.8.0", "version": "0.8.1",
"description": "Import media from various sites into szurubooru.", "description": "Import media from various sites into szurubooru.",
"author": "neobooru", "author": "neobooru",
"license": "MIT", "license": "MIT",
@ -12,30 +12,35 @@
"build:dev": "webpack --config webpack.dev.js", "build:dev": "webpack --config webpack.dev.js",
"build-zip": "node scripts/build-zip.js", "build-zip": "node scripts/build-zip.js",
"sign-xpi": "node scripts/sign-xpi.js", "sign-xpi": "node scripts/sign-xpi.js",
"watch": "webpack --watch --config webpack.dev.js" "watch": "webpack --watch --config webpack.dev.js",
"lint": "eslint src"
}, },
"dependencies": { "dependencies": {
"axios": "^0.23.0", "axios": "^0.27.2",
"markdown-it": "^12.3.2", "markdown-it": "^13.0.1",
"neo-scraper": "^0.5.3", "neo-scraper": "git+https://github.com/neobooru/neo-scraper.git",
"vue": "^2.6.14", "vue": "^2.6.14",
"webextension-polyfill": "^0.8.0" "webextension-polyfill": "^0.9.0"
}, },
"devDependencies": { "devDependencies": {
"@types/markdown-it": "^12.2.3", "@types/markdown-it": "^12.2.3",
"archiver": "^5.3.0", "@typescript-eslint/eslint-plugin": "^5.33.0",
"copy-webpack-plugin": "^9.0.1", "@typescript-eslint/parser": "^5.33.0",
"css-loader": "^6.4.0", "archiver": "^5.3.1",
"mini-css-extract-plugin": "^2.4.2", "copy-webpack-plugin": "^11.0.0",
"sign-addon": "^3.9.0", "css-loader": "^6.7.1",
"ts-loader": "^9.2.6", "eslint": "^8.21.0",
"typescript": "^4.4.4", "eslint-plugin-vue": "^9.3.0",
"mini-css-extract-plugin": "^2.6.1",
"sign-addon": "^5.0.0",
"ts-loader": "^9.3.1",
"typescript": "^4.7.4",
"vue-loader": "^15.9.8", "vue-loader": "^15.9.8",
"vue-template-compiler": "^2.6.14", "vue-template-compiler": "^2.7.8",
"web-ext-types": "^3.2.1", "web-ext-types": "^3.2.1",
"webextension-polyfill-ts": "^0.26.0", "webextension-polyfill-ts": "^0.26.0",
"webpack": "^5.58.2", "webpack": "^5.74.0",
"webpack-cli": "^4.9.0", "webpack-cli": "^4.10.0",
"webpack-ext-reloader": "^1.1.9" "webpack-ext-reloader": "^1.1.9"
} }
} }

View File

@ -38,5 +38,5 @@ export function isChrome() {
export function encodeTagName(tagName: string) { export function encodeTagName(tagName: string) {
// Searching for posts with re:zero will show an error message about unknown named token. // Searching for posts with re:zero will show an error message about unknown named token.
// Searching for posts with re\:zero will show posts tagged with re:zero. // Searching for posts with re\:zero will show posts tagged with re:zero.
return tagName.replace(/\:/g, "\\:"); return tagName.replace(/:/g, "\\:");
} }

View File

@ -1,19 +1,19 @@
import { browser } from "webextension-polyfill-ts"; import { browser } from "webextension-polyfill-ts";
export class SzuruSiteConfig { export class SzuruSiteConfig {
domain: string = ""; domain = "";
username: string = ""; username = "";
authToken: string = ""; authToken = "";
} }
export class Config { export class Config {
importExistingTags: boolean = true; importExistingTags = true;
importAllTags: boolean = false; importAllTags = false;
importCommentary: boolean = false; importCommentary = false;
useOriginalSource: boolean = true; useOriginalSource = true;
autoSearchSimilar: boolean = false; autoSearchSimilar = false;
loadTagCounts: boolean = true; loadTagCounts = true;
useContentTokens: boolean = true; useContentTokens = true;
sites: Array<SzuruSiteConfig> = []; sites: Array<SzuruSiteConfig> = [];
public async save() { public async save() {
@ -26,7 +26,7 @@ export class Config {
} }
static async load(): Promise<Config> { static async load(): Promise<Config> {
let storage = await browser.storage.local.get("config"); const storage = await browser.storage.local.get("config");
let config: Config = new Config(); let config: Config = new Config();
if ("config" in storage) { if ("config" in storage) {

View File

@ -51,8 +51,8 @@ export default class SzuruWrapper {
async getTags( async getTags(
query: string, query: string,
offset: number = 0, offset = 0,
limit: number = 100, limit = 100,
fields: TagFields[] | undefined = undefined, fields: TagFields[] | undefined = undefined,
cancelToken: CancelToken | undefined = undefined cancelToken: CancelToken | undefined = undefined
): Promise<TagsResult> { ): Promise<TagsResult> {
@ -71,7 +71,7 @@ export default class SzuruWrapper {
} }
async createPost(post: PostViewModel): Promise<Post> { async createPost(post: PostViewModel): Promise<Post> {
var obj = <any>{ const obj = <any>{
tags: post.tags.map(x => x.name), tags: post.tags.map(x => x.name),
safety: post.rating, safety: post.rating,
source: post.source, source: post.source,
@ -91,21 +91,21 @@ export default class SzuruWrapper {
} }
async reverseSearch(contentUrl: string): Promise<ImageSearchResult> { async reverseSearch(contentUrl: string): Promise<ImageSearchResult> {
var obj = { contentUrl }; const obj = { contentUrl };
return (await this.apiPost("posts/reverse-search", obj)).data; return (await this.apiPost("posts/reverse-search", obj)).data;
} }
async reverseSearchToken(contentToken: string): Promise<ImageSearchResult> { async reverseSearchToken(contentToken: string): Promise<ImageSearchResult> {
var obj = { contentToken }; const obj = { contentToken };
return (await this.apiPost("posts/reverse-search", obj)).data; return (await this.apiPost("posts/reverse-search", obj)).data;
} }
async uploadTempFile(contentUrl: string): Promise<TemporaryFileUploadResult> { async uploadTempFile(contentUrl: string): Promise<TemporaryFileUploadResult> {
var obj = { contentUrl }; const obj = { contentUrl };
return (await this.apiPost("uploads", obj)).data; return (await this.apiPost("uploads", obj)).data;
} }
static createFromConfig(siteConfig: SzuruSiteConfig): SzuruWrapper | null { static createFromConfig(siteConfig: SzuruSiteConfig): SzuruWrapper {
return new SzuruWrapper(siteConfig.domain, siteConfig.username, siteConfig.authToken); return new SzuruWrapper(siteConfig.domain, siteConfig.username, siteConfig.authToken);
} }

View File

@ -7,7 +7,7 @@ export class TagViewModel {
constructor(public name: string, public category?: BooruTypes.TagCategory, public usages?: number | undefined) {} constructor(public name: string, public category?: BooruTypes.TagCategory, public usages?: number | undefined) {}
static fromTag(tag: Tag) { static fromTag(tag: Tag) {
let x = new TagViewModel(tag.names[0], <BooruTypes.TagCategory>tag.category, tag.usages); const x = new TagViewModel(tag.names[0], <BooruTypes.TagCategory>tag.category, tag.usages);
if (tag.implications) { if (tag.implications) {
x.implications = tag.implications.map(y => TagViewModel.fromMicroTag(y)); x.implications = tag.implications.map(y => TagViewModel.fromMicroTag(y));
@ -26,7 +26,7 @@ export class TagViewModel {
} }
export class PostViewModel { export class PostViewModel {
name: string = ""; name = "";
tags: TagViewModel[] = []; tags: TagViewModel[] = [];
notes: ScrapedNote[]; notes: ScrapedNote[];
contentUrl: string; contentUrl: string;

View File

@ -193,8 +193,8 @@ export default Vue.extend({
// Clear current posts array // Clear current posts array
this.posts = []; this.posts = [];
for (var result of res.results) { for (const result of res.results) {
for (var i in result.posts) { for (const i in result.posts) {
const vm = new PostViewModel(result.posts[i]); const vm = new PostViewModel(result.posts[i]);
vm.name = `[${result.engine}] Post ${parseInt(i) + 1}`; // parseInt() is required! vm.name = `[${result.engine}] Post ${parseInt(i) + 1}`; // parseInt() is required!
@ -483,7 +483,7 @@ export default Vue.extend({
this.szuru = SzuruWrapper.createFromConfig(this.activeSite); this.szuru = SzuruWrapper.createFromConfig(this.activeSite);
} }
browser.runtime.onMessage.addListener((cmd: BrowserCommand, sender: Runtime.MessageSender) => { browser.runtime.onMessage.addListener((cmd: BrowserCommand, _sender: Runtime.MessageSender) => {
switch (cmd.name) { switch (cmd.name) {
case "push_message": case "push_message":
this.messages.push(cmd.data); this.messages.push(cmd.data);
@ -502,6 +502,10 @@ export default Vue.extend({
extraInfoSpec.push("extraHeaders" as any); extraInfoSpec.push("extraHeaders" as any);
} }
// Add "Referer" header to all requests if post.referrer is set.
// This is needed in some rare cases where websites disallow hotlinking to images.
// This will probably stop working in Chrome sometime in 2023 due to the Manifest V3 webRequestBlocking bullshit.
// Firefox users should be fine.
browser.webRequest.onBeforeSendHeaders.addListener( browser.webRequest.onBeforeSendHeaders.addListener(
(details: WebRequest.OnBeforeSendHeadersDetailsType) => { (details: WebRequest.OnBeforeSendHeadersDetailsType) => {
let requestHeaders = details.requestHeaders ?? []; let requestHeaders = details.requestHeaders ?? [];

View File

@ -1,4 +1,4 @@
import { browser, Runtime } from "webextension-polyfill-ts"; import { browser } from "webextension-polyfill-ts";
import { BrowserCommand, Message, encodeTagName, getUrl } from "../Common"; import { BrowserCommand, Message, encodeTagName, getUrl } from "../Common";
import { Config } from "../Config"; import { Config } from "../Config";
import SzuruWrapper from "../SzuruWrapper"; import SzuruWrapper from "../SzuruWrapper";
@ -9,7 +9,7 @@ async function uploadPost(post: PostViewModel) {
console.dir(post); console.dir(post);
const cfg = await Config.load(); const cfg = await Config.load();
const szuru = (await SzuruWrapper.createFromConfig(cfg.sites[0]))!; const szuru = SzuruWrapper.createFromConfig(cfg.sites[0]);
try { try {
// Create and upload post // Create and upload post
@ -43,7 +43,7 @@ async function uploadPost(post: PostViewModel) {
const existingCategories = (await szuru.getTagCategories()).results; const existingCategories = (await szuru.getTagCategories()).results;
let categoriesChangedCount = 0; let categoriesChangedCount = 0;
for (let i in tags) { for (const i in tags) {
browser.runtime.sendMessage(new BrowserCommand("remove_messages", 1)); browser.runtime.sendMessage(new BrowserCommand("remove_messages", 1));
browser.runtime.sendMessage( browser.runtime.sendMessage(
new BrowserCommand("push_message", new Message(`Updating tag ${i}/${unsetCategoryTags.length}`)) new BrowserCommand("push_message", new Message(`Updating tag ${i}/${unsetCategoryTags.length}`))
@ -71,17 +71,18 @@ async function uploadPost(post: PostViewModel) {
} }
} catch (ex) { } catch (ex) {
browser.runtime.sendMessage(new BrowserCommand("remove_messages", 1)); browser.runtime.sendMessage(new BrowserCommand("remove_messages", 1));
let error = ex as SzuruError; const error = ex as SzuruError;
// TODO: Actual good error handling/messaging // TODO: Actual good error handling/messaging
if (error.name) { if (error.name) {
console.error(error); console.error(error);
switch (error.name) { switch (error.name) {
case "PostAlreadyUploadedError": case "PostAlreadyUploadedError": {
const otherPostId = (error as PostAlreadyUploadedError).otherPostId; const otherPostId = (error as PostAlreadyUploadedError).otherPostId;
const url = getUrl(szuru.apiUrl.replace("api", ""), "post", otherPostId.toString()); const url = getUrl(szuru.apiUrl.replace("api", ""), "post", otherPostId.toString());
const msg = `<a href='${url}' target='_blank'>Post already uploaded (${otherPostId})</a>`; const msg = `<a href='${url}' target='_blank'>Post already uploaded (${otherPostId})</a>`;
browser.runtime.sendMessage(new BrowserCommand("push_message", new Message(msg, "error"))); browser.runtime.sendMessage(new BrowserCommand("push_message", new Message(msg, "error")));
break; break;
}
default: default:
browser.runtime.sendMessage(new BrowserCommand("push_message", new Message(ex?.message ?? ex, "error"))); browser.runtime.sendMessage(new BrowserCommand("push_message", new Message(ex?.message ?? ex, "error")));
break; break;
@ -93,7 +94,7 @@ async function uploadPost(post: PostViewModel) {
} }
} }
async function messageHandler(cmd: BrowserCommand, sender: Runtime.MessageSender): Promise<any> { async function messageHandler(cmd: BrowserCommand): Promise<any> {
switch (cmd.name) { switch (cmd.name) {
case "upload_post": case "upload_post":
return uploadPost(cmd.data); return uploadPost(cmd.data);

View File

@ -1,13 +1,13 @@
import { NeoScraper, ScrapeResults } from "neo-scraper"; import { NeoScraper, ScrapeResults } from "neo-scraper";
import { browser, Runtime } from "webextension-polyfill-ts"; import { browser } from "webextension-polyfill-ts";
import { BrowserCommand } from "../Common"; import { BrowserCommand } from "../Common";
function grabPost(): ScrapeResults { function grabPost(): ScrapeResults {
var scraper = new NeoScraper(); const scraper = new NeoScraper();
return scraper.scrapeDocument(document, undefined, true); return scraper.scrapeDocument(document, undefined, true);
} }
async function messageHandler(cmd: BrowserCommand, sender: Runtime.MessageSender): Promise<any> { async function messageHandler(cmd: BrowserCommand): Promise<any> {
switch (cmd.name) { switch (cmd.name) {
case "grab_post": case "grab_post":
return grabPost(); return grabPost();

View File

@ -52,7 +52,14 @@ module.exports = {
generator: { generator: {
filename: "fonts/[name][ext]" filename: "fonts/[name][ext]"
} }
},
// Added because https://github.com/graphql/graphql-js/issues/2721#issuecomment-723008284 (not a GraphQL specific issue).
{
test: /\.m?js/,
resolve: {
fullySpecified: false
} }
},
] ]
}, },
plugins: [ plugins: [

1729
yarn.lock

File diff suppressed because it is too large Load Diff