Open Flyingbeanss opened 8 months ago
I consulted the configuration tutorial in here.But when I tried to import it, something went wrong.
My code
import initOpenCascade from "opencascade.js"; initOpenCascade().then(oc => { // Check out the examples on how to use this library! });
Error
Maybe there is something wrong in the next.config.js? My config
/** @type {import('next').NextConfig} */ module.exports = { transpilePackages: ['three'], webpack: (config, { isServer }) => { config.module.rules.push({ test: /\.wasm$/, type: "javascript/auto", loader: "file-loader" }); config.resolve.fallback = { ...config.resolve.fallback, fs: false, perf_hooks: false, os: false, worker_threads: false, crypto: false, stream: false, }; return config; }, }
Can anyone help me? Thanks :).
I copy the config of config-overrides.js into the next.config.js, it worked! But I don't know why. Shouldn't next.js use webpack instead of create-react-app?
I consulted the configuration tutorial in here.But when I tried to import it, something went wrong.
My code
Error![image](https://github.com/donalffons/opencascade.js/assets/53996591/45b65b81-3010-46aa-b563-854a8c805bcd)
Maybe there is something wrong in the next.config.js? My config
Can anyone help me? Thanks :).