https://github.com/eik-lib/vite-plugin
Wrapper around the Eik rollup plugin to make it slightly more ergonomic to use in Vite
https://github.com/eik-lib/vite-plugin
Last synced: 2 months ago
JSON representation
Wrapper around the Eik rollup plugin to make it slightly more ergonomic to use in Vite
- Host: GitHub
- URL: https://github.com/eik-lib/vite-plugin
- Owner: eik-lib
- License: mit
- Created: 2024-12-17T12:25:16.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2026-02-01T16:55:08.000Z (5 months ago)
- Last Synced: 2026-02-01T23:37:55.740Z (5 months ago)
- Language: JavaScript
- Size: 568 KB
- Stars: 0
- Watchers: 4
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# @eik/vite-plugin
[Vite](https://vite.dev/) plugin for [build-time import mapping with Eik](https://eik.dev/docs/guides/vite).
This is a small wrapper around the [Rollup plugin](https://github.com/eik-lib/rollup-plugin) to make it slightly more ergonomic to use in Vite.
## Installation
```bash
npm install --save-dev vite @eik/vite-plugin
```
## Usage
```js
import eik from "@eik/vite-plugin";
import { defineConfig } from "vite";
export default defineConfig({
plugins: [eik()],
build: {
rollupOptions: {
output: {
// Turn off the asset hashes. Stable file names
// make it easier to use the Eik node client:
// https://github.com/eik-lib/node-client
// Publishinig a new version on Eik gives a
// unique URL, no hash needed.
assetFileNames: "[name].[ext]",
entryFileNames: "[name].js",
chunkFileNames: "[name].js",
},
},
},
});
```
## Options
The options you can give to `eik()` are the same as for the Rollup plugin.
Refer to [the Rollup plugin documentation](https://github.com/eik-lib/rollup-plugin?tab=readme-ov-file#options) to see what you can do.