npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

lime-elements-vue

v1.0.10

Published

Vue 3 wrapper for @limetech/lime-elements web components

Readme

lime-elements-vue

Vue 3 wrapper for @limetech/lime-elements web components.

Installation

npm install lime-elements-vue

Usage

1. Configure Vite (Required)

Add this to your vite.config.ts:

import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import { viteStaticCopy } from 'vite-plugin-static-copy'

export default defineConfig({
  plugins: [
    vue({
      template: {
        compilerOptions: {
          // Tell Vue that all tags with a hyphen are custom elements
          isCustomElement: (tag) => tag.includes('-')
        }
      }
    }),
    // Copy lime-elements ESM files to assets folder
    viteStaticCopy({
      targets: [
        {
          src: 'node_modules/@limetech/lime-elements/dist/esm/*',
          dest: 'assets/'
        }
      ]
    })
  ],
  optimizeDeps: {
    // Don't pre-bundle lime-elements to allow dynamic imports to work
    exclude: ['@limetech/lime-elements']
  }
})

Install the required plugin:

npm install -D vite-plugin-static-copy

2. Register the plugin globally

Important: Set resourcesUrl to match where you copied the files in your Vite config.

import { createApp } from 'vue'
import { LimeElementsVue } from 'lime-elements-vue'
import App from './App.vue'

const app = createApp(App)

// Match this to your viteStaticCopy dest path
app.use(LimeElementsVue, {
  resourcesUrl: '/assets/'  // Must match the 'dest' in viteStaticCopy config
})

app.mount('#app')

3. Use components in your templates

<template>
  <div>
    <limel-button label="Click me" @click="handleClick" />
    <limel-input-field v-model="value" label="Enter text" />
  </div>
</template>

<script setup lang="ts">
import { ref } from 'vue'

const value = ref('')

const handleClick = () => {
  console.log('Button clicked!')
}
</script>

Configuration Options

Development vs Production

  • Development: The default resourcesUrl points to /node_modules/@limetech/lime-elements/dist/ which works with Vite's dev server
  • Production: You must configure resourcesUrl to match where you copy the assets using vite-plugin-static-copy

Alternative: Copy to different location

If you prefer a different location:

// In vite.config.ts
viteStaticCopy({
  targets: [
    {
      src: 'node_modules/@limetech/lime-elements/dist/esm/*',
      dest: 'lime-elements/'  // Custom destination
    }
  ]
})

// In your app
app.use(LimeElementsVue, {
  resourcesUrl: '/lime-elements/'  // Must match!
})

Using a CDN

app.use(LimeElementsVue, {
  resourcesUrl: 'https://your-cdn.com/lime-elements/'
})

Available Components

This package provides Vue 3 wrappers for all lime-elements components. For detailed documentation on each component, please refer to the lime-elements documentation.

Troubleshooting

404 errors for component files

If you see 404 errors like GET http://localhost:xxxx/limel-checkbox.entry.js 404 (Not Found):

  1. Check your resourcesUrl - It must match the dest path in viteStaticCopy config
  2. Ensure you're copying the right files - Use dist/esm/* not just dist
  3. Include trailing slash - resourcesUrl: '/assets/' not /assets
  4. Configure Vite properly:
    • optimizeDeps.exclude: ['@limetech/lime-elements']
    • isCustomElement: (tag) => tag.includes('-')

Development mode 404 errors

For development, either:

  • Use the default (no resourcesUrl option) which points to /node_modules/@limetech/lime-elements/dist/
  • Or configure Vite's server to serve node_modules

License

MIT