Closed josephahern closed 6 years ago
And today I learn of exports loader!
Here is the solution:
npm install exports-loader
const Lethargy = require("exports-loader?this.Lethargy!lethargy/lethargy");
@josephahern Thanks for this. I will add a note in the README.md
!
this.Lethargy!../node_modules/lethargy/lethargy.js)
Module build failed (from ../node_modules/exports-loader/dist/cjs.js):
ValidationError: Invalid options object. Exports Loader has been initialized using an options object that does not match the API schema.
- options misses the property 'exports'.
For exports-loader 2, this syntax seems to work. const Lethargy = require('exports-loader?type=commonjs&exports=single|this.Lethargy!lethargy/lethargy');
Hi,
I am attempting to use your plugin with webpack and am using this way:
But I am running into the following issue:
when I use require, I get the following:
Is there a preferred / suggested way of including into a project?