gpx-parse
gpx-parse copied to clipboard
Cannot run with module bundler
I would like to use this library with a create-react-app application. However, when I import it, I get the following error:
Module not found: Error: Can't resolve './lib-cov/gpx-parse' in '/Users/me/js/jespr-web/node_modules/gpx-parse'
When I make the following change to index.js
, it works:
- module.exports = process.env.GPXPARSE_COV ? require('./lib-cov/gpx-parse') : require('./lib/gpx-parse');
+ module.exports = require('./lib/gpx-parse');
It seems like the require
statement is evaluated even then process.env.GPXPARSE_COV
is false. Can we remove this check?