gkjohnson / three-mesh-bvh

A BVH implementation to speed up raycasting and enable spatial queries against three.js meshes.
https://gkjohnson.github.io/three-mesh-bvh/example/bundle/raycast.html
MIT License
2.38k stars 247 forks source link

a syntex error in index.js when import from 'three-mesh-bvh' #668

Closed em3ai closed 1 month ago

em3ai commented 1 month ago

when i import from three-mesh-bvh, there is a syntex error: "export * as BVHShaderGLSL from './gpu/BVHShaderGLSL.js';" this statement is not standard.

The log is as follows: Module parse failed: Unexpected token (12:9) 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 | export from './gpu/VertexAttributeTexture.js'; | export from './utils/StaticGeometryGenerator.js';

export * as BVHShaderGLSL from './gpu/BVHShaderGLSL.js'; | | // backwards compatibility

gkjohnson commented 1 month ago

export * as ... is perfectly legal syntax in javascript. If it's not working please check your bundler settings or report it to the bundler project.