zappar-xr / zappar-react-three-fiber

Our SDK for the 3D rendering platform React-Three-Fiber.
MIT License
60 stars 9 forks source link

NextJS and webpack 5 support #22

Open albusphan opened 3 years ago

albusphan commented 3 years ago

Is your feature request related to a problem? Please describe. I tried to bootstrap the project with create-next-app. I use the rules in the doc, but keep return error when start the project.

Screen Shot 2021-08-31 at 16 45 39

Describe the solution you'd like After research, I see the the webpack/lib/SingleEntryPluginis remove on webpack 5, so could you update the dependencies of the lib to compatible with webpack 5.

thefilmmaking commented 2 years ago

any updates on potential support for this?

danielvella commented 2 years ago

Did anyone ever manage to get this working by any chance, please? I'm facing a similar issue on a brand new project setup of NextJS@12.2.0.

I'm getting the following error Error: Cannot find module 'worker-loader!./worker'. It seems to be coming from @zappar/zappar-cv, but can't figure out how to solve it. Any help would be greatly appreciated. I can also attach the whole project if it helps.

Screenshot from 2022-07-06 17-48-03

activeguild commented 1 year ago

@danielvella

This may be due to the failure to bundle the WORKER. Can you solve this problem by using the following plugin? https://www.npmjs.com/package/worker-plugin

I am using it with vite, but the worker was not pre-built, so I used a plugin to solve the problem. https://github.com/activeguild/vite_zappar/blob/5ea1e4e90241d06ef38740b3613fb94095d08cb9/vite.config.ts#L13

I would be happy to help you with a solution.

couch4 commented 1 year ago

+1