Move worker into webpack build #494

Closed
opened 2021-09-07 22:15:38 +02:00 by Irev-Dev · 0 comments
Irev-Dev commented 2021-09-07 22:15:38 +02:00 (Migrated from github.com)

The jscad worker code was hosted as a static asset, making it odd javascript where we have to be conscious of what javascript features we can use and if it will work on older browsers, plus it can't be typescript like the rest of the codebase.

Since redwood 0.36 we using webpack 5 should make loading workers easy
https://webpack.js.org/guides/web-workers/
But I had trouble with this (see: https://community.redwoodjs.com/t/has-anyone-tried-workers-with-webpack-5-rw0-36-x/2394)
and instead used the webpack 4 loader without any issues

This issue relates to #411 , and is a checklist item on #444

The jscad worker code was hosted as a static asset, making it odd javascript where we have to be conscious of what javascript features we can use and if it will work on older browsers, plus it can't be typescript like the rest of the codebase. Since redwood 0.36 we using webpack 5 should make loading workers easy https://webpack.js.org/guides/web-workers/ But I had trouble with this (see: https://community.redwoodjs.com/t/has-anyone-tried-workers-with-webpack-5-rw0-36-x/2394) and instead used the webpack 4 loader without any issues This issue relates to #411 , and is a checklist item on #444
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: h3n3/cadhub#494