Skip to content

Commit 255ab9e

Browse files
committed
🐛 Fix demo page #1
Changed webpack config and select right template. Bug was that webpack picked the output html as template and therefore with every build it appended the css and js files to the old ones.
1 parent 289d08b commit 255ab9e

11 files changed

+11
-27
lines changed

build/webpack.prod.conf.js

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ var webpackConfig = merge(baseWebpackConfig, {
4646
filename: process.env.NODE_ENV === 'testing'
4747
? 'docs/index.html'
4848
: config.build.index,
49-
template: 'docs/index.html',
49+
template: 'index.html',
5050
inject: true,
5151
minify: {
5252
removeComments: true,
@@ -81,22 +81,4 @@ var webpackConfig = merge(baseWebpackConfig, {
8181
]
8282
})
8383

84-
if (config.build.productionGzip) {
85-
var CompressionWebpackPlugin = require('compression-webpack-plugin')
86-
87-
webpackConfig.plugins.push(
88-
new CompressionWebpackPlugin({
89-
asset: '[path].gz[query]',
90-
algorithm: 'gzip',
91-
test: new RegExp(
92-
'\\.(' +
93-
config.build.productionGzipExtensions.join('|') +
94-
')$'
95-
),
96-
threshold: 10240,
97-
minRatio: 0.8
98-
})
99-
)
100-
}
101-
10284
module.exports = webpackConfig

docs/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<!DOCTYPE html><html><head><meta charset=utf-8><title>vue-parallax</title><link href=static/css/app.5ed04f35a1b1deee6150d449cd676dc6.css rel=stylesheet><link href=static/css/app.5ed04f35a1b1deee6150d449cd676dc6.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=static/js/manifest.4ac0130b3fcc1f370942.js></script><script type=text/javascript src=static/js/vendor.99d285bbfb9efba6402c.js></script><script type=text/javascript src=static/js/app.02bb4239d4896e9a5c8c.js></script><script type=text/javascript src=static/js/manifest.0b17759194217f01efd8.js></script><script type=text/javascript src=static/js/vendor.533130804e527ac1039f.js></script><script type=text/javascript src=static/js/app.0bc71fdf62ce5918a9ff.js></script></body></html>
1+
<!DOCTYPE html><html><head><meta charset=utf-8><title>vue-parallax</title><link href=/static/css/app.5ed04f35a1b1deee6150d449cd676dc6.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=/static/js/manifest.a869ddbfbe64902b9233.js></script><script type=text/javascript src=/static/js/vendor.533130804e527ac1039f.js></script><script type=text/javascript src=/static/js/app.4eed5bdb25ebe223978a.js></script></body></html>

docs/static/js/app.0bc71fdf62ce5918a9ff.js.map

Lines changed: 0 additions & 1 deletion
This file was deleted.

docs/static/js/app.0bc71fdf62ce5918a9ff.js renamed to docs/static/js/app.4eed5bdb25ebe223978a.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/static/js/app.4eed5bdb25ebe223978a.js.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/static/js/manifest.0b17759194217f01efd8.js

Lines changed: 0 additions & 2 deletions
This file was deleted.

docs/static/js/manifest.a869ddbfbe64902b9233.js

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/static/js/manifest.0b17759194217f01efd8.js.map renamed to docs/static/js/manifest.a869ddbfbe64902b9233.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/App.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
<template>
22
<div id="app">
3-
<div style="background-color: #fff; height: 100vh;"></div>
3+
<div style="background-color: #fff; height: 100vh;">
4+
<h1 style="margin-top: 0; padding-top: 20px;">Scroll down ⬇</h1>
5+
</div>
46
<div style="position: relative; z-index: 9999; background-color: #fff;">
57
<h1 style="margin:0;">Parallax Effect</h1>
68
<parallax>

static/img/pexels-photo-196416.jpeg

163 KB
Loading

static/img/pexels-photo-241307.jpeg

152 KB
Loading

0 commit comments

Comments
 (0)