CottageCabbage / vu-dooit

Task Manager application for Web, Desktop and Mobile. Still in development
https://CottageCabbage.github.io/vu-dooit
3 stars 1 forks source link

Installing and configuring UI Library #3

Closed CottageCabbage closed 2 years ago

CottageCabbage commented 2 years ago

Can still change libraries since still haven't managed to use this, but decided to use Element Plus. Am having difficulty in configurating it though.

See https://element-plus.org/en-US/guide/quickstart.html#on-demand-import and https://element-plus.org/en-US/guide/quickstart.html#manually-import

Both options require adding code to either Vite or Webpack config files. Vu-dooit has neither of those.

Under the 'on-demand import' they link the following though:

For more bundlers (Rollup, Vue CLI) and configs please reference unplugin-vue-components and unplugin-auto-import.

CottageCabbage commented 2 years ago

'Manualing import' also links to

But you need install unplugin-element-plus for style import. And refer to the docs for how to configure it.

May also work.

CottageCabbage commented 2 years ago

Haven't managed to make either plugin work, but managed to work around.

Plugin was supposed to make only the first line of

import { ElButton } from 'element-plus'
import 'element-plus/es/components/button/style/css'

Didn't manage to get that going, but using the second line seems to fix it though.

A downside is that I have to find the right folder under node_modules for every component.

I'm not closing the issue yet since the solution sucks this such, but will make do with it for now

CottageCabbage commented 2 years ago

If it becomes too anoying, just https://element-plus.org/en-US/guide/quickstart.html#full-import

Can worry about the bundle-size later on.