@inertia-volt/vite
TypeScript icon, indicating that this package has built-in type declarations

0.2.0-alpha • Public • Published

@inertia-volt/vite

A simple Vite plugin for stripping PHP tags from JavaScript components.

Installation

You can install the plugin using your preferred package manager.

npm install -D @inertia-volt/vite

Next, import the inertiaVolt plugin in your vite.config.js file and add it to the plugins section:

import inertiaVolt from '@inertia-volt/vite'

export default defineConfig({
    plugins: [
        inertiaVolt({
            path: 'resources/js/Pages', // Directory containing the components
            extension: 'vue' // Specify the file extension (e.g., vue, tsx, jsx, svelte)
        }),
    ],
});

The plugin searches for files within the specified path that match the .inertia.{extension} pattern. It then strips all valid PHP code from these files, leaving only the JavaScript component code.

Package Sidebar

Install

npm i @inertia-volt/vite

Weekly Downloads

26

Version

0.2.0-alpha

License

MIT

Unpacked Size

4.42 kB

Total Files

9

Last publish

Collaborators

  • hijhem