spatialillusions / milsymbol

Military Symbols in JavaScript
www.spatialillusions.com/milsymbol
MIT License
544 stars 133 forks source link

I can't reach librarie in IIS #237

Closed vmbajop closed 4 years ago

vmbajop commented 4 years ago

I need to probe milsymbol 2.0 but I only receive errors from libraries. First, I'm not using node.js, I am using an application running on IIS. I had unzip milsymbol 2.0 directly in wwwroot/milsymbol. When I set the library source in html with http://server.local/milsymbol/src/milsymbol.js, I only receive an error in milsymbol.js line 4: "unexpected token {". It doesn't matter if a use relative path, or basolute with http or https, or if I use it in the same folder as app. In consecuence, it is impossible for me to reach milsym librarie.

spatialillusions commented 4 years ago

The library is built to be used with NPM or Yarn like listed in the documentation. Otherwise you will have to build it manually using the build script. Another solution would be using it as a ES6 module by using the index.esm.js in the root folder, you can find an example of using it as a ES6 module in https://github.com/spatialillusions/milsymbol/tree/master/examples/es6-import.