Created
April 12, 2018 22:25
-
-
Save syffs/245cc176b02e28d532d583448d33f682 to your computer and use it in GitHub Desktop.
ending up with 2MB+ server-bundle.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
head: { | |
title: 'foo', | |
meta: [ | |
{charset: 'utf-8'}, | |
{name: 'viewport', content: 'width=device-width, initial-scale=1'}, | |
{hid: 'description', name: 'description', content: 'foo website'} | |
], | |
link: [ | |
{rel: 'icon', type: 'image/x-icon', href: '/favicon.ico'} | |
] | |
}, | |
modules: [ | |
'@nuxtjs/markdownit', | |
'@nuxtjs/axios', | |
'@nuxtjs/auth', | |
'@nuxtjs/font-awesome', | |
['bootstrap-vue/nuxt', {css: false}] | |
], | |
markdownit: { | |
injected: true, | |
linkify: false, | |
html: false | |
}, | |
axios: { | |
proxy: true | |
}, | |
proxy: { | |
'/api': 'http://localhost:3000' | |
}, | |
css: [ | |
{src: '~/assets/scss/base.scss', lang: 'scss'}, | |
'foo-fontello/fontello.css' | |
], | |
build: { | |
vendor: [ | |
'vue-i18n', | |
'vue-slider-component' | |
], | |
extend (config, { isDev }) { | |
if (isDev && process.client) { | |
config.module.rules.push({ | |
enforce: 'pre', | |
test: /\.(js|vue)$/, | |
loader: 'eslint-loader', | |
exclude: /(node_modules)/ | |
}) | |
} | |
// Webpack transformToRequire | |
const vueLoader = config.module.rules.find((rule) => rule.loader === 'vue-loader') | |
vueLoader.options.transformAssetUrls = { | |
'b-card': 'img-src', | |
'thumbnail': 'src', | |
'b-img': 'src' | |
} | |
} | |
}, | |
router: { | |
middleware: 'i18n' | |
}, | |
plugins: [ | |
'~/plugins/i18n', | |
'~/plugins/globals', | |
'~/plugins/vue-components', | |
{ src: '~/plugins/vue-nossr-components', ssr: false }, | |
{ src: '~/plugins/vuex-persisted', ssr: false } | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment