I got this webpack error after the update from v4.2 to v5.0 ModuleNotFoundError: Module not found: Error: Can't resolve './abstractScene ' in 'path\node_modules\@babylonjs\core' Did you mean 'abstractScene.js'? BREAKING CHANGE: The request './abstractScene' failed to resolve only because it was resolved as fully specified (probably because the origin is a '*.mjs' file or a '*.js' file where the packag e.json contains '"type": "module"'). The extension in the request is mandatory for it to be fully specified. Add the extension to the request.
I am new to webpack I am not sure what does that means? Version 4.2.0 was working fine before the update, is there anything I need to change in webpack config or package.json to get it working?
Since babylon.js doesn’t reference the full path of the files it is importing (i.e. the missing .js), webpack needs to be notified it needs to resolve inports differently. To fix that you can set the following flag in your webpack configuration: