Closed LIKEADOGANDCAT closed 3 years ago
How did you get this error? Actually there are loaders configured here: https://github.com/vagran/dxf-viewer-example-src/blob/master/babel.config.js
and here: https://github.com/vagran/dxf-viewer-example-src/blob/0b16e6fa5365b4896e0c03e26ed428fa27b4b91c/vue.config.js#L5
Running npm run build
should work.
@LIKEADOGANDCAT yes, if you use dxf-viewer in your own project, you need add transpileDependencies
in your webpack config file, because ??
is new operator in es2020
How did you get this error? Actually there are loaders configured here: https://github.com/vagran/dxf-viewer-example-src/blob/master/babel.config.js and here:
Running
npm run build
should work. My project is a React project,I 'm not sure it has a 'transpileDependencies',,,I think it's unique to VUE projects.Then what should I do to use dxf-viewer in my REACT(umi) project?
fixed in a new react project :) 3q
./node_modules/dxf-viewer/src/DxfViewer.js 764:60 Module parse failed: Unexpected token (764:60) 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 | | const material = materialFactory.call(this.viewer, this.viewer._TransformColor(color),