aboutsummaryrefslogtreecommitdiff
path: root/viewer/vue.config.js
blob: 3bb56e50b11846823731246e673b933d57cf8549 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
module.exports = {
  pluginOptions: {
    i18n: {
      locale: "en",
      fallbackLocale: "en",
      localeDir: "locales",
      enableInSFC: false,
    },
  },
  productionSourceMap: false,
  devServer: {
    port: 8085,
    serveIndex: true,
    before: (app, server, compiler) => {
      app.get("/gallery/*", (req, res) => {
        const fs = require("fs");
        const fileName = req.url.replace(/^\/gallery/, "../example");
        const file = fs.readFileSync(fileName);
        res.end(file);
      });
    }
  }
};