vue.js - Nuxt 构建的结果是中断
问题描述
我已经尝试使用 Nuxt generate 构建 Nuxt 并且 Nuxt 构建那些没有正确构建的,当我在 dev 中使用时,它看起来像是中断,它工作得很好,但是在我构建并运行它之后,第 3 方组件和 css 根本不起作用,这是因为我的nuxt.conf.js
错吗??我以前问过这个,但还没有解决,
这是我的nuxt.config.js
export default {
mode: 'universal',
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 || ''
}
],
script: [
{
src: 'https://kit.fontawesome.com/d0ddd22222fa871ae5.js',
crossorigin: 'anonymous'
}
],
link: [
{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' },
{
rel: 'stylesheet',
href:
'https://fonts.googleapis.com/css?family=Noto+Sans:400,400i,700&display=swap'
},
{
rel: 'stylesheet',
href: 'https://fonts.googleapis.com/css?family=Quando&display=swap'
},
{
rel: 'stylesheet',
href: 'https://fonts.googleapis.com/css?family=Palanquin&display=swap'
}
]
},
/*
** Customize the progress-bar color
*/
loading: { color: '#fff' },
/*
** Global CSS
*/
css: [
'@/assets/css/main.css',
'@/assets/css/input.css',
'@/assets/css/animate.css'
],
plugins: [
{ src: '@/plugins/agile.js', mode: 'client' },
{ src: '@/plugins/model-gltf.js', mode: 'client'},
],
router: {
middleware: ['router'],
},
buildModules: [
],
modules: [
'bootstrap-vue/nuxt',
'@nuxtjs/axios'
],
axios: {
baseURL: "http://myapi"
},
build: {
vendor: ['vue-agile', 'vue-3d-model'],
extend(config, ctx) {
}
}
}
有人可以在这里节省我的时间吗
解决方案
推荐阅读
- java - Java Spring MongoDB 存储库接口
- kubernetes - 是否可以在 KubeletConfiguration 中将 RotateCertificates 设置为 false
- arrays - 替换 this.state 中的 Array 元素
- python-3.x - Tkinter - 如何在条目中使用波兰字体
- python - 在列表框中显示 sql 查询的结果时去掉括号(Tkinter 和 Python)
- python - 使用文件输入替换文件中的模式时找不到文件
- memory - 在 QEMU/VFIO 环境中跟踪 PCI 设备内存 I/O 操作
- javascript - 如何将键值对添加到对象
- c# - asp.net 核心身份跟踪用户打开会话
- fortran - 在 GDB 中为 Fortran 可执行文件设置数据断点?