FormidableLabs / jest-next-dynamic

Resolve Next.js dynamic import components in Jest tests
MIT License
69 stars 7 forks source link

Update README to include note about latest Next.js #7

Closed ztanner closed 5 years ago

ztanner commented 5 years ago

Next.js 8.0.4 came with a change to add babel-plugin-dynamic-import-node to Next.js: https://github.com/zeit/next.js/pull/6811

This means that using jest-next-dynamic requires no custom babel configurations. One caveat is that the plugin will only be added when in a test environment, so added a note about making sure NODE_ENV is set to test.

Related: https://github.com/FormidableLabs/jest-next-dynamic/issues/6

cc @exogen

ztanner commented 5 years ago

This behavior has changed again in Next@9 making the plugin required, so going to close this.