代码拉取完成,页面将自动刷新
require('dotenv').config()
module.exports = {
mode: 'universal',
/*
** Headers of the page
*/
head: {
title: 'NinJa 个人博客',
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'
}],
script: [{
src: 'https://hm.baidu.com/hm.js?61f3439a13e697d14e685837fcc7e0a9'
}]
},
/*
** Customize the progress-bar color
*/
loading: {
color: '#999999',
height: '2px'
},
/*
** Global CSS
*/
css: [
'@/assets/css/index.scss',
'@/assets/css/global.scss',
'video.js/dist/video-js.css',
'@/assets/css/iconfont.css'
],
/*
** Plugins to load before mounting the App
*/
plugins: [
'@/plugins/element-ui',
'@/plugins/date-format',
{
src: '@/plugins/vue-markdown',
ssr: false
},
{
src: '@/plugins/video.js',
ssr: false
},
{
src: '@/plugins/baidu.js',
ssr: false
},
{
src: '@/plugins/iconfont.js',
ssr: false
}
],
/*
** Nuxt.js dev-modules
*/
buildModules: [],
/*
** Nuxt.js modules
*/
modules: [
// Doc: https://axios.nuxtjs.org/usage
'@nuxtjs/axios',
// Doc: https://github.com/nuxt-community/dotenv-module
'@nuxtjs/dotenv',
],
/*
** Axios module configuration
** See https://axios.nuxtjs.org/options
*/
axios: {},
/*
** Build configuration
*/
build: {
transpile: [/^element-ui/],
/*
** You can extend webpack config here
*/
optimization: {
splitChunks: {
minSize: 10000,
maxSize: 250000,
}
},
// maxChunkSize: 300000, //maxChunkSize分割文件大小
productionSourceMap: false, //不产生map文件
productionGzip: true, //开启gzip压缩
// productionGzipExtensions: ['js', 'css', 'svg'], //需要压缩的文件类型
// analyze: true,
babel: { // 按需加载
plugins: [
[
'component',
{
'libraryName': 'element-ui',
'styleLibraryName': 'theme-chalk'
}
]
]
},
extend(config, ctx) {}
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。