7.0.0
Bonsoir! 👋 Following the release of Next.js 10.2, next-transpile-modules@7
is here!
v6 works perfectly with [email protected]
, v7 only introduces an option default value change.
The breaking changes are indicated by the
⚠️ resolveSymlinks: true
by default
If you are using yarn/npm workspaces, it should not change anything, but compilation time and reloads will be faster.
If you are using npm/yarn link
or npm
's file:
, you will need to set the option to false if you get compilation errors.
Webpack 5 support
Webpack 5 support is not experimental anymore! It will be disabled by default though, because this plugin updates the Next.js Webpack configuration. So if you want to use Webpack 5 (and enjoy all the bundles/compilation improvements), you'll need to explicitly enable it in your config:
// next.config.js
const withTM = require('next-transpile-modules')(['...']);
module.exports = withTM({
future: {
webpack5: true,
},
});
I would like to thank everyone who helped working on that, you guys are absolutely awesome.
Fixed nested modules transpilation
Sometimes you want to transpile a nested modules, the following now works correctly:
const withTM = require('next-transpile-modules')(['some-deps', 'some-deps/node_modules/some-sub-deps']);
TS declaration files
JSDoc was already provided for the best auto-completion experience possible, but next-transpile-modules
now comes with .d.ts
files in order to provide typings for those with custom setup using a next.config.ts
.
They are not perfect though, so feel free to contribute to them if you want better typings.