diff --git a/src/vector/index.html b/src/vector/index.html
index 73cdd2df..1895cc6b 100644
--- a/src/vector/index.html
+++ b/src/vector/index.html
@@ -20,14 +20,20 @@
- <% for(var i=0; i
-
- <% } %>
+ <% for (var i=0; i < htmlWebpackPlugin.files.css.length; i++) {
+ var file = htmlWebpackPlugin.files.css[i];
+ if (file.match(/^theme-(?!light\.)/)) {
+ %>
+
+ <% } else { %>
+
+ <% }
+ } %>
- <% for(var i=0; i
+ <% for (var i=0; i < htmlWebpackPlugin.files.js.length; i++) {%>
<% } %>
diff --git a/src/vector/index.js b/src/vector/index.js
index 64b87698..0d254202 100644
--- a/src/vector/index.js
+++ b/src/vector/index.js
@@ -30,7 +30,6 @@ require('babel-polyfill');
// CSS requires: just putting them here for now as CSS is going to be
// refactored "soon" anyway
-require('../../build/dark.scss');
require('gemini-scrollbar/gemini-scrollbar.css');
require('gfm.css/gfm.css');
require('highlight.js/styles/github.css');
diff --git a/webpack.config.js b/webpack.config.js
index 1f2a8a60..e05f877a 100644
--- a/webpack.config.js
+++ b/webpack.config.js
@@ -15,6 +15,10 @@ module.exports = {
// point, so that it doesn't block the pageload, but that is a separate
// problem)
"olm": "./src/vector/olm-loader.js",
+
+ // CSS themes
+ "theme-light": "./build/light.scss",
+ "theme-dark": "./build/dark.scss",
},
module: {
preLoaders: [