diff --git a/docs/index.html b/docs/index.html
index 729cb29b..6fe44f94 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -1,69 +1,18 @@
-
-
-
- vidl
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Install the Chrome extension. Easily download from
- any page by clicking the extension icon, or configure
- shortcuts at chrome://extensions/shortcuts
-
-
-
-
-
\ No newline at end of file
+Html Webpack Plugin:
+
+ TypeError: Cannot read property 'hash' of undefined
+
+ - index.pug:74
+ /Users/kasp/dev/vidl/website/src/index.pug:74:4184
+
+ - index.pug:74 template
+ /Users/kasp/dev/vidl/website/src/index.pug:74:4290
+
+ - index.js:284 Promise.resolve.then
+ [website]/[html-webpack-plugin]/index.js:284:18
+
+
+ - next_tick.js:188 process._tickCallback
+ internal/process/next_tick.js:188:7
+
+
\ No newline at end of file
diff --git a/website/src/index.pug b/website/src/index.pug
index 597edb07..d06778cc 100644
--- a/website/src/index.pug
+++ b/website/src/index.pug
@@ -4,7 +4,7 @@ html
title vidl
link(href="https://fonts.googleapis.com/css?family=Rubik:400", rel="stylesheet")
// css
- link(rel="stylesheet", type="text/css", href="/global.css")
+ link(rel="stylesheet", type="text/css", href="global.css§HASH§")
// better mobile
meta(name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0")
// chrome extension
@@ -52,4 +52,4 @@ html
| Install the Chrome extension. Easily download from
| any page by clicking the extension icon, or configure
| shortcuts at chrome://extensions/shortcuts
- script(src="/global.js")
+ script(src="global.js§HASH§")
diff --git a/website/webpack.config.js b/website/webpack.config.js
index 4315ad03..77d78c14 100644
--- a/website/webpack.config.js
+++ b/website/webpack.config.js
@@ -3,8 +3,11 @@ const webpack = require("webpack");
const ExtractTextPlugin = require("extract-text-webpack-plugin");
const HtmlWebpackPlugin = require("html-webpack-plugin");
const CopyWebpackPlugin = require("copy-webpack-plugin");
+
const config = require("./config");
+const hash = "?"+Math.random().toString(36).substr(2, 5);
+
module.exports = (env) => {
let ifProd = true;
let ifDev = false;
@@ -75,12 +78,13 @@ module.exports = (env) => {
use: {
loader: "pug-loader",
query: {
- pretty: !(ifProd && config.minify)
+ pretty: !(ifProd && config.minify),
}
}
},
{
- test: /\.js$/,
+ test: /(\.js|\.pug|\.sass)$/,
+ exclude: /node_modules/,
loader: 'string-replace-loader',
options: {
multiple: [
@@ -89,6 +93,7 @@ module.exports = (env) => {
{flags: "g", search: "§VIDL_URL_PROD§", replace: config.VIDL_URL_PROD},
{flags: "g", search: "§VIDL_DL_URL_DEV§", replace: config.VIDL_DL_URL_DEV},
{flags: "g", search: "§VIDL_DL_URL_PROD§", replace: config.VIDL_DL_URL_PROD},
+ {flags: "g", search: "§HASH§", replace: hash},
]
}
},
@@ -108,8 +113,7 @@ module.exports = (env) => {
}
arr.push(
new HtmlWebpackPlugin({
- // hash: ifDev,
- hash: true,
+ hash: false,
inject: false,
template: "./src/index.pug",
filename: "index.html",