From 172b11c888451d565131812cf90f5bdae1d00575 Mon Sep 17 00:00:00 2001 From: Krisztian Horvath Date: Mon, 14 Nov 2016 22:17:03 +0100 Subject: [PATCH] [Fix for Webpack 2 Beta 26+] Explicitly declare inferred loaders by their full name (#464) * In Webpack 2 loaders have to be explicitly declared, the "-loader" part of their name is no longer implied. --- lib/loader.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/loader.js b/lib/loader.js index 3cc485045..ac16b2667 100644 --- a/lib/loader.js +++ b/lib/loader.js @@ -149,12 +149,12 @@ module.exports = function (content) { // unknown lang, infer the loader to be used switch (type) { case 'template': - return defaultLoaders.html + '!' + templateLoaderPath + '?raw&engine=' + lang + '!' + return defaultLoaders.html + '!' + templateLoaderPath + '?raw-loader&engine=' + lang + '!' case 'styles': loader = addCssModulesToLoader(defaultLoaders.css, part, index) - return loader + '!' + rewriter + lang + '!' + return loader + '!' + rewriter + lang + '-loader!' case 'script': - return injectString + lang + '!' + return injectString + lang + '-loader!' } } }