From 70cae4b2ea8bb70a3f61f59f250b3e9f7b94628a Mon Sep 17 00:00:00 2001 From: Tim Neutkens Date: Tue, 20 Nov 2018 12:13:31 +0100 Subject: [PATCH] Disable mjs support when in lambdas mode (#5712) --- packages/next/build/webpack.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/next/build/webpack.js b/packages/next/build/webpack.js index 669c840c..5e952c5d 100644 --- a/packages/next/build/webpack.js +++ b/packages/next/build/webpack.js @@ -223,7 +223,8 @@ export default async function getBaseWebpackConfig (dir: string, {dev = false, i } : {} const resolveConfig = { - extensions: ['.wasm', '.mjs', '.js', '.jsx', '.json'], + // Disable .mjs for node_modules bundling + extensions: ['.wasm', !lambdas && '.mjs', '.js', '.jsx', '.json'].filter(Boolean), modules: [ NEXT_PROJECT_ROOT_NODE_MODULES, 'node_modules',