Closed Magvin closed 9 months ago
UPD: when i'm trying to do it via 'transpilePackages' in next.config.js in complains about three.js
I had the same issue, I resolved it by adding ecctrl to the transpilePackages in next.config.js.
Such as const nextConfig = { transpilePackages: ['three', 'ecctrl'], }
tried, three complains then. what version of Next you are using?
There.
"ecctrl": "^1.0.25", "next": "13.4.19", "three": "^0.156.1", "react": "18.2.0", "react-dom": "18.2.0",
What is three complaining about ?
đą I've encountered a similar issue when using the npm package with 'create-react-app.' However, when I run the package locally, everything works fine. I will take some time to figure this out and make the necessary adjustments. đ
@ecaii ah ok we are still on 13.2.4, This is issue is within nextjstranspilePackage
they have fixed it on 13.4v.
I think easier @ErdongChen-Andrew is just to ship dist folder fully compiled as npm module
Thanks @Magvin , I ended up generating different versions of the main file and publishing the dist folder. This resolved all the errors, and now everything works smoothly đ.
Legend thanks
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
As far I see
Ecctrl is not transpiled
Any suggestions, would be highly appreciated