You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This library is not functional out of the box when using a modern setup like vite v5 and typescript v5 which impacts @ngageoint/grid-js and @ngageoint/mgrs-js usage. It looks like the js_cols dependency is improperly bundled which blows up on "Uncaught ReferenceError: js_cols is not defined"
Problem
This library is not functional out of the box when using a modern setup like vite v5 and typescript v5 which impacts @ngageoint/grid-js and @ngageoint/mgrs-js usage. It looks like the
js_cols
dependency is improperly bundled which blows up on "Uncaught ReferenceError: js_cols is not defined"I'm unsure why exactly this works in commonjs vs es modules + vite. Regardless,
js_cols
does not have a very robust bundle (see https://github.com/thomasstjerne/js_cols/blob/master/dist/js_cols.min.js).Ideal Solution
Shim or fix
js_cols
so that downstream users of libraries like@ngageoint/mgrs-js
don't have to.Steps to Reproduce
npm create vite@latest my-app -- --template vanilla-ts
index.html
in the body tagTemp Workaround
See below for my temp temp solution. This defines the
js_cols
variable on global scope. It's later overridden when the library is imported.Environment
The text was updated successfully, but these errors were encountered: