emaphp / underscore-template-loader

A Underscore and Lodash template loader for Webpack
MIT License
104 stars 24 forks source link

Adding support for macros through `this.query` #39

Closed devlinjunker closed 4 years ago

devlinjunker commented 4 years ago

Attempted to add my own macros with webpack 4.43.0 and webpack-dev-server 3.10.3

Faced issues with this.options not being defined in the loader, according to the webpack documentation the option are available under this.query: https://webpack.js.org/api/loaders/#thisquery

see https://github.com/devlinjunker/template.webpack.fend/pull/22/files#diff-11e9f7f953edc64ba14b0cc350ae7b9dR162 for the implementation where it is not working (unless we add this fix)

emaphp commented 4 years ago

Added through #36. Check v1.1. Does that work for you?

devlinjunker commented 4 years ago

@emaphp installed v1.1 and it works great! Thanks!