You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
a while ago, the option to have insertInto as a function instead of a string was added to the style-loader. And this is exactly what I needed - and it works great. Then I tried using this with /useable, and I noticed that in index.js we have this:
which makes the correct body of the function be included in the bundle,
while in the useable we have this:
" dispose = require(" + loaderUtils.stringifyRequest(this, "!" + path.join(__dirname, "lib", "addStyles.js")) + ")(content, " + JSON.stringify(options) + ");",
which will omit the insertInto function.
Is there a particularity of the /useable that makes the usage with the insertInto (function) impossible?
The text was updated successfully, but these errors were encountered:
mvoica
changed the title
style-loader/useable
style-loader/useable: passing insertInto through options
Jun 11, 2018
a while ago, the option to have insertInto as a function instead of a string was added to the style-loader. And this is exactly what I needed - and it works great. Then I tried using this with /useable, and I noticed that in index.js we have this:
if (typeof options.insertInto === "function") {
insertInto = options.insertInto.toString();
}
...
"options.insertInto = " + insertInto + ";",
"var update = require(" + loaderUtils.stringifyRequest(this, "!" + path.join(__dirname, "lib", "addStyles.js")) + ")(content, options);",
which makes the correct body of the function be included in the bundle,
while in the useable we have this:
" dispose = require(" + loaderUtils.stringifyRequest(this, "!" + path.join(__dirname, "lib", "addStyles.js")) + ")(content, " + JSON.stringify(options) + ");",
which will omit the insertInto function.
Is there a particularity of the /useable that makes the usage with the insertInto (function) impossible?
The text was updated successfully, but these errors were encountered: