nuxt.config.js 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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-analytics',
  35. '~/plugins/vue-isyourpasswordsafe',
  36. '~/plugins/vue-timeago'
  37. ],
  38. serverMiddleware: [
  39. { path: '/', handler: serveStatic(path.join(__dirname, 'uploads')) }
  40. ],
  41. css: [],
  42. build: {
  43. extractCSS: true,
  44. postcss: [
  45. autoprefixer
  46. ]
  47. }
  48. };