From b694b0543cd2cf07c6b36e0b89f6200141c423d2 Mon Sep 17 00:00:00 2001 From: Matteo V Date: Tue, 14 Mar 2017 12:21:12 +0100 Subject: [PATCH] fixed themes loader error (#1552) --- themes.js | 2 +- webpack.config.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/themes.js b/themes.js index ac04f327c1..5c112d63fe 100644 --- a/themes.js +++ b/themes.js @@ -12,7 +12,7 @@ const themeEntries = () => { var files = glob.sync(globPath); return files.reduce((res, curr) => { var finalRes = res || {}; - finalRes["themes/" + path.basename(curr, path.extname(curr))] = `${curr}/theme.less`; + finalRes["themes/" + path.basename(curr, path.extname(curr))] = path.join(__dirname, "web", "client", "themes", `${path.basename(curr, path.extname(curr))}`, "theme.less"); return finalRes; }, {}); diff --git a/webpack.config.js b/webpack.config.js index bcdc5d7b87..effa737849 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -53,7 +53,7 @@ module.exports = { }, { test: /\.less$/, - exclude: /themes\/.+\.less$/, + exclude: /themes[\\\/]?.+\.less$/, use: [{ loader: 'style-loader' }, { @@ -63,7 +63,7 @@ module.exports = { }] }, { - test: /themes\/.+\.less$/, + test: /themes[\\\/]?.+\.less$/, use: extractThemesPlugin.extract({ fallback: 'style-loader', use: ['css-loader', 'less-loader']