From 3a8b967270b7f3d5a33e01756753968e678da913 Mon Sep 17 00:00:00 2001 From: Aaron Reisman Date: Sat, 4 Jan 2020 18:23:48 -0800 Subject: [PATCH] Update webpack-config.ts prefer JS over TS in resolve so that node_modules that compile .ts and .js in the same directory load the compiled result. --- packages/next/build/webpack-config.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/next/build/webpack-config.ts b/packages/next/build/webpack-config.ts index 817efd300d560..f8cf7ca8eeafc 100644 --- a/packages/next/build/webpack-config.ts +++ b/packages/next/build/webpack-config.ts @@ -210,19 +210,19 @@ export default async function getBaseWebpackConfig( // Disable .mjs for node_modules bundling extensions: isServer ? [ - ...(useTypeScript ? ['.tsx', '.ts'] : []), '.js', '.mjs', '.jsx', '.json', + ...(useTypeScript ? ['.tsx', '.ts'] : []), '.wasm', ] : [ - ...(useTypeScript ? ['.tsx', '.ts'] : []), '.mjs', '.js', '.jsx', '.json', + ...(useTypeScript ? ['.tsx', '.ts'] : []), '.wasm', ], modules: [