Comments (7)
It might be upstream issue: unocss/unocss#2938
from anu.
This is resolved in the upstream now. It was related to Nuxt. Removing the lock file so the package manager would get the latest packages will fix the issues.
An unrelated question, do you know if Unocss or Nuxt can generate only the necessary css for each page?
So the css code for Btn (for example) which is not used in the current page but is used in the other pages will not be loaded?
from anu.
Unocss or Nuxt can generate only the necessary css for each page
Yes, #197
When btn will be used for the first time, UnoCSS will only load the style at that time
If you don't get this behavior let me know.
from anu.
Ok so i made a barebones project to test this. You can find it here.
https://github.com/yooneskh/repro-anu-nuxt
(It is different than the one above)
It is basically these files.
// nuxt.config.js
export default defineNuxtConfig({
vue: {
defineModel: true,
},
modules: [
'@anu-vue/nuxt',
'@unocss/nuxt',
],
});
// uno.config.js
import { defineConfig } from 'unocss';
export default defineConfig({
include: [
/.*\/anu-vue\.js(.*)?$/,
'./**/*.vue',
'./**/*.md',
],
});
// app.vue
<script setup>
</script>
<template>
<nuxt-page />
</template>
// pages/index.vue
<script setup>
</script>
<template>
<p>Hello</p>
</template>
You can view it live here
https://repro-anu-nuxt.vercel.app/
The important issue is that both the styles and the js bundle for all components are loaded. You can view its source, but basically, in this js bundle https://repro-anu-nuxt.vercel.app/_nuxt/entry.6f577059.js you can find all components (try searching for "ABtn" and "AList" and so on), and in this css bundle https://repro-anu-nuxt.vercel.app/_nuxt/entry.de0e007d.css you can find styles for all components.
Note that this happens while nothing is used.
Do you have any idea on what's wrong?
from anu.
Hi there @jd-solanki
sorry to ping you, did you have the time to look at this?
from anu.
Sorry @yooneskh I was on holidays was busy with other things lately. I'm planning to move to Python community in near future. However, I'll try to resolve this issue and pending issue for sure ππ»
Maybe in next two week I'll be able to resolve this.
Thanks for your interest. Would like to contribute to this? We can move this repo to org for others to contribute.
from anu.
@jd-solanki oh happy holidays!
Sure i will love to contribute. I have lots of ideas to improve anu.
from anu.
Related Issues (20)
- feat: chip closable advance HOT 2
- [docs] Components such as Select and Radio in the document cannot interact HOT 1
- svelte support HOT 1
- nuxt - anu-vue/volar HOT 3
- update vueuse peerDependencies
- WARN [unocss] include option is deprecated, use content.pipeline.include instead. HOT 2
- Tabs border does not respond to window size change HOT 1
- [unocss] include option is deprecated, use content.pipeline.include instead. But, I didn't use include.
- Colors broken with UnoCSS v0.57 HOT 7
- Have a Bug in the switch component? HOT 3
- typescript types errorοΌ HOT 2
- π€Ήπ»ββοΈ Framework stability in Vue Ecosystem & my vision HOT 6
- update vue peerDependencies HOT 1
- How the selection box sets the properties of the display HOT 1
- [Select] Feature request: Groups for the select element
- v1
- List component unusable with TypeScript HOT 4
- ADatatable : event on clicked / hovered
- Style conflict vitepress HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from anu.