crow1796

Untitled

Mar 18th, 2020
168
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const webpack = require('webpack')
  2.  
  3. module.exports = {
  4.   mode: 'universal',
  5.   server: {
  6.     port: 3333
  7.   },
  8.   /*
  9.    ** Headers of the page
  10.    */
  11.   head: {
  12.     title: process.env.npm_package_name || '',
  13.     meta: [
  14.       { charset: 'utf-8' },
  15.       {
  16.         name: 'viewport',
  17.         content: 'width=device-width,initial-scale=1,viewport-fit=cover'
  18.       },
  19.       {
  20.         hid: 'description',
  21.         name: 'description',
  22.         content: process.env.npm_package_description || ''
  23.       }
  24.     ],
  25.     link: [{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }]
  26.   },
  27.   /*
  28.    ** Customize the progress-bar color
  29.    */
  30.   loading: { color: '#fff' },
  31.   /*
  32.    ** Global CSS
  33.    */
  34.   css: ['~/assets/css/tailwind.css', '~/resources/scss/main.scss'],
  35.   /*
  36.    ** Plugins to load before mounting the App
  37.    */
  38.   plugins: [
  39.     '~/plugins/axios.js',
  40.     '~/plugins/firebase.js',
  41.     '~/plugins/check_user.js',
  42.     '~/plugins/prototypes.js',
  43.     '~/plugins/external-installs.js'
  44.   ],
  45.   /*
  46.    ** Nuxt.js modules
  47.    */
  48.   modules: [
  49.     // Doc: https://axios.nuxtjs.org/usage
  50.     '@nuxtjs/axios',
  51.     '@nuxtjs/pwa',
  52.     [
  53.       'nuxt-fontawesome',
  54.       {
  55.         imports: [
  56.           {
  57.             set: '@fortawesome/free-solid-svg-icons',
  58.             icons: ['fas']
  59.           },
  60.           ,
  61.           {
  62.             set: '@fortawesome/free-regular-svg-icons',
  63.             icons: ['far']
  64.           },
  65.           {
  66.             set: '@fortawesome/free-brands-svg-icons',
  67.             icons: ['fab']
  68.           }
  69.         ]
  70.       }
  71.     ],
  72.     [
  73.       'nuxt-env',
  74.       {
  75.         keys: [
  76.           { key: 'GOOGLE_API', default: null }
  77.         ]
  78.       }
  79.     ],
  80.     '@nuxtjs/universal-storage'
  81.   ],
  82.   storage: {
  83.     cookie: {
  84.       prefix: 'abc:'
  85.     },
  86.     localStorage: {
  87.       prefix: 'abc:'
  88.     }
  89.   },
  90.   /*
  91.    ** Axios module configuration
  92.    ** See https://axios.nuxtjs.org/options
  93.    */
  94.   axios: {},
  95.   /*
  96.    ** Build configuration
  97.    */
  98.   build: {
  99.     extractCSS: true,
  100.     postcss: {
  101.       plugins: {
  102.         tailwindcss: './tailwind.config.js'
  103.       }
  104.     },
  105.     /*
  106.      ** You can extend webpack config here
  107.      */
  108.     extend(config, { isDev, isClient }) {
  109.       if (isClient) {
  110.         config.module.rules.push({
  111.           test: /\.worker\.js$/,
  112.           use: { loader: 'worker-loader' },
  113.           exclude: /(node_modules)/
  114.         })
  115.       }
  116.     },
  117.     plugins: [
  118.       new webpack.ProvidePlugin({
  119.         $: 'jquery',
  120.         _: 'lodash'
  121.       })
  122.     ]
  123.   }
  124. }
RAW Paste Data