1 Star 0 Fork 0

NinJa427/blog-nuxt-web

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
nuxt.config.js 2.35 KB
一键复制 编辑 原始数据 按行查看 历史
NinJa427 提交于 2020-06-16 19:35 . 修改loading样式
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) {}
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/yq770770/blog-nuxt-web.git
[email protected]:yq770770/blog-nuxt-web.git
yq770770
blog-nuxt-web
blog-nuxt-web
master

搜索帮助