You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

laravel-vite-plugin

Package Overview
Dependencies
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

laravel-vite-plugin

Laravel plugin for Vite.


Version published
Weekly downloads
290K
increased by6.74%
Maintainers
1
Created
Weekly downloads
 

Package description

What is laravel-vite-plugin?

The laravel-vite-plugin npm package is designed to integrate Vite with Laravel applications. It provides a seamless way to manage and build frontend assets using Vite's fast and modern build tool, while leveraging Laravel's backend capabilities.

What are laravel-vite-plugin's main functionalities?

Vite Configuration

This feature allows you to configure Vite to work with Laravel. The code sample shows how to define the Vite configuration and use the laravel-vite-plugin to specify the input files and enable hot module replacement.

```javascript
import { defineConfig } from 'vite';
import laravel from 'laravel-vite-plugin';

export default defineConfig({
  plugins: [
    laravel({
      input: ['resources/css/app.css', 'resources/js/app.js'],
      refresh: true,
    }),
  ],
});
```

Hot Module Replacement (HMR)

This feature enables Hot Module Replacement (HMR) for a better development experience. The code sample shows how to configure the Vite server to use HMR with the laravel-vite-plugin.

```javascript
import { defineConfig } from 'vite';
import laravel from 'laravel-vite-plugin';

export default defineConfig({
  plugins: [
    laravel({
      input: ['resources/css/app.css', 'resources/js/app.js'],
      refresh: true,
    }),
  ],
  server: {
    hmr: {
      host: 'localhost',
    },
  },
});
```

Asset Versioning

This feature allows for asset versioning, which helps in cache busting. The code sample shows how to enable the generation of a manifest file during the build process, which can be used for versioning assets.

```javascript
import { defineConfig } from 'vite';
import laravel from 'laravel-vite-plugin';

export default defineConfig({
  plugins: [
    laravel({
      input: ['resources/css/app.css', 'resources/js/app.js'],
      refresh: true,
    }),
  ],
  build: {
    manifest: true,
  },
});
```

Other packages similar to laravel-vite-plugin

Readme

Source

Laravel Vite Plugin

Build Status Total Downloads Latest Stable Version License

Introduction

Vite is a modern frontend build tool that provides an extremely fast development environment and bundles your code for production.

This plugin configures Vite for use with a Laravel backend server.

Official Documentation

Documentation for the Laravel Vite plugin can be found on the Laravel website.

Contributing

Thank you for considering contributing to the Laravel Vite plugin! The contribution guide can be found in the Laravel documentation.

Code of Conduct

In order to ensure that the Laravel community is welcoming to all, please review and abide by the Code of Conduct.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

License

The Laravel Vite plugin is open-sourced software licensed under the MIT license.

Keywords

FAQs

Package last updated on 09 Jul 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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc