Skip to content

Commit 1b9f3fa

Browse files
Merge branch 'master' into serve-app-under
* master: Updates comment to reflect codebase (facebook#3576) Add mjs and jsx filename extensions to file-loader exclude pattern (facebook#3537)
2 parents 34411a9 + a1c5b8f commit 1b9f3fa

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

packages/react-scripts/config/webpack.config.dev.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ module.exports = {
229229
// it's runtime that would otherwise processed through "file" loader.
230230
// Also exclude `html` and `json` extensions so they get processed
231231
// by webpacks internal loaders.
232-
exclude: [/\.js$/, /\.html$/, /\.json$/],
232+
exclude: [/\.(js|jsx|mjs)$/, /\.html$/, /\.json$/],
233233
loader: require.resolve('file-loader'),
234234
options: {
235235
name: 'static/media/[name].[hash:8].[ext]',

packages/react-scripts/config/webpack.config.prod.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ module.exports = {
249249
// it's runtime that would otherwise processed through "file" loader.
250250
// Also exclude `html` and `json` extensions so they get processed
251251
// by webpacks internal loaders.
252-
exclude: [/\.js$/, /\.html$/, /\.json$/],
252+
exclude: [/\.(js|jsx|mjs)$/, /\.html$/, /\.json$/],
253253
options: {
254254
name: 'static/media/[name].[hash:8].[ext]',
255255
},

packages/react-scripts/scripts/start.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ const HOST = process.env.HOST || '0.0.0.0';
5555
const servedPathPathname = url.parse(paths.servedPath).pathname || '';
5656

5757
// We attempt to use the default port but if it is busy, we offer the user to
58-
// run on a different port. `detect()` Promise resolves to the next free port.
58+
// run on a different port. `choosePort()` Promise resolves to the next free port.
5959
choosePort(HOST, DEFAULT_PORT)
6060
.then(port => {
6161
if (port == null) {

0 commit comments

Comments
 (0)