Skip to content

Commit

Permalink
feat: remove root option
Browse files Browse the repository at this point in the history
BREAKING CHANGE: The root option was never documented, so it's very unlikely that this is actually a breaking change. However, since the option was removed, we need to flag this as breaking.
  • Loading branch information
jhnns committed Mar 17, 2017
1 parent 24a6f66 commit 39ad4f8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/createWebpackLessPlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const trailingSlash = /[\\/]$/;
* @param {string=} root
* @returns {LessPlugin}
*/
function createWebpackLessPlugin(loaderContext, root) {
function createWebpackLessPlugin(loaderContext) {
const resolve = pify(loaderContext.resolve.bind(loaderContext));
const loadModule = pify(loaderContext.loadModule.bind(loaderContext));

Expand All @@ -22,7 +22,7 @@ function createWebpackLessPlugin(loaderContext, root) {
}

loadFile(filename, currentDirectory /* , options, environment */) { // eslint-disable-line class-methods-use-this
const moduleRequest = loaderUtils.urlToRequest(filename, root);
const moduleRequest = loaderUtils.urlToRequest(filename);
// Less is giving us trailing slashes, but the context should have no trailing slash
const context = currentDirectory.replace(trailingSlash, '');
let resolvedFilename;
Expand Down
2 changes: 1 addition & 1 deletion src/getOptions.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function getOptions(loaderContext) {
options.filename = loaderContext.resource;

// It's safe to mutate the array now because it has already been cloned
options.plugins.push(createWebpackLessPlugin(loaderContext, options.root));
options.plugins.push(createWebpackLessPlugin(loaderContext));

return options;
}
Expand Down

0 comments on commit 39ad4f8

Please sign in to comment.