geotiffjs / geotiff.js

geotiff.js is a small library to parse TIFF files for visualization or analysis. It is written in pure JavaScript, and is usable in both the browser and node.js applications.
https://geotiffjs.github.io/
MIT License
878 stars 183 forks source link

Issue with Laravel Mix (Webpack) #311

Open iredmedia opened 2 years ago

iredmedia commented 2 years ago

I've included the project using yarn, I'm testing this in a project laravel-mix@4.1.4, but the output of each of my compiled CSS files are now empty.

If I use mix.extract('geotiff') I get the following:

module.exports = __webpack_require__(/! geotiff /"./node_modules/geotiff/dist-module/geotiff.js"); / (ignored) // (ignored) // (ignored) // (ignored) /

My package setup is fairly default, removing the import statement resolves the issue.

Any insights into this would be greatly appreciated!

constantinius commented 2 years ago

Hi @iredmedia

Due to the usage of WebWorkers, the packaging of geotiff.js is not as easy. Some time ago, we switched to rollup as a bundler, in favor of webpack (which I think Laravel Mix is a wrapper for).

So I don't quite know what the underlying issue now is, to be honest.