@inlang/paraglide-js-adapter-vite
TypeScript icon, indicating that this package has built-in type declarations

1.2.40 • Public • Published

Paraglide Adapter Vite

This package provides a vite plugin to make it easier to use paraglide-js in any project that uses vite.

It automatically runs the compiler on message changes, giving you a seamless experience. You also no longer need the paraglide commands in your package.json.

Learn more about Paraglide

Usage

First make sure you have set up @inlang/paraglide-js. If you haven't you can get started by running this command and following the instructions.

npx @inlang/paraglide-js init

Install the vite adapter with

npm install @inlang/paraglide-js-adapter-vite

and add it to your vite.config.js

import { defineConfig } from "vite"
import { paraglide } from "@inlang/paraglide-js-adapter-vite"

export default defineConfig({
  plugins: [
    paraglide({
      project: "./project.inlang", //Path to your inlang project
      outdir: "./src/paraglide", //Where you want the generated files to be placed
    }),
  ],
})

Now, the paraglide folder at ./src/paraglide will be automatically updated when you change your messages.

Example

You can find an example vite project here.

Package Sidebar

Install

npm i @inlang/paraglide-js-adapter-vite

Weekly Downloads

5,429

Version

1.2.40

License

Apache-2.0

Unpacked Size

3.46 kB

Total Files

5

Last publish

Collaborators

  • inlangbot
  • samuelstroschein