Skip to content

7.1.0

Compare
Choose a tag to compare
@martpie martpie released this 17 May 20:17
· 104 commits to master since this release
  • Added new package lookup resolution
  • Deprecated specific package file lookup

When trying to locate the packages you are trying to transpile, since v5, next-transpile-modules tries to resolve your module names you pass to it, which required a valid main or exports field. It will now tries to resolve directly to its package.json.

This should solve the issue for some people who did not want to use the main/exports fields for their local packages, and some others who wanted to use local packages locally while publishing them on NPM as well.

If next-transpile-modules cannot find your package package.json, it will fallback to the previous lookup system (a deprecation warning was added), so no breaking change is expected.

Basically, for the few that were using something like:

const withTM = require('next-transpile-modules')(['some/very/specific/file.js']);

You should now be able to use:

const withTM = require('next-transpile-modules')(['some']);

...and everything will work fine.