Skip to content

Commit

Permalink
update the webpack.config.js rule for asset/resource to also exclude …
Browse files Browse the repository at this point in the history
…cjs files
  • Loading branch information
jason-crow committed Nov 16, 2023
1 parent 266038e commit 9a35d9d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion packages/react-scripts/config/webpack.config.js
Expand Up @@ -707,7 +707,9 @@ module.exports = function (webpackEnv) {
// its runtime that would otherwise be processed through "file" loader.
// Also exclude `html` and `json` extensions so they get processed
// by webpacks internal loaders.
exclude: [/^$/, /\.(js|mjs|jsx|ts|tsx)$/, /\.html$/, /\.json$/],

// note: 10/16/23 update to also exclude cjs files as packages such as axios may be configured to prefer these for the browser
exclude: [/^$/, /\.(js|mjs|jsx|cjs|ts|tsx)$/, /\.html$/, /\.json$/],
type: 'asset/resource',
},
// ** STOP ** Are you adding a new loader?
Expand Down
2 changes: 1 addition & 1 deletion packages/react-scripts/package.json
@@ -1,6 +1,6 @@
{
"name": "@bentley/react-scripts",
"version": "5.0.6",
"version": "5.0.7",
"description": "iTwin.js configuration and scripts for Create React App.",
"repository": {
"type": "git",
Expand Down

0 comments on commit 9a35d9d

Please sign in to comment.