diff options
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 | }; |