Skip to content

Instantly share code, notes, and snippets.

@matthewp
Created September 12, 2019 18:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save matthewp/d5d558dc58f12a59728be2c2c0046afb to your computer and use it in GitHub Desktop.
Save matthewp/d5d558dc58f12a59728be2c2c0046afb to your computer and use it in GitHub Desktop.
export default {
mode: 'universal',
/*
** Headers of the page
*/
head: {
title: process.env.npm_package_name || '',
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
{ hid: 'description', name: 'description', content: process.env.npm_package_description || '' }
],
link: [
{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }
]
},
/*
** Customize the progress-bar color
*/
loading: { color: '#fff' },
/*
** Global CSS
*/
css: [
],
/*
** Plugins to load before mounting the App
*/
plugins: [
],
/*
** Nuxt.js dev-modules
*/
buildModules: [
],
/*
** Nuxt.js modules
*/
modules: [
],
/*
** Build configuration
*/
build: {
babel: {
presets(env, [ preset, { buildTarget } ]) {
const envConfigs = {
client: {
targets: { chrome: "66" },
exclude: [
"@babel/plugin-transform-regenerator",
// "@babel/plugin-transform-runtime"
]
},
modern: {
targets: { chrome: "66" },
exclude: [
"@babel/plugin-transform-regenerator",
// "@babel/plugin-transform-runtime"
]
},
server: {
targets: { node: "current" }
}
}
return [
[
"@nuxt/babel-preset-app",
envConfigs[buildTarget]
]
]
}
},
/*
** You can extend webpack config here
*/
extend (config, ctx) {
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment