Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const path = require('path')
- const webpack = require('webpack')
- require('dotenv').config({
- silent: true,
- path: process.env.NODE_ENV === 'production' ? '.prod.env' : '.dev.env'
- })
- module.exports = {
- build: {
- extractCSS: true,
- vendor: ['vuetify', 'jwt-decode', 'axios'],
- plugins: [
- new webpack.ProvidePlugin({
- 'tinymce': 'tinymce',
- })
- ]
- },
- loaders: [
- {
- test: require.resolve('tinymce'),
- loader: 'expose-loader?tinyMCE!expose-loader?$'
- }
- ],
- buildDir: 'dist/client',
- cache: true,
- css: [
- { src: 'vuetify/dist/vuetify.min.css', lang: 'css' },
- { src: '~/assets/style/custom.css', lang: 'css' },
- { src: '~/assets/style/main.css', lang: 'css' },
- 'tinymce/skins/lightgray/skin.min.css',
- 'tinymce/skins/lightgray/content.min.css'
- ],
- env: {
- HOST: process.env.HOST,
- PORT: process.env.PORT
- },
- head: {
- title: 'ucimba',
- meta: [
- { charset: 'utf-8' },
- { name: 'viewport', content: 'width=device-width, initial-scale=1' },
- { hid: 'description', name: 'description', content: 'Nuxt.js project' }
- ],
- link: [
- { rel: 'stylesheet', href: 'https://fonts.googleapis.com/css?family=Roboto:300,400,500,700|Material+Icons' }
- ]
- },
- manifest: {
- name: 'ucimba',
- description: 'Edukacija',
- theme_color: '#188269'
- },
- modules: [
- '@nuxtjs/pwa',
- '@nuxtjs/component-cache'
- ],
- plugins: ['~/plugins/vuetify.js',
- { src: '~/plugins/vue-googlemaps.js', ssr: false },
- { src: '~/plugins/dropzone.js', ssr: false },
- '~/plugins/scroll-to.js',
- { src: '~/plugins/affix.js', ssr: false },
- { src: '~/plugins/tinymce.js', ssr: false }
- ],
- render: {
- static: {
- maxAge: '1y',
- setHeaders (res, path) {
- if (path.includes('sw.js')) {
- res.setHeader('Cache-Control', 'public, max-age=0')
- }
- }
- }
- },
- router: {
- middleware: ['ssr-cookie', 'https']
- },
- srcDir: path.resolve(__dirname, 'src', 'client')
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement