Since NextJS log is no longer part of webpack logs, we cannot use FilterWarningsPlugin
. Instead, use node level stdout filter, for example, intercept-stdout
.
Yearly Archives: 2020
NodeJS: How to get the root path of project
For reference:
require('path').resolve('./')
To proxy local ssh authentications onto remote
$ ssh [email protected] -A
Ref: http://man.openbsd.org/cgi-bin/man.cgi/OpenBSD-current/man1/ssh.1
How to have multiple instances of i18next for component library
When you want to include i18n
in your react component library, but the two use cases of i18next
conflict with one another — long story short, you need I18nextProvider
.
Error with css-loader
Error message looks like this:
var api = require("!./node_modules/[email protected]@style-loader/dist/runtime/injectStylesIntoStyleTag.js");
If you’re using Storybook, or multiple webpack configs of dev/prod, or simply multiple rules… Either way, this error means you’ve specified rules for CSS more than once.
For example, Storybook already has a set of default rules for various file types, and CSS is one of them, so you cannot specify custom CSS
rules again.
SQS receive message failed: The specified queue does not exist for this wsdl version.
I know, it’s not the most helpful error message in the world. Here’s a translation. If you get this error, it’s one of three things:
- You forgot to set
REGION
in environment variables - You set the wrong
REGION
- This queue does not exist and needs to be created
.prettierrc Not Working
Sometimes we just need to explicitly set prettier config path in vscode:
"prettier.configPath": ".prettierrc"
Docker & Compose 101
Every few weeks where I don’t touch Docker I tend to forget the basics:
Continue readingHow to Configure less-loader to Resolve Absolute Import Paths
Provided we have /styles
under root, add the following resolve in your webpack config:
NextJS: How to Exclude Packages from Bundle
Use browser
field in package.json
:
"browser": {
...
"package-name": false
}