Closed geotheory closed 3 years ago
That error is just trying to load a source map to the originally code (which is written in typescript), so you can ignore it. I'm not sure if there's a better way to bundle it to not have those errors when used in the way you're using it but the .map
file is totally optional and is only there to help debug code. It isn't an actual dependency for using tidy, it is just specified as a comment at the end to help debuggers:
//# sourceMappingURL=tidy.min.js.map
You can just delete that last line in your local file and it'll go away without issues. Nevermind, you're using unpkg... in this case I'd say you can just ignore it. Perhaps it should be published without the source map in the UMD version to avoid this issue
Cool thanks for the tip :)
I'm building a static app (no Node) and planned to run a local version of tidy.min.js (plus its d3 dependency), so I cloned the file at
<script src="https://www.unpkg.com/@tidyjs/tidy/dist/umd/tidy.min.js"></script>
and call locally. But encountered the error:And it turns out there is a file at https://www.unpkg.com/@tidyjs/tidy@2.0.5/dist/umd/tidy.min.js.map which specifies a number of .ts files e.g:
Is tidy.min.js.map an actual dependency? I'm not a javascript dev by background so may be breaking some best practice by cloning as I have.