Skip to content

Commit

Permalink
chore(webpack): remove react-native-web specific config options
Browse files Browse the repository at this point in the history
  • Loading branch information
LeoMcA committed May 9, 2024
1 parent 2edfa21 commit 1418f82
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 23 deletions.
14 changes: 1 addition & 13 deletions client/config/paths.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,7 @@ const publicUrlOrPath = getPublicUrlOrPath(

const buildPath = process.env.BUILD_PATH || "build";

const moduleFileExtensions = [
"web.mjs",
"mjs",
"web.js",
"js",
"web.ts",
"ts",
"web.tsx",
"tsx",
"json",
"web.jsx",
"jsx",
];
const moduleFileExtensions = ["mjs", "js", "ts", "tsx", "json", "jsx"];

// Resolve file paths in the same order as webpack
const resolveModule = (resolveFn, filePath) => {
Expand Down
5 changes: 0 additions & 5 deletions client/config/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -266,13 +266,8 @@ function config(webpackEnv) {
// We also include JSX as a common component filename extension to support
// some tools, although we do not recommend using it, see:
// https://github.com/facebook/create-react-app/issues/290
// `web` extension prefixes have been added for better support
// for React Native Web.
extensions: paths.moduleFileExtensions.map((ext) => `.${ext}`),
alias: {
// Support React Native Web
// https://www.smashingmagazine.com/2016/08/a-glimpse-into-the-future-with-react-native-for-web/
"react-native": "react-native-web",
// Allows for better profiling with ReactDevTools
...(isEnvProductionProfile && {
"react-dom$": "react-dom/profiling",
Expand Down
5 changes: 0 additions & 5 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,14 @@
"!src/**/*.d.ts"
],
"moduleFileExtensions": [
"web.js",
"js",
"web.ts",
"ts",
"web.tsx",
"tsx",
"json",
"web.jsx",
"jsx",
"node"
],
"moduleNameMapper": {
"^react-native$": "react-native-web",
"^.+\\.module\\.(css|sass|scss)$": "identity-obj-proxy"
},
"modulePaths": [],
Expand Down

0 comments on commit 1418f82

Please sign in to comment.