Getting started
Installation
Prerequisites
- Node.js version 18 or higher.
- A package manager: e.g. npm, pnpm, ...
sh
$ npm add -D @ogs-gmbh/rolldown-plugin-assetssh
$ pnpm add -D @ogs-gmbh/rolldown-plugin-assetssh
$ yarn add -D @ogs-gmbh/rolldown-plugin-assetssh
$ bun add -D @ogs-gmbh/rolldown-plugin-assetsUsage
rolldown-plugin-assets can be integrated with either tsdown or Rolldown. Here's an example showing the usage of this plugin with tsdown. You can get a deeper understanding about this plugin by taking a look into the reference.
tsdown.config.ts
ts
import { defineConfig } from "tsdown";
import { assetsPlugin } from "@ogs-gmbh/rolldown-plugin-assets";
export default defineConfig({
entry: "src/**/*.ts",
dts: true,
outDir: "dist/main",
unbundle: true,
plugins: [assetsPlugin(["README.md", ["public/asset.png", "asset.png"]])]
});