Fix "rule.test.test is not a function" in @next/plugin-storybook (#21032)

Rookie mistake 😉
This commit is contained in:
François Billioud 2021-01-14 04:14:57 +01:00 committed by GitHub
parent 406c996189
commit 9efe8eb019
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -28,7 +28,7 @@ async function webpackFinal(config) {
config.module.rules = [
...config.module.rules.filter((rule) => {
// the rules we're filtering use RegExp for the test
if (!rule.test instanceof RegExp) return true
if (!(rule.test instanceof RegExp)) return true
// use Next.js' built-in CSS
if (rule.test.test('hello.css')) {
return false