He instalado PrimeVue usando NuxtJs , siguiendo el Wizard que tiene Nuxt para crear aplicaciones, (uso la version 3.4.1 de nuxt),
He seleccionado PrimeVue como framework de UI, pero veo que al entrar en la pagina, y cargar algun componente, como que ni el .css ni el componente en sí me carga, alguien ha creado un proyecto de nuxt js con el comando "npx create-nuxt-app myApp"? Veo que en mi proyecto tengo instalado PrimeVue y lo tengo agregado en el nuxt.config.js, pero no carga nada.
Package.json
Code: Select all
{
"name": "socialApp",
"version": "1.0.0",
"private": true,
"scripts": {
"dev": "nuxt",
"build": "nuxt build",
"start": "nuxt start",
"generate": "nuxt generate"
},
"dependencies": {
"@nuxtjs/axios": "^5.13.6",
"@nuxtjs/pwa": "^3.3.5",
"core-js": "^3.25.3",
"nuxt": "^2.15.8",
"primeflex": "^3.2.1",
"primeicons": "^6.0.1",
"primevue": "^2.10.1",
"vue": "^2.7.10",
"vue-server-renderer": "^2.7.10",
"vue-template-compiler": "^2.7.10"
}
}
Code: Select all
export default {
// Disable server-side rendering: https://go.nuxtjs.dev/ssr-mode
ssr: false,
// Global page headers: https://go.nuxtjs.dev/config-head
head: {
title: 'socialApp',
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
{ hid: 'description', name: 'description', content: '' },
{ name: 'format-detection', content: 'telephone=no' }
],
link: [
{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }
]
},
// Global CSS: https://go.nuxtjs.dev/config-css
css: [
'primeflex/primeflex.css'
],
// Plugins to run before rendering page: https://go.nuxtjs.dev/config-plugins
plugins: [],
// Auto import components: https://go.nuxtjs.dev/config-components
components: true,
// Modules for dev and build (recommended): https://go.nuxtjs.dev/config-modules
buildModules: [
],
// Modules: https://go.nuxtjs.dev/config-modules
modules: [
// Doc: https://www.primefaces.org/primevue/showcase-v2/#/setup
'primevue/nuxt',
// https://go.nuxtjs.dev/axios
'@nuxtjs/axios',
// https://go.nuxtjs.dev/pwa
'@nuxtjs/pwa',
],
// Axios module configuration: https://go.nuxtjs.dev/config-axios
axios: {
// Workaround to avoid enforcing hard-coded localhost:3000: https://github.com/nuxt-community/axios-module/issues/308
baseURL: '/',
},
// PWA module configuration: https://go.nuxtjs.dev/pwa
pwa: {
manifest: {
lang: 'en'
}
},
// Build Configuration: https://go.nuxtjs.dev/config-build
build: {
// https://github.com/primefaces/primevue/issues/844
transpile: ['primevue'],
}
}