I just tried to migrate my project from BabylonJS 3.2 to BabylonJS 4.0.
I used npm install @babylonjs/core to install the latest version of babylon and then imported the modules I needed and tried to build my project. Then I got the error below:
C:\Users\GB\Desktop\MyProject\node_modules@babylonjs\core\index.js:1
export * from “./abstractScene”;
^
ParseError: ‘import’ and ‘export’ may appear only with ‘sourceType: module’
Warning: Error running grunt-browserify. Use --force to continue.
I do not think it would work with browserify as is as es6 imports might not be recognized. You would need to first transpile then browserify. Knowing babylon is already mostly browser focus and no node syntax need to be translated i would recommend using a bundler like webpack or rollup or parcel in order to create your code which my be simpler to configure than babel + browserify.