Skip to content

Commit

Permalink
Externalise entities and node-fetch
Browse files Browse the repository at this point in the history
  • Loading branch information
perry-mitchell committed Apr 22, 2024
1 parent 0bf9ab5 commit 76eb479
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions webpack.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ function getBasicConfig() {
alias: {
// http: path.resolve(__dirname, "./util/http.stub.ts"),
// https: path.resolve(__dirname, "./util/http.stub.ts")
"node-fetch": path.resolve(__dirname, "./util/node-fetch.stub.ts")
// "node-fetch": path.resolve(__dirname, "./util/node-fetch.stub.ts")
},
extensions: [".js"],
fallback: {
Expand Down Expand Up @@ -89,7 +89,8 @@ module.exports = [

resolve: {
alias: {
entities: path.resolve(__dirname, "./util/entities.stub.ts")
entities: path.resolve(__dirname, "./util/entities.stub.ts"),
"node-fetch": path.resolve(__dirname, "./util/node-fetch.stub.ts")
},
plugins: [
// Handle .ts => .js resolution
Expand All @@ -102,6 +103,8 @@ module.exports = [
merge(getBasicConfig(), {
entry: path.resolve(__dirname, "./source/index.ts"),

externals: ["entities", "node-fetch"],

output: {
filename: "index.js",
path: path.resolve(__dirname, "./dist/react-native"),
Expand Down

0 comments on commit 76eb479

Please sign in to comment.