nuxt.config.js 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. export default {
  2. mode: 'spa',
  3. /*
  4. ** Headers of the page
  5. */
  6. head: {
  7. title: process.env.npm_package_name || '',
  8. meta: [
  9. { charset: 'utf-8' },
  10. { name: 'viewport', content: 'width=device-width, initial-scale=1' },
  11. { hid: 'description', name: 'description', content: process.env.npm_package_description || '' }
  12. ],
  13. link: [
  14. { rel: 'icon', type: 'image/x-icon', href: 'favicon.ico' }
  15. ]
  16. },
  17. /*
  18. ** Customize the progress-bar color
  19. */
  20. loading: { color: '#fff' },
  21. /*
  22. ** Global CSS
  23. */
  24. css: [
  25. ],
  26. /*
  27. ** Plugins to load before mounting the App
  28. */
  29. plugins: [
  30. ],
  31. /*
  32. ** Nuxt.js dev-modules
  33. */
  34. buildModules: [
  35. ],
  36. /*
  37. ** Nuxt.js modules
  38. */
  39. modules: [
  40. ],
  41. /*
  42. ** Build configuration
  43. */
  44. build: {
  45. /*
  46. ** You can extend webpack config here
  47. */
  48. extend (config, ctx) {
  49. // this is optional; optimization for webpack lazy loading
  50. if (!ctx.isDev && ctx.isClient) {
  51. const tauriConfig = require('./src-tauri/tauri.conf.json')
  52. if (!tauriConfig.tauri.embeddedServer.active) {
  53. const TauriRequirePlugin = require('@tauri-apps/tauri-webpack/plugins/tauri-require').plugin
  54. config.plugins.push(new TauriRequirePlugin())
  55. }
  56. }
  57. }
  58. },
  59. router: {
  60. middleware: 'tauri'
  61. }
  62. }