unplugin-rescript
v0.0.4
Published
a plugin for integration ReScript with most Bundler (Vite, Rollup, Webpack, Esbuild, etc).
Downloads
6
Maintainers
Readme
Install
npm i unplugin-rescript
yarn add unplugin-rescript
pnpm add unplugin-rescript
bun add unplugin-rescript
Usage
Example:
playground/
// vite.config.ts
import ReScript from 'unplugin-rescript/vite'
export default defineConfig({
plugins: [
ReScript(),
],
})
// farm.config.ts
import ReScript from 'unplugin-rescript/farm'
export default defineconfig({
plugins: [
ReScript(),
],
})
// rspack.config.js
module.exports = {
/* ... */
plugins: [
require('unplugin-rescript/rspack')()
]
}
// rollup.config.js
import ReScript from 'unplugin-rescript/rollup'
export default {
plugins: [
ReScript(),
],
}
// webpack.config.js
module.exports = {
/* ... */
plugins: [
require('unplugin-rescript/webpack')()
]
}
// esbuild.config.js
import { build } from 'esbuild'
import ReScript from 'unplugin-rescript/esbuild'
build({
plugins: [ReScript()],
})
// astro.config.mjs
import { defineConfig } from 'astro/config'
import ReScript from 'unplugin-rescript/astro'
build({
plugins: [ReScript()],
})
Compatibility
🔭 Troubleshooting
❤️ Credits
Inspired by