From 189fc985a709bf67986ef58502c0c599abdb2ff2 Mon Sep 17 00:00:00 2001 From: Vincent Voyer Date: Tue, 11 Feb 2020 22:45:36 +0100 Subject: [PATCH] Upgrade next-transpile-modules in workspace examples (#10492) The latest major release of next-transpile-module (v3) changed the way the module is used, see: https://github.com/martpie/next-transpile-modules/releases/tag/3.0.0 --- .../packages/web-app/next.config.js | 10 ++++------ .../with-yarn-workspaces/packages/web-app/package.json | 2 +- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/examples/with-yarn-workspaces/packages/web-app/next.config.js b/examples/with-yarn-workspaces/packages/web-app/next.config.js index e89583091618..d359746caeba 100644 --- a/examples/with-yarn-workspaces/packages/web-app/next.config.js +++ b/examples/with-yarn-workspaces/packages/web-app/next.config.js @@ -1,7 +1,5 @@ -const withTM = require('next-transpile-modules') - -// Tell webpack to compile the "bar" package +// Tell webpack to compile the "bar" package, necessary if you're using the export statement for example // https://www.npmjs.com/package/next-transpile-modules -module.exports = withTM({ - transpileModules: ['bar'], -}) +const withTM = require('next-transpile-modules')(['bar']) + +module.exports = withTM() diff --git a/examples/with-yarn-workspaces/packages/web-app/package.json b/examples/with-yarn-workspaces/packages/web-app/package.json index ab2f77987965..97b2b1bc9195 100644 --- a/examples/with-yarn-workspaces/packages/web-app/package.json +++ b/examples/with-yarn-workspaces/packages/web-app/package.json @@ -8,7 +8,7 @@ }, "dependencies": { "next": "latest", - "next-transpile-modules": "^2.0.0", + "next-transpile-modules": "^3.0.0", "react": "^16.8.3", "react-dom": "^16.8.3" },