Skip to content

Commit

Permalink
Updated to directly add the util package in support of Webpack5, and …
Browse files Browse the repository at this point in the history
…then added a fallback to direct to it.
  • Loading branch information
DownUndaDev committed Jun 6, 2024
1 parent 8f046f0 commit 6040047
Show file tree
Hide file tree
Showing 4 changed files with 216 additions and 9 deletions.
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@
"debug:client-only-example": "export NODE_OPTIONS=--openssl-legacy-provider && yarn pwt watch debug-brk -p examples/client-only",
"explore-bundle:client-only-example": "export NODE_OPTIONS=--openssl-legacy-provider && yarn pwt explore-bundle -p examples/client-only",
"~~~ with-server ~~~": "",
"build:with-server-example": "yarn pwt build -p examples/with-server",
"watch:with-server-example": "yarn pwt watch server -p examples/with-server",
"explore-bundle:with-server-example": "yarn pwt explore-bundle -p examples/with-server",
"build:with-server-example": "export NODE_OPTIONS=--openssl-legacy-provider && yarn pwt build -p examples/with-server",
"watch:with-server-example": "export NODE_OPTIONS=--openssl-legacy-provider && yarn pwt watch server -p examples/with-server",
"explore-bundle:with-server-example": "export NODE_OPTIONS=--openssl-legacy-provider && yarn pwt explore-bundle -p examples/with-server",
"~~~ simple-ssr ~~~": "",
"build:simple-ssr-example": "yarn pwt build -p examples/simple-ssr",
"watch:simple-ssr-example": "yarn pwt watch server -p examples/simple-ssr",
Expand Down Expand Up @@ -109,6 +109,7 @@
"tslib": "^2.6.2",
"typescript": "^5.4.2",
"typescript-log": "^2.0.0",
"util": "^0.12.5",
"webpack": "^5.0.0"
},
"version": "0.0.0"
Expand Down
3 changes: 3 additions & 0 deletions packages/cli/src/config/webpack.base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ export function baseConfig(options: CreateWebpackConfigOptions): webpack.Configu
'@project-watchtower/runtime',
'@project-watchtower/server',
],
fallback: {
util: require.resolve('util/')
}
},
}
}
7 changes: 4 additions & 3 deletions packages/runtime/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
"description": "",
"keywords": [],
"scripts": {},
"dependencies": {},
"devDependencies": {},
"peerDependencies": {}
"dependencies": {
"@babel/runtime": "7.12.18"
},
"devDependencies": {}
}
Loading

0 comments on commit 6040047

Please sign in to comment.