Skip to content

Commit

Permalink
Merge pull request #4708 from dumbNickname/mjs-support
Browse files Browse the repository at this point in the history
Change extensions ordering in webpack config
  • Loading branch information
igor-dv committed Nov 5, 2018
2 parents c85cedb + 42c27ce commit e79b3af
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/core/src/server/config/webpack.config.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
2 changes: 1 addition & 1 deletion lib/core/src/server/config/webpack.config.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down

0 comments on commit e79b3af

Please sign in to comment.