From 6d48dcc16d43eaa911838f7f5f4047444fbbf100 Mon Sep 17 00:00:00 2001 From: Bartlomiej Pietrowski Date: Sun, 4 Nov 2018 00:21:28 +0100 Subject: [PATCH] Change extensions ordering as described in comment: https://github.com/graphql/graphql-js/issues/1272#issuecomment-377384574 --- lib/core/src/server/config/webpack.config.dev.js | 2 +- lib/core/src/server/config/webpack.config.prod.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/core/src/server/config/webpack.config.dev.js b/lib/core/src/server/config/webpack.config.dev.js index 0bb728d4a17f..af0d603d4f6d 100644 --- a/lib/core/src/server/config/webpack.config.dev.js +++ b/lib/core/src/server/config/webpack.config.dev.js @@ -94,7 +94,7 @@ export default ({ configDir, quiet, babelOptions, entries }) => { resolve: { // Since we ship with json-loader always, it's better to move extensions to here // from the default config. - extensions: ['.js', '.jsx', '.json', '.mjs'], + extensions: ['.mjs', '.js', '.jsx', '.json'], // Add support to NODE_PATH. With this we could avoid relative path imports. // Based on this CRA feature: https://github.com/facebookincubator/create-react-app/issues/253 modules: ['node_modules'].concat(nodePaths), diff --git a/lib/core/src/server/config/webpack.config.prod.js b/lib/core/src/server/config/webpack.config.prod.js index ea0f98f76edc..d974a5868da1 100644 --- a/lib/core/src/server/config/webpack.config.prod.js +++ b/lib/core/src/server/config/webpack.config.prod.js @@ -80,7 +80,7 @@ export default ({ configDir, babelOptions, entries }) => { resolve: { // Since we ship with json-loader always, it's better to move extensions to here // from the default config. - extensions: ['.js', '.jsx', '.json', '.mjs'], + extensions: ['.mjs', '.js', '.jsx', '.json'], // Add support to NODE_PATH. With this we could avoid relative path imports. // Based on this CRA feature: https://github.com/facebookincubator/create-react-app/issues/253 modules: ['node_modules'].concat(nodePaths),