-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix writing a loder instructions #3723
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/webpack-docs/webpack-js-org/h7v6nlfp0 |
} | ||
}] | ||
} | ||
}); | ||
|
||
compiler.outputFileSystem = createFsFromVolume(new Volume()); | ||
const volume = createFsFromVolume(new Volume()); | ||
volume.join = path.join; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Without this, it throws error: TypeError: this.outputFileSystem.join is not a function
@@ -377,6 +377,9 @@ __package.json__ | |||
{ | |||
"scripts": { | |||
"test": "jest" | |||
}, | |||
"jest": { | |||
"testEnvironment": "node" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
options: { | ||
name: 'Alice' | ||
} | ||
options, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's bit nicer to pass options from your tests so this is more reusable.
Oh, I didn't notice there's already a similar pull request here before I submit #3739. I should search the pull request first next time. |
Thanks! |
When I followed the tutorial for writing loader, I have noticed couple of issues, see the inline comments.