Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

stimulus-vite-helpers

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

stimulus-vite-helpers

Vite.js helpers for the Stimulus JavaScript framework

  • 3.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
64K
increased by22.17%
Maintainers
1
Weekly downloads
 
Created
Source

stimulus-vite-helpers

Helpers to easily load all your Stimulus controllers when using Vite.js


This plugin was extracted out of Jumpstart Rails with Vite.js, a starter template that you can use to start your next Rails app.

If you are looking for a simple way to integrate Vite.js in Rails, check out vite_rails.

If you would like to enable HMR for your Stimulus controllers, check out vite-plugin-stimulus-hmr.

Installation 💿

npx ni stimulus-vite-helpers

Usage 🚀

You can now register your Stimulus controllers using Vite's import.meta.glob and the registerControllers helper:

import { Application } from 'stimulus'
import { registerControllers } from 'stimulus-vite-helpers'

const application = Application.start()
const controllers = import.meta.glob('./**/*_controller.js', { eager: true })
registerControllers(application, controllers)

For more information, check the Stimulus handbook.

Special Thanks

  • Stimulus

License

This library is available as open source under the terms of the MIT License.

Keywords

FAQs

Package last updated on 02 Feb 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc