Skip to content

Releases: martpie/next-transpile-modules

4.0.2

29 Jul 12:09
Compare
Choose a tag to compare
  • Fix hot-reloading for transpiled packages #97

Thanks to @aleksei-savitski-softswiss!

4.0.1

28 Jul 16:33
Compare
Choose a tag to compare
  • Fixed various issues with transpiled CSS/SCSS #95 #96

Internal:

  • Added yarn workspeces end-to-end test
  • Improved end-to-end tests setup

Thank you to everyone who helped debug these issues!

4.0.0

27 Jul 18:39
Compare
Choose a tag to compare

Added support for Next.js 9.5

This is a breaking change, as the Next.js Webpack configuration was quite changed, and I did not want to maintain a compatibility layer based on the Next.js version. ;) This version is not compatible with next<4.5.0.

So you don't have to do much to upgrade, apart from updating both your next and next-transpile-modules dependencies.

The support for Webpack 5 was also added, please consider it experimental as long as the Webpack 5 integration is experimental in Next.js.

Please report issues if you face any :)

Big thanks to @ScriptedAlchemy and @migatech2015 for helping with this release, and all the other persons involved in reviews and advices!

3.3.0

28 Apr 08:50
Compare
Choose a tag to compare

3.2.0

03 Apr 21:32
Compare
Choose a tag to compare
  • Add support for .mjs files (thanks @BRKalow!)

3.1.0

10 Mar 16:00
Compare
Choose a tag to compare
  • Add support for Next.js 9.3's Sass/Scss features: you can now transpile Sass or Scss from node_modules

3.0.2

23 Jan 16:56
ec628f5
Compare
Choose a tag to compare
  • Fix build crash when using the plugin with an empty array

3.0.1

21 Jan 21:04
bfbfb34
Compare
Choose a tag to compare
  • Fix module import when relying on package.json's main field (big thanks to @TrySound)

3.0.0

20 Jan 12:44
Compare
Choose a tag to compare

next-transpile-modules-3.0 introduces some important new features, bugfixes, and a minor breaking change. The breaking changes are indicated by the ⚠️ icon.

If you face problems with this new version please open an issue :)

⚠️ New plugin invocation

To avoid polluting the global config object with the transpileModule property, next-transpile-modules now exposes a function that takes an array of strings (the modules you want to transpile) as its first parameter.

In action:

// next.config.js
- const withTM = require('next-transpile-modules');
+ const withTM = require('next-transpile-modules')(['somemodule', 'and-another']);
 
module.exports = withTM({
-  transpileModules: ['somemodule', 'and-another']
});

This notation was inspired by @next/bundle-analyzer.

Added support Next.js 9.2 CSS features

In [email protected] was added support for CSS files (as CSS modules or global CSS). next-transpile-modules will now let your transpiled packages include CSS, and will allow you to import global CSS in pages/_app.js.

More details are available in the documentation.

Bugfixes

Potentially breaking bugfixes depending on your setup:

  • ⚠️ a transpiled module whose name was a substring of another module (let's call it A) won't make A to be transpiled anymore

For example: transpiling core won't make core-js to be transpiled too anymore.

  • ⚠️ nested node_modules directories are now correctly ignored.

For example, if you want to transpile @shared/ui, @share/ui/node_modules/lodash won't get transpiled anymore.

Misc

  • Unit-tests were refined to handle some edgecases
  • End-to-end tests were added to ensure developing/refactoring this plugin with more confidence
  • Added Prettier

2.3.1

17 Apr 09:04
Compare
Choose a tag to compare
  • Remove nasty console.log