primevue-quickstart-vite
Project setup
npm install
Compiles and hot-reloads for development
npm run dev
Compiles and minifies for production
npm run build
Starter application with Vite, Vue 3 and PrimeVue 3
npm install
npm run dev
npm run build
should be {{
"@vue/compiler-sfc": "3.1.5",
This dev dependency is not needed anymore.
See:
https://github.com/vuejs/vue-next/tree/master/packages/compiler-sfc
Following the instructions will result in an error on npm install
(bad primeicons version specified):
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/primeicons
npm ERR! primeicons@"^4.1.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer primeicons@"^5.0.0" from [email protected]
npm ERR! node_modules/primevue
npm ERR! primevue@"^3.8.2" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See /root/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2022-01-03T17_38_04_878Z-debug.log
It would be nice to see an example with SFC usage.
When trying to import a component as SFC, I have this issue/
HelloWorld.vue
<template>
<h1>{{ msg }}</h1>
<button @click="count++">count is: {{ count }}</button>
<p>Edit <code>components/HelloWorld.vue</code> to test hot module replacement.</p>
<Button label="submit"/>
</template>
<script>
import Button from 'primevue/button/Button.vue';
export default {
name: 'HelloWorld',
components: [ Button ],
props: {
msg: String
},
data() {
return {
count: 0
}
}
}
</script>
[vite] Failed to resolve module import "primevue/button/sfc". (imported by /src/components/HelloWorld.vue)
In the HelloWorld.vue file there is a missing opening brace "{":
<h6>{ state.count }}</h6>
should be <h6>{{ state.count }}</h6>
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.