vagran / dxf-viewer

DXF 2D viewer written in JavaScript
Mozilla Public License 2.0
290 stars 86 forks source link

Module parse failed #86

Closed jayantpaliwal closed 5 months ago

jayantpaliwal commented 9 months ago

dxf-viewer/src/DxfViewer.js 834:60 Module parse failed: Unexpected token (834:60) You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file.

  **const material = materialFactory.call(this.viewer, this.viewer._TransformColor(color),
                                          instanceBatch?.GetInstanceType() ?? InstanceType.NONE)**

{ "three": "^0.155.0" }

vagran commented 9 months ago

If you are targeting an old JS version, see example repository for Babel example. Make sure null coalescing operator and optional chaining is enabled in Babel config. Also ensure the library is transpiled in Vue config.