1
0
Fork 0
mirror of https://github.com/terribleplan/next.js.git synced 2024-01-19 02:48:18 +00:00

Disable mjs support when in lambdas mode (#5712)

This commit is contained in:
Tim Neutkens 2018-11-20 12:13:31 +01:00 committed by GitHub
parent 0d44623f74
commit 70cae4b2ea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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',