Failed to minify

55 views
Skip to first unread message

war...@cheetham.email

unread,
Dec 5, 2017, 9:08:40 PM12/5/17
to JSTS devs
Hi 

I'm trying to import Coordinate into a fresh create-react-app project. The code runs fine in dev mode but when packaging the build using Webpack and Uglify (built into create-react-app) I get a minification error:

Import
import Coordinate from 'jsts/org/locationtech/jts/geom/Coordinate'


The result after running npm run build

Failed to minify the code from this file:

        ./node_modules/jsts/extend.js:2 

I can successfully import the entire jsts library as below, but I'd rather import the individual files

 import * as jsts from 'jsts/dist/jsts'

I'm very new to ES6 and node so any help would be greatly appreciated.
Reply all
Reply to author
Forward
0 new messages