1

I use the lib js-aruco which is browser only. Thats why I try to shim that lib. I do it this way:

module.exports = require('exports-loader?CV!../js-aruco/src/cv.js')

In the bundle I can see the libraray included - but the module.exports = CV is missing. However - a similar case is working:

module.exports = require('imports-loader?CV=./cv.js!exports-loader?AR!../js-aruco/src/aruco.js')

Here I can see the export. Ofc this code fails because it requires CV do be loaded correctly which is not the case.

The modules I require directly from my entry point are loaded correctly with the export loader. However, when using the export-loader with cv.js which is used by ar.js which is then incuded in my entry it just gets ignored.

The loader is not executed.

So my question: Why is the exports-loader not executed?

PS: My webpack config is the simplest one can imagine. Only entry and output

Fuzzyma
  • 7,619
  • 6
  • 28
  • 60

0 Answers0