Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/r17x/unplugin-rescript
a plugin for integration ReScript with most Bundler (Vite, Rollup, Webpack, Esbuild, etc).
https://github.com/r17x/unplugin-rescript
astro farm rescript rolldown rollup rspack unplugin vite webpack
Last synced: about 2 months ago
JSON representation
a plugin for integration ReScript with most Bundler (Vite, Rollup, Webpack, Esbuild, etc).
- Host: GitHub
- URL: https://github.com/r17x/unplugin-rescript
- Owner: r17x
- License: mit
- Archived: true
- Created: 2024-06-25T07:34:37.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-09-21T19:35:47.000Z (about 2 months ago)
- Last Synced: 2024-09-25T07:32:23.713Z (about 2 months ago)
- Topics: astro, farm, rescript, rolldown, rollup, rspack, unplugin, vite, webpack
- Language: ReScript
- Homepage:
- Size: 310 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
[MOVE HERE]unplugin-rescript
a plugin for integration ReScript with most Bundler (Vite, Rollup, Webpack, Esbuild, etc).
🚧 Status: Work in progress (Unstable) - TODO" 🚧
## Install
```bash
npm i unplugin-rescript
``````bash
yarn add unplugin-rescript
``````bash
pnpm add unplugin-rescript
``````bash
bun add unplugin-rescript
```## Usage
> Example: [`playground/`](./playground/)
Vite
```ts
// vite.config.ts
import ReScript from 'unplugin-rescript/vite'export default defineConfig({
plugins: [
ReScript(),
],
})
```Farm
```ts
// farm.config.ts
import ReScript from 'unplugin-rescript/farm'export default defineconfig({
plugins: [
ReScript(),
],
})
```Rspack
```ts
// rspack.config.js
module.exports = {
/* ... */
plugins: [
require('unplugin-rescript/rspack')()
]
}
```Rollup
```ts
// rollup.config.js
import ReScript from 'unplugin-rescript/rollup'export default {
plugins: [
ReScript(),
],
}
```
Webpack
```ts
// webpack.config.js
module.exports = {
/* ... */
plugins: [
require('unplugin-rescript/webpack')()
]
}
```
Esbuild
```ts
// esbuild.config.js
import { build } from 'esbuild'
import ReScript from 'unplugin-rescript/esbuild'build({
plugins: [ReScript()],
})
```
Astro
```ts
// astro.config.mjs
import { defineConfig } from 'astro/config'
import ReScript from 'unplugin-rescript/astro'build({
plugins: [ReScript()],
})
```
## Compatibility
## 🔭 Troubleshooting
## ❤️ Credits
Inspired by
* [jihchi/vite-plugin-rescript](https://github.com/jihchi/vite-plugin-rescript) - [@jihchi](https://github.com/jihchi)
* [unplugin/unplugin-starter](https://github.com/unplugin/unplugin-starter) - [@antfu](https://github.com/antfu)