Advertisement
Guest User

Untitled

a guest
Nov 18th, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import webpack from "webpack";
  2. const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
  3.  
  4. const PurgecssPlugin = require("purgecss-webpack-plugin");
  5. const glob = require("glob-all");
  6. const path = require("path");
  7. require("dotenv").config();
  8.  
  9. module.exports = {
  10.     dev: true,
  11.     mode: "universal",
  12.     server: {
  13.         port: 8080, // default: 3000
  14.         host: "0.0.0.0" // default: localhost
  15.     },
  16.     /*
  17.         ** Headers of the page
  18.         */
  19.     head: {
  20.         title: "HIDDEN",
  21.         meta: [
  22.         ],
  23.         link: [
  24.             {rel: "icon", type: "image/x-icon", href: "/favicon.ico"},
  25.             {rel: "apple-touch-icon", sizes: "57x57", href: "/apple-icon-57x57.png"},
  26.             {rel: "apple-touch-icon", sizes: "60x60", href: "/apple-icon-60x60.png"},
  27.             {rel: "apple-touch-icon", sizes: "72x72", href: "/apple-icon-72x72.png"},
  28.             {rel: "apple-touch-icon", sizes: "76x76", href: "/apple-icon-76x76.png"},
  29.             {rel: "apple-touch-icon", sizes: "114x114", href: "/apple-icon-114x114.png"},
  30.             {rel: "apple-touch-icon", sizes: "120x120", href: "/apple-icon-120x120.png"},
  31.             {rel: "apple-touch-icon", sizes: "144x144", href: "/apple-icon-144x144.png"},
  32.             {rel: "apple-touch-icon", sizes: "152x152", href: "/apple-icon-152x152.png"},
  33.             {rel: "apple-touch-icon", sizes: "180x180", href: "/apple-icon-180x180.png"},
  34.             {rel: "icon", type: "image/png", sizes: "192x192", href: "/android-icon-192x192.png"},
  35.             {rel: "icon", type: "image/png", sizes: "32x32", href: "/favicon-32x32.png"},
  36.             {rel: "icon", type: "image/png", sizes: "96x96", href: "/favicon-96x96.png"},
  37.             {rel: "icon", type: "image/png", sizes: "16x16", href: "/favicon-16x16.png"},
  38.             {
  39.                 rel: "stylesheet",
  40.                 href:
  41.                     "https://fonts.googleapis.com/css?family=Roboto+Condensed:300i,400,400i,700%7cMarcellus+SC|Material+Icons"
  42.             }
  43.         ]
  44.     },
  45.  
  46.     /*
  47.         ** Customize the progress-bar color
  48.         */
  49.     loading: {
  50.         color: "#e08821"
  51.     },
  52.  
  53.     /*
  54.         ** Global CSS
  55.         */
  56.     css: [
  57.         "~/../node_modules/@fortawesome/fontawesome-free/css/fontawesome.css",
  58.         "~/../node_modules/@fortawesome/fontawesome-free/css/solid.css",
  59.         "~/../node_modules/@fortawesome/fontawesome-free/css/regular.css",
  60.         "~/../node_modules/bootstrap/dist/css/bootstrap.min.css",
  61.     ],
  62.  
  63.     /*
  64.         ** Plugins to load before mounting the App
  65.         */
  66.     plugins: [
  67.         "~/plugins/web3.js",
  68.         "~/plugins/bootstrap.js",
  69.         {src: "~/plugins/vue-slider-component.js", ssr: false},
  70.         {src: "~/plugins/vue-3d-model.js", ssr: false},
  71.         {src: "~/plugins/vue-videobg.js", ssr: false},
  72.         {src: "~/plugins/chart", ssr: false},
  73.     ],
  74.  
  75.     /*
  76.         ** Nuxt.js modules
  77.         */
  78.     modules: [
  79.         "@nuxtjs/dotenv",
  80.         '@nuxtjs/style-resources',
  81.         ['@nuxtjs/google-analytics', {
  82.             id: 'HIDDEN'
  83.         }]
  84.     ],
  85.  
  86.     styleResources: {
  87.         scss: ['./src/assets/scss/variables.scss', './node_modules/bootstrap/scss/_functions.scss', './node_modules/bootstrap/scss/_variables.scss', './node_modules/bootstrap/scss/_mixins.scss'],
  88.     },
  89.  
  90.     /*
  91.         ** Build configuration
  92.         */
  93.     build: {
  94.         optimization: {
  95.             minimize: false
  96.         },
  97.         // optimizeCSS: true,
  98.         // parallel: true,
  99.         plugins: [
  100.             // set shortcuts as global for bootstrap
  101.             new webpack.ProvidePlugin({
  102.                 $: "jquery",
  103.                 jQuery: "jquery",
  104.                 "window.jQuery": "jquery",
  105.             }),
  106.             // new BundleAnalyzerPlugin(),
  107.         ],
  108.         postcss: [
  109.             require("autoprefixer")({
  110.                 browsers: ["last 2 versions"]
  111.             }),
  112.             require("postcss-pxtorem")({
  113.                 propList: ["*"]
  114.             })
  115.         ],
  116.         /*
  117.                 ** Run ESLint on save
  118.                 */
  119.         extend(config, {isDev, isClient}) {
  120.             if (isDev && isClient) {
  121.             }
  122.             if (!isDev) {
  123.                 // Remove unused CSS using purgecss. See https://github.com/FullHuman/purgecss
  124.                 // for more information about purgecss.
  125.                 config.plugins.push(
  126.                     new PurgecssPlugin({
  127.                         paths: glob.sync([
  128.                             path.join(__dirname, "./pages/**/*.vue"),
  129.                             path.join(__dirname, "./layouts/**/*.vue"),
  130.                             path.join(__dirname, "./components/**/*.vue")
  131.                         ]),
  132.                         whitelist: ["html", "body"]
  133.                     })
  134.                 );
  135.             }
  136.         }
  137.     },
  138.     srcDir: "src/",
  139.     rootDir: "./"
  140. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement