Skip to content

Commit

Permalink
[feat]: update rsbuild to 1.0 (#8)
Browse files Browse the repository at this point in the history
* feat: update Rsbuild to 1.1

* feat: replace .on with .connectWebSocket
  • Loading branch information
DominusKelvin authored Sep 10, 2024
1 parent 0495e84 commit ccd1b62
Show file tree
Hide file tree
Showing 3 changed files with 99 additions and 199 deletions.
7 changes: 3 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,9 @@ module.exports = function defineShipwrightHook(sails) {
const rsbuildDevServer = await rsbuild.createDevServer()
sails.after('hook:http:loaded', async () => {
sails.hooks.http.app.use(rsbuildDevServer.middlewares)
sails.hooks.http.server.on(
'upgrade',
rsbuildDevServer.onHTTPUpgrade
)
rsbuildDevServer.connectWebSocket({
server: sails.hooks.http.server
})
})
sails.on('lifted', async () => {
await rsbuildDevServer.afterListen()
Expand Down
Loading

0 comments on commit ccd1b62

Please sign in to comment.