-
Notifications
You must be signed in to change notification settings - Fork 162
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
Module issues with Webpack #48
Comments
Hmm it looks weird. |
It's not but I'll boil down to a repro case, soon. |
same issue .
|
import cowsay from "cowsay";
...
IndexPage.getInitialProps = async function({ req, res }) {
const isServer = typeof window === "undefined";
if (notBrowser) {
const say = chalk.blueBright('xxxxxxxxxx');
res?.write(cowsay.say({ text: say, f: "cat" }));
res?.end();
}
return {
...
};
};
|
I had some success using
Enjoy your cows! 🐄 |
I ended up kind of forking this project, with pure Javascript cows instead of text file Perl cows. I think JS Cows are the Cows of the future. https://github.com/johnnysprinkles/cowsay/tree/master/cows |
@johnnysprinkles if you argument better why that's better and send a PR, I might merge it... |
That would be a sizeable PR! And probably warrant a v2 release. This fork also does a number of other things, curious how much you'd be interested in a PR for all these things:
|
If you care about having them upstream, send some PR, I'll review (best to separate in multiple PRs) |
Hmm, it's diverged quite a bit, not really a fork more like looking at your implementation for reference. I guess I'm trying to gauge your interest in owning and maintaining NPM cowsay, sounds like you are still interested. |
Up to you, if you feel like your code would benefit the people using npm cowsay we can try to converge. I don't mind having you as contributor if it makes sense. |
I have a Javascript project that's compiled with Webpack/Babel for use in NodeJS runtime, and when I try to depend on
cowsay
I get this error at compile time:My code for including cowsay looks something like this:
I don't understand javascript modules that well, and I think they're a moving target...
The text was updated successfully, but these errors were encountered: