diff options
author | Zero~Informatique | 2019-12-21 08:08:54 +0100 |
---|---|---|
committer | Zero~Informatique | 2019-12-21 08:08:54 +0100 |
commit | 9e4fdd6f38853d8a4a959901ab7902569de75484 (patch) | |
tree | 3255e7fc08a6767ce8c333a42388f6398d2b460e /viewer/vue.config.js | |
parent | 40e8303d6b37a062754fdfbe824a153b8e5e2ddf (diff) | |
download | ldgallery-9e4fdd6f38853d8a4a959901ab7902569de75484.tar.gz |
viewer:
Implemented the "example" project in devServer
Display loader and error messages (not translated yet)
Created a "GalleryStore" to fetch the JSon data from the gallery (currently from example)
Diffstat (limited to 'viewer/vue.config.js')
-rw-r--r-- | viewer/vue.config.js | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/viewer/vue.config.js b/viewer/vue.config.js index 3f94880..3bb56e5 100644 --- a/viewer/vue.config.js +++ b/viewer/vue.config.js | |||
@@ -7,6 +7,17 @@ module.exports = { | |||
7 | enableInSFC: false, | 7 | enableInSFC: false, |
8 | }, | 8 | }, |
9 | }, | 9 | }, |
10 | |||
11 | productionSourceMap: false, | 10 | productionSourceMap: false, |
11 | devServer: { | ||
12 | port: 8085, | ||
13 | serveIndex: true, | ||
14 | before: (app, server, compiler) => { | ||
15 | app.get("/gallery/*", (req, res) => { | ||
16 | const fs = require("fs"); | ||
17 | const fileName = req.url.replace(/^\/gallery/, "../example"); | ||
18 | const file = fs.readFileSync(fileName); | ||
19 | res.end(file); | ||
20 | }); | ||
21 | } | ||
22 | } | ||
12 | }; | 23 | }; |