nuxt.config.js 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. import dotenv from 'dotenv/config';
  2. import autoprefixer from 'autoprefixer';
  3. import serveStatic from 'serve-static';
  4. import path from 'path';
  5. export default {
  6. server: {
  7. port: process.env.WEBSITE_PORT
  8. },
  9. env: {
  10. version: process.env.npm_package_version,
  11. URL: process.env.DOMAIN,
  12. baseURL: `${process.env.DOMAIN}${process.env.ROUTE_PREFIX}`,
  13. serviceName: process.env.SERVICE_NAME,
  14. maxFileSize: process.env.MAX_SIZE,
  15. chunkSize: process.env.CHUNK_SIZE,
  16. maxLinksPerAlbum: process.env.MAX_LINKS_PER_ALBUM,
  17. publicMode: process.env.PUBLIC_MODE,
  18. userAccounts: process.env.USER_ACCOUNTS
  19. },
  20. srcDir: 'src/site/',
  21. head: {
  22. meta: [
  23. { charset: 'utf-8' },
  24. { name: 'viewport', content: 'width=device-width, initial-scale=1' }
  25. ],
  26. link: [
  27. { rel: 'stylesheet', href: 'https://fonts.googleapis.com/css?family=Nunito:300,400,600,700' }
  28. ]
  29. },
  30. plugins: [
  31. '~/plugins/vue-axios',
  32. '~/plugins/buefy',
  33. '~/plugins/v-clipboard',
  34. '~/plugins/vue-isyourpasswordsafe',
  35. '~/plugins/vue-timeago'
  36. ],
  37. serverMiddleware: [
  38. { path: '/', handler: serveStatic(path.join(__dirname, 'uploads')) }
  39. ],
  40. css: [],
  41. build: {
  42. extractCSS: true,
  43. postcss: [
  44. autoprefixer
  45. ]
  46. }
  47. };