open-index/open-npm huggingface dataset:
npm package: @rsbear/gp-schematic
Description: Generate your GraphQL schema from your Prisma schema.
Author: Ross Stevens
Latest version: 0.0.20

# GraphQL Prisma Schematic
Generate your GraphQL schema from your Prisma schema.

#### Why?
Maintaining a GraphQL schema is tedious and quite frankly pretty annoying. Generating full CRUD APIs isn't 
my speed as I feel they significantly muddy the schema. It's pretty clear that Prisma's schema syntax is 
inspired by GraphQL - why not parse that schema and create a basic GraphQL types next to it? So that's what this is, parse
the schema.prisma and create schema.graphql

#### Install as a dev dep.
```
yarn add --dev @rsbear/gp-schematic
```

#### Add this script to your `package.json` (please note the input and output flags and manage accordingly)
```
 "generate:schema": "node node_modules/@rsbear/gp-schematic/dist/index.js --input=prisma/schema.prisma --output=graphql/schema.graphql"
```

#### Run it.
```
yarn generate:schema
```

#### What about the schema being incomplete?
Use graphql-tools and concat the rest of everything you need.. I'll put up an example later
npm package: @rsbear/parmajean
Description: styled components definitely has it's limitations, gimme the freedom of easily adding css without making a component. really these are just some basic styling values and shorthands for easy dom styling
Author: rsbear
Latest version: 1.0.16

# parmajean

styled components definitely has it's limitations, gimme the freedom of easily adding css without making a component.
really these are just some basic styling values and shorthands for easy dom styling

using emotion as peer deps so to use this lib youll need those for sure
```
yarn add @rsbear/parmajean
yarn add @emotion/core

and if you please
yarn add @emotion/styled
```
npm package: @rsbind/object
Description: Node.js bindings to Rust object
Latest version: 0.1.2

# @rsbind/object

Node.js bindings to Rust [object](https://github.com/gimli-rs/object).

Currently, only a small set of APIs are exported.

## Installation

```n
npm i @rsbind/object
```

## Example

```js
const fs = require('fs')
const { File } = require('@rsbind/object')

const file = new File(fs.readFileSync(process.execPath))

console.log(file.symbols()[0])
// {
//   index: 0,
//   name: '__ZN4node10AsyncHooks18push_async_contextEddN2v85LocalINS1_6ObjectEEE',
//   address: 4294986000,
//   kind: 'Text'
// }
```

## API

See [index.d.ts](./index.d.ts)
npm package: @rsbuild/babel-preset
Description: The babel config of Rsbuild.
Latest version: 1.0.1-beta.1
Deprecated: deprecated

<p align="center">
  <a href="https://rsbuild.dev" target="blank"><img src="https://github.com/web-infra-dev/rsbuild/assets/7237365/84abc13e-b620-468f-a90b-dbf28e7e9427" alt="Rsbuild Logo" /></a>
</p>

# Rsbuild

The Rspack-based build tool. It's fast, out-of-the-box and extensible.

## Documentation

https://rsbuild.dev/

## Contributing

Please read the [Contributing Guide](https://github.com/web-infra-dev/rsbuild/blob/main/CONTRIBUTING.md).

## License

Rsbuild is [MIT licensed](https://github.com/web-infra-dev/rsbuild/blob/main/LICENSE).
npm package: @rsbuild/doctor-core
Description: <p align="center">   <a href="https://rsbuild.dev" target="blank"><img src="https://github.com/web-infra-dev/rsbuild/assets/7237365/84abc13e-b620-468f-a90b-dbf28e7e9427" alt="Rsbuild Logo" /></a> </p>
Latest version: 0.1.1
Deprecated: deprecated

<p align="center">
  <a href="https://rsbuild.dev" target="blank"><img src="https://github.com/web-infra-dev/rsbuild/assets/7237365/84abc13e-b620-468f-a90b-dbf28e7e9427" alt="Rsbuild Logo" /></a>
</p>

# Rsbuild

Unleash the power of Rspack with the out-of-the-box build tool.

## Documentation

https://rsbuild.dev/

## Contributing

Please read the [Contributing Guide](https://github.com/web-infra-dev/rsbuild/blob/main/CONTRIBUTING.md).

## License

Rsbuild is [MIT licensed](https://github.com/web-infra-dev/rsbuild/blob/main/LICENSE).
npm package: @rsbuild/doctor-rspack-plugin
Description: <p align="center">   <a href="https://rsbuild.dev" target="blank"><img src="https://github.com/web-infra-dev/rsbuild/assets/7237365/84abc13e-b620-468f-a90b-dbf28e7e9427" alt="Rsbuild Logo" /></a> </p>
Latest version: 0.1.1
Deprecated: deprecated

<p align="center">
  <a href="https://rsbuild.dev" target="blank"><img src="https://github.com/web-infra-dev/rsbuild/assets/7237365/84abc13e-b620-468f-a90b-dbf28e7e9427" alt="Rsbuild Logo" /></a>
</p>

# Rsbuild

Unleash the power of Rspack with the out-of-the-box build tool.

## Documentation

https://rsbuild.dev/

## Contributing

Please read the [Contributing Guide](https://github.com/web-infra-dev/rsbuild/blob/main/CONTRIBUTING.md).

## License

Rsbuild is [MIT licensed](https://github.com/web-infra-dev/rsbuild/blob/main/LICENSE).
npm package: @rsbuild/doctor-sdk
Description: <p align="center">   <a href="https://rsbuild.dev" target="blank"><img src="https://github.com/web-infra-dev/rsbuild/assets/7237365/84abc13e-b620-468f-a90b-dbf28e7e9427" alt="Rsbuild Logo" /></a> </p>
Latest version: 0.1.1
Deprecated: deprecated

<p align="center">
  <a href="https://rsbuild.dev" target="blank"><img src="https://github.com/web-infra-dev/rsbuild/assets/7237365/84abc13e-b620-468f-a90b-dbf28e7e9427" alt="Rsbuild Logo" /></a>
</p>

# Rsbuild

Unleash the power of Rspack with the out-of-the-box build tool.

## Documentation

https://rsbuild.dev/

## Contributing

Please read the [Contributing Guide](https://github.com/web-infra-dev/rsbuild/blob/main/CONTRIBUTING.md).

## License

Rsbuild is [MIT licensed](https://github.com/web-infra-dev/rsbuild/blob/main/LICENSE).
npm package: @rsbuild/doctor-types
Description: <p align="center">   <a href="https://rsbuild.dev" target="blank"><img src="https://github.com/web-infra-dev/rsbuild/assets/7237365/84abc13e-b620-468f-a90b-dbf28e7e9427" alt="Rsbuild Logo" /></a> </p>
Latest version: 0.1.1
Deprecated: deprecated

<p align="center">
  <a href="https://rsbuild.dev" target="blank"><img src="https://github.com/web-infra-dev/rsbuild/assets/7237365/84abc13e-b620-468f-a90b-dbf28e7e9427" alt="Rsbuild Logo" /></a>
</p>

# Rsbuild

Unleash the power of Rspack with the out-of-the-box build tool.

## Documentation

https://rsbuild.dev/

## Contributing

Please read the [Contributing Guide](https://github.com/web-infra-dev/rsbuild/blob/main/CONTRIBUTING.md).

## License

Rsbuild is [MIT licensed](https://github.com/web-infra-dev/rsbuild/blob/main/LICENSE).
npm package: @rsbuild/doctor-utils
Description: <p align="center">   <a href="https://rsbuild.dev" target="blank"><img src="https://github.com/web-infra-dev/rsbuild/assets/7237365/84abc13e-b620-468f-a90b-dbf28e7e9427" alt="Rsbuild Logo" /></a> </p>
Latest version: 0.1.1
Deprecated: deprecated

<p align="center">
  <a href="https://rsbuild.dev" target="blank"><img src="https://github.com/web-infra-dev/rsbuild/assets/7237365/84abc13e-b620-468f-a90b-dbf28e7e9427" alt="Rsbuild Logo" /></a>
</p>

# Rsbuild

Unleash the power of Rspack with the out-of-the-box build tool.

## Documentation

https://rsbuild.dev/

## Contributing

Please read the [Contributing Guide](https://github.com/web-infra-dev/rsbuild/blob/main/CONTRIBUTING.md).

## License

Rsbuild is [MIT licensed](https://github.com/web-infra-dev/rsbuild/blob/main/LICENSE).
npm package: @rsbuild/doctor-webpack-plugin
Description: <p align="center">   <a href="https://rsbuild.dev" target="blank"><img src="https://github.com/web-infra-dev/rsbuild/assets/7237365/84abc13e-b620-468f-a90b-dbf28e7e9427" alt="Rsbuild Logo" /></a> </p>
Latest version: 0.1.1
Deprecated: deprecated

<p align="center">
  <a href="https://rsbuild.dev" target="blank"><img src="https://github.com/web-infra-dev/rsbuild/assets/7237365/84abc13e-b620-468f-a90b-dbf28e7e9427" alt="Rsbuild Logo" /></a>
</p>

# Rsbuild

Unleash the power of Rspack with the out-of-the-box build tool.

## Documentation

https://rsbuild.dev/

## Contributing

Please read the [Contributing Guide](https://github.com/web-infra-dev/rsbuild/blob/main/CONTRIBUTING.md).

## License

Rsbuild is [MIT licensed](https://github.com/web-infra-dev/rsbuild/blob/main/LICENSE).
npm package: @rsbuild/document
Description: Shared documentation of Rsbuild
Latest version: 0.6.3
Deprecated: deprecated

<p align="center">
  <a href="https://rsbuild.dev" target="blank"><img src="https://github.com/web-infra-dev/rsbuild/assets/7237365/84abc13e-b620-468f-a90b-dbf28e7e9427" alt="Rsbuild Logo" /></a>
</p>

# Rsbuild

The Rspack-based build tool. It's fast, out-of-the-box and extensible.

## Documentation

https://rsbuild.dev/

## Contributing

Please read the [Contributing Guide](https://github.com/web-infra-dev/rsbuild/blob/main/CONTRIBUTING.md).

## License

Rsbuild is [MIT licensed](https://github.com/web-infra-dev/rsbuild/blob/main/LICENSE).
npm package: @rsbuild/plugin-babel
Description: Babel plugin for Rsbuild
Latest version: 1.1.2

# @rsbuild/plugin-babel

An Rsbuild plugin to use Babel to transpile the code.

<p>
  <a href="https://npmjs.com/package/@rsbuild/plugin-babel">
   <img src="https://img.shields.io/npm/v/@rsbuild/plugin-babel?style=flat-square&colorA=564341&colorB=EDED91" alt="npm version" />
  </a>
  <img src="https://img.shields.io/badge/License-MIT-blue.svg?style=flat-square&colorA=564341&colorB=EDED91" alt="license" />
  <a href="https://npmcharts.com/compare/@rsbuild/plugin-babel"><img src="https://img.shields.io/npm/dm/@rsbuild/plugin-babel.svg?style=flat-square&colorA=564341&colorB=EDED91" alt="downloads" /></a>
</p>

## Documentation

See [Documentation](https://rsbuild.rs/plugins/list/plugin-babel).

## License

[MIT](https://github.com/web-infra-dev/rsbuild/blob/main/LICENSE).
npm package: @rsbuild/plugin-basic-ssl
Description: Generate an untrusted, self-signed certificate for the HTTPS server.
Latest version: 1.2.2

# @rsbuild/plugin-basic-ssl

Generate an untrusted, self-signed certificate for the HTTPS server.

The Basic SSL plugin will automatically generate a self-signed certificate and set the [server.https](https://rsbuild.rs/config/server/https) option. When you visit the page, your browser will indicate that the certificate is not trusted. You can access the HTTPS page after manually confirming this.

<p>
  <a href="https://npmjs.com/package/@rsbuild/plugin-basic-ssl">
   <img src="https://img.shields.io/npm/v/@rsbuild/plugin-basic-ssl?style=flat-square&colorA=564341&colorB=EDED91" alt="npm version" />
  </a>
  <img src="https://img.shields.io/badge/License-MIT-blue.svg?style=flat-square&colorA=564341&colorB=EDED91" alt="license" />
</p>

## Usage

Install:

```bash
npm add @rsbuild/plugin-basic-ssl -D
```

Add plugin to your `rsbuild.config.ts`:

```ts
// rsbuild.config.ts
import { pluginBasicSsl } from "@rsbuild/plugin-basic-ssl";

export default {
  plugins: [pluginBasicSsl()],
};
```

Then visit the https URL of the page, and confirm in your browser.

## Options

### filename

Filename of the generated certificate.

- **Type:** `string`
- **Default:** `'fake-cert.pem'`
- **Example:**

```ts
pluginBasicSsl({
  filename: "foo.pem",
});
```

### outputPath

Output path of the generated certificate.

- **Type:** `string`
- **Default:** `__dirname`
- **Example:**

```ts
import path from "node:path";

pluginBasicSsl({
  outputPath: path.join(__dirname, "node_modules/.cache/cert"),
});
```

### selfsignedAttrs

Attributes passing to `selfsigned`, see [selfsigned](https://github.com/jfromaniello/selfsigned) for details.

- **Type:** `CertificateField[]`
- **Default:**

```ts
const defaultAttrs = [{ name: "commonName", value: "localhost" }];
```

- **Example:**

```ts
pluginBasicSsl({
  selfsignedAttrs: [{ name: "commonName", value: "example.com" }],
});
```

### selfsignedOptions

Options passing to `selfsigned`, see [selfsigned - Options](https://github.com/jfromaniello/selfsigned?tab=readme-ov-file#options) for details.

- **Type:** `SelfsignedOptions`
- **Default:**

```ts
const defaultOptions = {
  days: 30,
  keySize: 2048,
};
```

- **Example:**

```ts
pluginBasicSsl({
  selfsignedOptions: {
    days: 100,
  },
});
```

## License

[MIT](./LICENSE).
npm package: @rsbuild/plugin-css-minimizer
Description: An Rsbuild to customize the CSS minimizer, switch to [cssnano](https://github.com/cssnano/cssnano) or other tools for CSS compression.
Latest version: 1.1.1

# @rsbuild/plugin-css-minimizer

An Rsbuild to customize the CSS minimizer, switch to [cssnano](https://github.com/cssnano/cssnano) or other tools for CSS compression.

`@rsbuild/plugin-css-minimizer` internally integrates [css-minimizer-webpack-plugin](https://github.com/webpack-contrib/css-minimizer-webpack-plugin).

<p>
  <a href="https://npmjs.com/package/@rsbuild/plugin-css-minimizer">
   <img src="https://img.shields.io/npm/v/@rsbuild/plugin-css-minimizer?style=flat-square&colorA=564341&colorB=EDED91" alt="npm version" />
  </a>
  <img src="https://img.shields.io/badge/License-MIT-blue.svg?style=flat-square&colorA=564341&colorB=EDED91" alt="license" />
  <a href="https://npmcharts.com/compare/@rsbuild/plugin-css-minimizer?minimal=true"><img src="https://img.shields.io/npm/dm/@rsbuild/plugin-css-minimizer.svg?style=flat-square&colorA=564341&colorB=EDED91" alt="downloads" /></a>
</p>

## Usage

Install:

```bash
npm add @rsbuild/plugin-css-minimizer -D
```

Add plugin to your `rsbuild.config.ts`:

```ts
// rsbuild.config.ts
import { pluginCssMinimizer } from "@rsbuild/plugin-css-minimizer";

export default {
  plugins: [pluginCssMinimizer()],
};
```

## Options

### pluginOptions

Used to customize the options of css-minimizer-webpack-plugin.

The value of `pluginOptions` will be merged with the default options inside the plugin using `Object.assign` and then passed to the css-minimizer-webpack-plugin. You can refer to the [README documentation](https://github.com/webpack-contrib/css-minimizer-webpack-plugin) of css-minimizer-webpack-plugin to explore all available options.

- **Type:** `Object | Function | undefined`
- **Default:**

```ts
const defaultOptions = {
  minify: CssMinimizerWebpackPlugin.cssnanoMinify,
  minimizerOptions: {
    preset: [
      "default",
      {
        mergeLonghand: false,
      },
    ],
  },
};
```

- **Example 1:** modify the `preset` configuration of [cssnano](https://github.com/cssnano/cssnano).

```js
pluginCssMinimizer({
  pluginOptions: {
    minimizerOptions: {
      preset: require.resolve("cssnano-preset-simple"),
    },
  },
});
```

- **Example 2:** pass a function to modify the default options.

```js
pluginCssMinimizer({
  pluginOptions: (options) => {
    options.minimizerOptions = {
      preset: require.resolve("cssnano-preset-simple"),
    };
  },
});
```

- **Example 3:** Switch to other tools for CSS minification.

```js
import {
  pluginCssMinimizer,
  CssMinimizerWebpackPlugin,
} from '@rsbuild/plugin-css-minimizer';

pluginCssMinimizer({
  pluginOptions: {
    minify: CssMinimizerWebpackPlugin.cleanCssMinify,
    minimizerOptions: {
      level: {
        1: {
          roundingPrecision: "all=3,px=5",
        },
      },
    },
  },
}),
```

## License

[MIT](./LICENSE).
npm package: @rsbuild/plugin-esbuild
Description: Esbuild plugin for Rsbuild
Latest version: 0.6.3
Deprecated: deprecated

<p align="center">
  <a href="https://rsbuild.dev" target="blank"><img src="https://github.com/web-infra-dev/rsbuild/assets/7237365/84abc13e-b620-468f-a90b-dbf28e7e9427" alt="Rsbuild Logo" /></a>
</p>

# Rsbuild

The Rspack-based build tool. It's fast, out-of-the-box and extensible.

## Documentation

https://rsbuild.dev/

## Contributing

Please read the [Contributing Guide](https://github.com/web-infra-dev/rsbuild/blob/main/CONTRIBUTING.md).

## License

Rsbuild is [MIT licensed](https://github.com/web-infra-dev/rsbuild/blob/main/LICENSE).
npm package: @rsbuild/plugin-less
Description: Less plugin for Rsbuild
Latest version: 1.6.2

# @rsbuild/plugin-less

An Rsbuild plugin to use Less as the CSS preprocessor.

<p>
  <a href="https://npmjs.com/package/@rsbuild/plugin-less">
   <img src="https://img.shields.io/npm/v/@rsbuild/plugin-less?style=flat-square&colorA=564341&colorB=EDED91" alt="npm version" />
  </a>
  <img src="https://img.shields.io/badge/License-MIT-blue.svg?style=flat-square&colorA=564341&colorB=EDED91" alt="license" />
  <a href="https://npmcharts.com/compare/@rsbuild/plugin-less"><img src="https://img.shields.io/npm/dm/@rsbuild/plugin-less.svg?style=flat-square&colorA=564341&colorB=EDED91" alt="downloads" /></a>
</p>

## Documentation

See [Documentation](https://rsbuild.rs/plugins/list/plugin-less).

## License

[MIT](https://github.com/web-infra-dev/rsbuild/blob/main/LICENSE).
npm package: @rsbuild/plugin-lightningcss
Description: lightningcss for Rsbuild
Latest version: 1.0.1-beta.6
Deprecated: deprecated, Lightning CSS has been built into @rsbuild/core

<p align="center">
  <a href="https://rsbuild.dev" target="blank"><img src="https://github.com/web-infra-dev/rsbuild/assets/7237365/84abc13e-b620-468f-a90b-dbf28e7e9427" alt="Rsbuild Logo" /></a>
</p>

# Rsbuild

The Rspack-based build tool. It's fast, out-of-the-box and extensible.

## Documentation

https://rsbuild.dev/

## Contributing

Please read the [Contributing Guide](https://github.com/web-infra-dev/rsbuild/blob/main/CONTRIBUTING.md).

## License

Rsbuild is [MIT licensed](https://github.com/web-infra-dev/rsbuild/blob/main/LICENSE).
npm package: @rsbuild/plugin-mdx
Description: An Rsbuild plugin to provide support for [MDX](https://github.com/mdx-js/mdx/).
Latest version: 1.1.1

# @rsbuild/plugin-mdx

An Rsbuild plugin to provide support for [MDX](https://github.com/mdx-js/mdx/).

MDX lets you use JSX in your markdown content. You can import components, such as interactive charts or alerts, and embed them within your content. This makes writing long-form content with components a blast.

<p>
  <a href="https://npmjs.com/package/@rsbuild/plugin-mdx">
   <img src="https://img.shields.io/npm/v/@rsbuild/plugin-mdx?style=flat-square&colorA=564341&colorB=EDED91" alt="npm version" />
  </a>
  <img src="https://img.shields.io/badge/License-MIT-blue.svg?style=flat-square&colorA=564341&colorB=EDED91" alt="license" />
</p>

## Usage

Install:

```bash
npm add @rsbuild/plugin-mdx -D
```

Add plugin to your `rsbuild.config.ts`:

```ts
// rsbuild.config.ts
import { pluginMdx } from "@rsbuild/plugin-mdx";

export default {
  plugins: [pluginMdx()],
};
```

After registering the plugin, you can import `.mdx` or `.md` files as components in your code.

## Options

If you need to customize the compilation behavior of MDX, you can use the following configs.

### mdxLoaderOptions

Options passed to `@mdx-js/loader`, please refer to [@mdx-js/loader documentation](https://www.npmjs.com/package/@mdx-js/loader) for detailed usage.

- **Type:** `MdxLoaderOptions`
- **Default:** `{}`
- **Example:**

```ts
pluginMdx({
  mdxLoaderOptions: {
    // Use Vue JSX
    jsxImportSource: "vue",
  },
});
```

### extensions

Specify the file extensions to be compiled with MDX loader, including .md files and .mdx files by default.

- **Type:** `string[]`
- **Default:** `['.mdx', '.md']`

For example, to only compile .mdx files, you can set it as:

```ts
pluginMdx({
  extensions: [".mdx"],
});
```

## Type Declarations

In a TypeScript project, you need to add type definitions for `*.mdx` files so that TypeScript can recognize them correctly.

Create `env.d.ts` in the `src` directory and add the following content:

```ts title="src/env.d.ts"
declare module "*.md" {
  let MDXComponent: () => JSX.Element;
  export default MDXComponent;
}
declare module "*.mdx" {
  let MDXComponent: () => JSX.Element;
  export default MDXComponent;
}
```

## License

[MIT](./LICENSE).
npm package: @rsbuild/plugin-preact
Description: Preact plugin for Rsbuild
Latest version: 1.7.2

# @rsbuild/plugin-preact

An Rsbuild plugin to provide support for Preact.

<p>
  <a href="https://npmjs.com/package/@rsbuild/plugin-preact">
   <img src="https://img.shields.io/npm/v/@rsbuild/plugin-preact?style=flat-square&colorA=564341&colorB=EDED91" alt="npm version" />
  </a>
  <img src="https://img.shields.io/badge/License-MIT-blue.svg?style=flat-square&colorA=564341&colorB=EDED91" alt="license" />
  <a href="https://npmcharts.com/compare/@rsbuild/plugin-preact"><img src="https://img.shields.io/npm/dm/@rsbuild/plugin-preact.svg?style=flat-square&colorA=564341&colorB=EDED91" alt="downloads" /></a>
</p>

## Documentation

See [Documentation](https://rsbuild.rs/plugins/list/plugin-preact).

## License

[MIT](https://github.com/web-infra-dev/rsbuild/blob/main/LICENSE).
npm package: @rsbuild/plugin-pug
Description: An Rsbuild plugin to provide support for the Pug template engine.
Latest version: 1.3.2

# @rsbuild/plugin-pug

An Rsbuild plugin to provide support for the Pug template engine.

> [Pug](https://github.com/pugjs/pug) is a robust, elegant, feature rich template engine for Node.js.

<p>
  <a href="https://npmjs.com/package/@rsbuild/plugin-pug">
   <img src="https://img.shields.io/npm/v/@rsbuild/plugin-pug?style=flat-square&colorA=564341&colorB=EDED91" alt="npm version" />
  </a>
  <img src="https://img.shields.io/badge/License-MIT-blue.svg?style=flat-square&colorA=564341&colorB=EDED91" alt="license" />
</p>

## Usage

Install:

```bash
npm add @rsbuild/plugin-pug -D
```

Add plugin to your `rsbuild.config.ts`:

```ts
// rsbuild.config.ts
import { pluginPug } from "@rsbuild/plugin-pug";

export default {
  plugins: [pluginPug()],
};
```

### Using Pug Templates

After the plugin registration is completed, Rsbuild will automatically parse template files with the `.pug` extension and compile them using the Pug template engine.

For example, first create a `src/index.pug` file, and point to that file using `html.template`:

```ts title="rsbuild.config.ts"
export default {
  html: {
    template: "./src/index.pug",
  },
};
```

Then, you can use Pug syntax in the `index.pug` template:

```html
<!-- Input -->
p Hello #{text}!

<!-- Output -->
<p>Hello World!</p>
```

Please refer to the [Pug documentation](https://github.com/pugjs/pug) for a complete understanding of Pug's usage.

### Using in Vue

When using Vue, you can use Pug syntax in the template of `.vue` files:

```vue title="App.vue"
<template lang="pug">
button.my-button(@click='count++') Count is: {{ count }}
</template>

<script>
import { ref } from "vue";

export default {
  setup() {
    const count = ref(0);

    return {
      count,
    };
  },
};
</script>
```

## Options

### pugOptions

Used to set the compilation options for Pug. For detailed options, please refer to the [Pug API Reference](https://pugjs.org/api/reference.html#options).

- **Type:** `Object | Function | undefined`
- **Default:**

```ts
const defaultOptions = {
  doctype: "html",
  compileDebug: false,
};
```

- **Example 1:** Pass in a configuration object that will be merged with the default options using `Object.assign`.

```ts
pluginPug({
  pugOptions: {
    doctype: "xml",
  },
});
```

- **Example 2:** Pass in a configuration function. The default configuration will be passed as the first argument, and you can directly modify the configuration object or return a value as the final result.

```ts
pluginPug({
  pugOptions(config) {
    config.doctype = "xml";
  },
});
```

## License

[MIT](./LICENSE).
npm package: @rsbuild/plugin-sass
Description: Sass plugin for Rsbuild
Latest version: 1.5.1

# @rsbuild/plugin-sass

An Rsbuild plugin to use Sass as the CSS preprocessor.

<p>
  <a href="https://npmjs.com/package/@rsbuild/plugin-sass">
   <img src="https://img.shields.io/npm/v/@rsbuild/plugin-sass?style=flat-square&colorA=564341&colorB=EDED91" alt="npm version" />
  </a>
  <img src="https://img.shields.io/badge/License-MIT-blue.svg?style=flat-square&colorA=564341&colorB=EDED91" alt="license" />
  <a href="https://npmcharts.com/compare/@rsbuild/plugin-sass"><img src="https://img.shields.io/npm/dm/@rsbuild/plugin-sass.svg?style=flat-square&colorA=564341&colorB=EDED91" alt="downloads" /></a>
</p>

## Documentation

See [Documentation](https://rsbuild.rs/plugins/list/plugin-sass).

## License

[MIT](https://github.com/web-infra-dev/rsbuild/blob/main/LICENSE).
npm package: @rsbuild/plugin-solid
Description: Solid plugin for Rsbuild
Latest version: 1.1.1

# @rsbuild/plugin-solid

An Rsbuild plugin to provide support for Solid.

<p>
  <a href="https://npmjs.com/package/@rsbuild/plugin-solid">
   <img src="https://img.shields.io/npm/v/@rsbuild/plugin-solid?style=flat-square&colorA=564341&colorB=EDED91" alt="npm version" />
  </a>
  <img src="https://img.shields.io/badge/License-MIT-blue.svg?style=flat-square&colorA=564341&colorB=EDED91" alt="license" />
  <a href="https://npmcharts.com/compare/@rsbuild/plugin-solid"><img src="https://img.shields.io/npm/dm/@rsbuild/plugin-solid.svg?style=flat-square&colorA=564341&colorB=EDED91" alt="downloads" /></a>
</p>

## Documentation

See [Documentation](https://rsbuild.rs/plugins/list/plugin-solid).

## License

[MIT](https://github.com/web-infra-dev/rsbuild/blob/main/LICENSE).
npm package: @rsbuild/plugin-stylus
Description: Stylus plugin for Rsbuild
Latest version: 1.3.1

# @rsbuild/plugin-stylus

An Rsbuild plugin to use Stylus as the CSS preprocessor.

<p>
  <a href="https://npmjs.com/package/@rsbuild/plugin-stylus">
   <img src="https://img.shields.io/npm/v/@rsbuild/plugin-stylus?style=flat-square&colorA=564341&colorB=EDED91" alt="npm version" />
  </a>
  <img src="https://img.shields.io/badge/License-MIT-blue.svg?style=flat-square&colorA=564341&colorB=EDED91" alt="license" />
  <a href="https://npmcharts.com/compare/@rsbuild/plugin-stylus"><img src="https://img.shields.io/npm/dm/@rsbuild/plugin-stylus.svg?style=flat-square&colorA=564341&colorB=EDED91" alt="downloads" /></a>
</p>

## Documentation

See [Documentation](https://rsbuild.rs/plugins/list/plugin-stylus).

## License

[MIT](https://github.com/web-infra-dev/rsbuild/blob/main/LICENSE).
npm package: @rsbuild/plugin-svelte
Description: Svelte plugin for Rsbuild
Latest version: 1.1.1

# @rsbuild/plugin-svelte

An Rsbuild plugin to provide support for Svelte.

<p>
  <a href="https://npmjs.com/package/@rsbuild/plugin-svelte">
   <img src="https://img.shields.io/npm/v/@rsbuild/plugin-svelte?style=flat-square&colorA=564341&colorB=EDED91" alt="npm version" />
  </a>
  <img src="https://img.shields.io/badge/License-MIT-blue.svg?style=flat-square&colorA=564341&colorB=EDED91" alt="license" />
  <a href="https://npmcharts.com/compare/@rsbuild/plugin-svelte"><img src="https://img.shields.io/npm/dm/@rsbuild/plugin-svelte.svg?style=flat-square&colorA=564341&colorB=EDED91" alt="downloads" /></a>
</p>

## Documentation

See [Documentation](https://rsbuild.rs/plugins/list/plugin-svelte).

## License

[MIT](https://github.com/web-infra-dev/rsbuild/blob/main/LICENSE).
npm package: @rsbuild/plugin-swc
Description: SWC plugin for Rsbuild
Latest version: 1.0.1-rc.5
Deprecated: deprecated, use @rsbuild/plugin-webpack-swc instead

<p align="center">
  <a href="https://rsbuild.dev" target="blank"><img src="https://github.com/web-infra-dev/rsbuild/assets/7237365/84abc13e-b620-468f-a90b-dbf28e7e9427" alt="Rsbuild Logo" /></a>
</p>

# Rsbuild

The Rspack-based build tool. It's fast, out-of-the-box and extensible.

## Documentation

https://rsbuild.dev/

## Contributing

Please read the [Contributing Guide](https://github.com/web-infra-dev/rsbuild/blob/main/CONTRIBUTING.md).

## License

Rsbuild is [MIT licensed](https://github.com/web-infra-dev/rsbuild/blob/main/LICENSE).
npm package: @rsbuild/plugin-toml
Description: An Rsbuild plugin to import TOML files and convert them to JavaScript objects.
Latest version: 1.1.2

# @rsbuild/plugin-toml

An Rsbuild plugin to import TOML files and convert them to JavaScript objects.

> [TOML](https://toml.io/) is a semantically explicit, easy-to-read configuration file format.

<p>
  <a href="https://npmjs.com/package/@rsbuild/plugin-toml">
   <img src="https://img.shields.io/npm/v/@rsbuild/plugin-toml?style=flat-square&colorA=564341&colorB=EDED91" alt="npm version" />
  </a>
  <img src="https://img.shields.io/badge/License-MIT-blue.svg?style=flat-square&colorA=564341&colorB=EDED91" alt="license" />
</p>

## Usage

Install:

```bash
npm add @rsbuild/plugin-toml -D
```

Add plugin to your `rsbuild.config.ts`:

```ts
// rsbuild.config.ts
import { pluginToml } from "@rsbuild/plugin-toml";

export default {
  plugins: [pluginToml()],
};
```

## Example

Suppose the project has the following code in `example.toml`:

```toml title="example.toml"
hello = "world"

[foo]
bar = "baz"
```

After using the TOML plugin, you can reference it as follows:

```js
import example from "./example.toml";

console.log(example.hello); // 'world';
console.log(example.foo); // { bar: 'baz' };
```

## Options

### esModule

By default, `@rsbuild/plugin-toml` generates JS modules that use the ES modules syntax. If you want to generate a CommonJS module, you can set the `esModule` option to `false`.

- Type: `boolean`
- Default: `true`
- Example:

```js
pluginToml({
  esModule: false,
});
```

## Type Declaration

When you import TOML files in TypeScript code, please create a `src/env.d.ts` file in your project and add the type declarations.

```ts title="src/env.d.ts"
declare module "*.toml" {
  const content: Record<string, any>;
  export default content;
}
```

## License

[MIT](./LICENSE).
npm package: @rsbuild/plugin-vue
Description: Vue 3 plugin of Rsbuild
Latest version: 1.2.7

# @rsbuild/plugin-vue

An Rsbuild plugin to provide support for Vue 3.

<p>
  <a href="https://npmjs.com/package/@rsbuild/plugin-vue">
   <img src="https://img.shields.io/npm/v/@rsbuild/plugin-vue?style=flat-square&colorA=564341&colorB=EDED91" alt="npm version" />
  </a>
  <img src="https://img.shields.io/badge/License-MIT-blue.svg?style=flat-square&colorA=564341&colorB=EDED91" alt="license" />
  <a href="https://npmcharts.com/compare/@rsbuild/plugin-vue"><img src="https://img.shields.io/npm/dm/@rsbuild/plugin-vue.svg?style=flat-square&colorA=564341&colorB=EDED91" alt="downloads" /></a>
</p>

## Documentation

See [Documentation](https://rsbuild.rs/plugins/list/plugin-vue).

## License

[MIT](https://github.com/web-infra-dev/rsbuild/blob/main/LICENSE).
npm package: @rsbuild/plugin-vue2
Description: Provides support for Vue 2 SFC (Single File Components). The plugin internally integrates [vue-loader](https://vue-loader.vuejs.org/) v15.
Latest version: 1.1.1

# @rsbuild/plugin-vue2

Provides support for Vue 2 SFC (Single File Components). The plugin internally integrates [vue-loader](https://vue-loader.vuejs.org/) v15.

> @rsbuild/plugin-vue2 only supports Vue >= 2.7.0.

<p>
  <a href="https://npmjs.com/package/@rsbuild/plugin-vue2">
   <img src="https://img.shields.io/npm/v/@rsbuild/plugin-vue2?style=flat-square&colorA=564341&colorB=EDED91" alt="npm version" />
  </a>
  <img src="https://img.shields.io/badge/License-MIT-blue.svg?style=flat-square&colorA=564341&colorB=EDED91" alt="license" />
</p>

## Usage

Install:

```bash
npm add @rsbuild/plugin-vue2 -D
```

Add plugin to your `rsbuild.config.ts`:

```ts
// rsbuild.config.ts
import { pluginVue2 } from "@rsbuild/plugin-vue2";

export default {
  plugins: [pluginVue2()],
};
```

After registering the plugin, you can import `*.vue` files in your code.

## Options

If you need to customize the compilation behavior of Vue, you can use the following configs.

### vueLoaderOptions

Options passed to `vue-loader`, please refer to the [vue-loader documentation](https://vue-loader.vuejs.org/) for detailed usage.

- **Type:** `VueLoaderOptions`
- **Default:**

```js
const defaultOptions = {
  compilerOptions: {
    whitespace: "condense",
  },
  experimentalInlineMatchResource: true,
};
```

- **Example:**

```ts
pluginVue2({
  vueLoaderOptions: {
    hotReload: false,
  },
});
```

> The Vue 2 plugin is using the `vue-loader` v15. Please be aware that there may be configuration differences between v15 and the latest version.

### splitChunks

When [chunkSplit.strategy](/config/performance/chunk-split) set to `split-by-experience`, Rsbuild will automatically split `vue` and `router` related packages into separate chunks by default:

- `lib-vue.js`: includes vue, vue-loader.
- `lib-router.js`: includes vue-router.

This option is used to control this behavior and determine whether the `vue` and `router` related packages need to be split into separate chunks.

- **Type:**

```ts
type SplitVueChunkOptions = {
  vue?: boolean;
  router?: boolean;
};
```

- **Default:**

```ts
const defaultOptions = {
  vue: true,
  router: true,
};
```

- **Example:**

```ts
pluginVue({
  splitChunks: {
    vue: false,
    router: false,
  },
});
```

## FAQ

### /deep/ selector causes compilation error

`/deep/` is a deprecated usage as of Vue v2.7. Since it is not a valid CSS syntax, CSS compilation tools like Lightning CSS will fail to compile it.

You can use `:deep()` instead. See [Vue - Deep Selectors](https://vuejs.org/api/sfc-css-features.html#deep-selectors) for more details.

```html
<style scoped>
  .a :deep(.b) {
    /* ... */
  }
</style>
```

> You can also refer to [Vue - RFC 0023](https://github.com/vuejs/rfcs/blob/master/active-rfcs/0023-scoped-styles-changes.md) for more details.

## License

[MIT](./LICENSE).
npm package: @rsbuild/plugin-vue2-jsx
Description: Provides support for Vue 2 JSX / TSX syntax. The plugin internally integrates [@vue/babel-preset-jsx](https://github.com/vuejs/jsx-vue2).
Latest version: 1.0.5

# @rsbuild/plugin-vue2-jsx

Provides support for Vue 2 JSX / TSX syntax. The plugin internally integrates [@vue/babel-preset-jsx](https://github.com/vuejs/jsx-vue2).

<p>
  <a href="https://npmjs.com/package/@rsbuild/plugin-vue2-jsx">
   <img src="https://img.shields.io/npm/v/@rsbuild/plugin-vue2-jsx?style=flat-square&colorA=564341&colorB=EDED91" alt="npm version" />
  </a>
  <img src="https://img.shields.io/badge/License-MIT-blue.svg?style=flat-square&colorA=564341&colorB=EDED91" alt="license" />
</p>

## Usage

Install:

```bash
npm add @rsbuild/plugin-vue2-jsx -D
```

Add plugin to your `rsbuild.config.ts`:

```ts
// rsbuild.config.ts
import { pluginBabel } from "@rsbuild/plugin-babel";
import { pluginVue2 } from "@rsbuild/plugin-vue2";
import { pluginVue2Jsx } from "@rsbuild/plugin-vue2-jsx";

export default {
  plugins: [
    pluginBabel({
      include: /\.(?:jsx|tsx)$/,
    }),
    pluginVue2(),
    pluginVue2Jsx(),
  ],
};
```

Since the Vue JSX plugin relies on Babel for compilation, you need to additionally add the [@rsbuild/plugin-babel](https://www.npmjs.com/package/@rsbuild/plugin-babel).

Babel compilation will introduce extra overhead, in the example above, we use `include` to match `.jsx` and `.tsx` files, thereby reducing the performance cost brought by Babel.

After registering the plugin, you can use Vue's [JSX / TSX syntax](https://github.com/vuejs/jsx-vue2) in `.jsx`, `.tsx`, and `.vue` files.

## Vue SFC

When using JSX in Vue SFC, you need to add `lang="jsx"` or `lang="tsx"` to the `<script>` tag.

- JSX:

```html title="App.vue"
<script lang="jsx">
  const vnode = <div>hello</div>;
</script>
```

- TSX:

```html title="App.vue"
<script lang="tsx">
  const vnode = <div>hello</div>;
</script>
```

## Options

If you need to customize the compilation behavior of Vue JSX, you can use the following configs.

### vueJsxOptions

Options passed to `@vue/babel-preset-jsx`, please refer to the [@vue/babel-preset-jsx documentation](https://github.com/vuejs/jsx-vue2) for detailed usage.

- **Type:**

```ts
type VueJSXPresetOptions = {
  compositionAPI?: boolean | string;
  functional?: boolean;
  injectH?: boolean;
  vModel?: boolean;
  vOn?: boolean;
};
```

- **Default:**

```ts
const defaultOptions = {
  injectH: true,
};
```

- **Example:**

```ts
pluginVue2Jsx({
  vueJsxOptions: {
    injectH: false,
  },
});
```

## License

[MIT](./LICENSE).
npm package: @rsbuild/plugin-webpack-swc
Description: SWC plugin for Rsbuild webpack provider
Latest version: 1.1.2
Deprecated: No longer maintained. Use Rspack instead.

# @rsbuild/plugin-webpack-swc

An Rsbuild plugin to use SWC as the JavaScript compiler with `@rsbuild/webpack`.

<p>
  <a href="https://npmjs.com/package/@rsbuild/plugin-webpack-swc">
   <img src="https://img.shields.io/npm/v/@rsbuild/plugin-webpack-swc?style=flat-square&colorA=564341&colorB=EDED91" alt="npm version" />
  </a>
  <img src="https://img.shields.io/badge/License-MIT-blue.svg?style=flat-square&colorA=564341&colorB=EDED91" alt="license" />
  <a href="https://npmcharts.com/compare/@rsbuild/plugin-webpack-swc?minimal=true"><img src="https://img.shields.io/npm/dm/@rsbuild/plugin-webpack-swc.svg?style=flat-square&colorA=564341&colorB=EDED91" alt="downloads" /></a>
</p>

## Documentation

See [Documentation](https://rsbuild.rs).

## License

[MIT](https://github.com/web-infra-dev/rsbuild/blob/main/LICENSE).
npm package: @rsbuild/plugin-yaml
Description: Import YAML files and convert them into JavaScript objects.
Latest version: 1.0.4

# @rsbuild/plugin-yaml

Import YAML files and convert them into JavaScript objects.

> [YAML](https://yaml.org/) is a data serialization language commonly used for writing configuration files.

<p>
  <a href="https://npmjs.com/package/@rsbuild/plugin-yaml">
   <img src="https://img.shields.io/npm/v/@rsbuild/plugin-yaml?style=flat-square&colorA=564341&colorB=EDED91" alt="npm version" />
  </a>
  <img src="https://img.shields.io/badge/License-MIT-blue.svg?style=flat-square&colorA=564341&colorB=EDED91" alt="license" />
</p>

## Usage

Install:

```bash
npm add @rsbuild/plugin-yaml -D
```

Add plugin to your `rsbuild.config.ts`:

```ts
// rsbuild.config.ts
import { pluginYaml } from "@rsbuild/plugin-yaml";

export default {
  plugins: [pluginYaml()],
};
```

## Example

Suppose the project has the following code in `example.yaml`:

```yaml title="example.yaml"
hello = "world"

[foo]
bar = "baz"
```

After using the YAML plugin, you can reference it as follows:

```js
import example from "./example.yaml";

console.log(example.hello); // 'world';
console.log(example.foo); // { bar: 'baz' };
```

## Type Declaration

When you import YAML files in TypeScript code, please create a `src/env.d.ts` file in your project and add the corresponding type declarations.

```ts
declare module "*.yml" {
  const content: Record<string, any>;
  export default content;
}
declare module "*.yaml" {
  const content: Record<string, any>;
  export default content;
}
```

## License

[MIT](./LICENSE).
npm package: @rsbuild/test-helper
Description: The vitest helpers of Rsbuild.
Latest version: 0.3.0

<p align="center">
  <a href="https://rsbuild.dev" target="blank"><img src="https://github.com/web-infra-dev/rsbuild/assets/7237365/84abc13e-b620-468f-a90b-dbf28e7e9427" alt="Rsbuild Logo" /></a>
</p>

# Rsbuild

The Rspack-based build tool. It's fast, out-of-the-box and extensible.

## Documentation

https://rsbuild.dev/

## Contributing

Please read the [Contributing Guide](https://github.com/web-infra-dev/rsbuild/blob/main/CONTRIBUTING.md).

## License

Rsbuild is [MIT licensed](https://github.com/web-infra-dev/rsbuild/blob/main/LICENSE).
npm package: @rsbuild/webpack
Description: This package can be used to switch Rsbuild's bundler from Rspack to webpack.
Latest version: 1.7.0

# @rsbuild/webpack

This package can be used to switch Rsbuild's bundler from Rspack to webpack.

<p>
  <a href="https://npmjs.com/package/@rsbuild/webpack">
   <img src="https://img.shields.io/npm/v/@rsbuild/webpack?style=flat-square&colorA=564341&colorB=EDED91" alt="npm version" />
  </a>
  <img src="https://img.shields.io/badge/License-MIT-blue.svg?style=flat-square&colorA=564341&colorB=EDED91" alt="license" />
  <a href="https://npmcharts.com/compare/@rsbuild/webpack"><img src="https://img.shields.io/npm/dm/@rsbuild/webpack.svg?style=flat-square&colorA=564341&colorB=EDED91" alt="downloads" /></a>
</p>

> Note that this package is mainly used for compatibility with Modern.js and Rsbuild internal testing. We do not recommend you to use this package in a Rsbuild project. The API of the current package may change over iterations.

## Usage

```ts
import { defineConfig } from '@rsbuild/core';
import { webpackProvider } from '@rsbuild/webpack';
import { pluginSwc } from '@rsbuild/plugin-webpack-swc';

export default defineConfig({
  provider: webpackProvider,
  plugins: [
    // @rsbuild/webpack has no built-in transformer and minimizer,
    // so you need to register the @rsbuild/plugin-webpack-swc.
    pluginSwc(),
  ],
});
```

> Note that some Rsbuild plugins cannot be used with the webpack provider.

## Documentation

See [Documentation](https://rsbuild.rs).

## License

[MIT](https://github.com/web-infra-dev/rsbuild/blob/main/LICENSE).
npm package: @rsc-labs/medusa-products-bought-together-v2
Description: Monitor and get products which are bought together
Author: RSC Labs
Latest version: 0.0.3


<h1 align="center">
  Medusa Products Bought Together v2
</h1>

Medusa "Products Bought Together" is a plugin which monitors and provides API for getting products which are frequently bought together.

### Why?

When customer wants to buy product A, he can get information about other products which are frequently bought together with product A.

It is a common scenario for ecommerce, which leds to increasing sales by recommending such products to customers.

## How it works?

When customer places new order, plugin takes information about all products in order and creates entries in database. If there is already existing pair of products (because they were bought together before), then it increases its ranking. In a result, there is a stored information about relations between products and how frequently they are bought together.

## Install plugin

1. Install plugin by adding to your `package.json`:

```json
...
"@rsc-labs/medusa-products-bought-together-v2": "0.0.1" // or other available version
...
```
and execute install, e.g. `yarn install`.

2. Add plugin to your `medusa-config.js`:

```js
...
plugins: [
    {
      resolve: "@rsc-labs/medusa-products-bought-together-v2",
      options: {}
    }
]
...
```
3. Run migrations, e.g. `npx medusa db:migrate`

## How can I use it?

When you install a plugin, monitoring is being done automatically.

To use it, you can use API described below:

```yaml
openapi: 3.0.0
info:
  title:  API
  description: API for plugin
  version: 0.0.1
paths:
  /store/products-bought-together/{productId}:
    get:
      summary: List of products
      description: Returns a list of products which are bought together with {productId}
      parameters:
        - name: productId
          in: path
          description: ID of product for which you are looking for other products
          required: true
          schema:
            type: string
      responses:
        '200':
          description: productId passed in URL. Returns empty array if cannot be found in database.
          content:
            application/json:
              schema: 
                type: array
                items:
                  type: object
                  properties:
                    productId1:
                      type: string
                    productId2:
                      type: string
                    frequency:
                      type: number
        '404':
          description: productId not passed in URL
```

For example:

Request:
```https://localhost:9000/store/products-bought-together/prod_1123123123```

Response:
```json
[
    {
        "productId1": "prod_1123123123",
        "productId2": "prod_2223432432423",
        "frequency": 10
    },
    {
        "productId1": "prod_1123123123",
        "productId2": "prod_334343434343",
        "frequency": 4
    }
]
```

## Contribution

Contributions are welcome and they are greatly appreciated!

## License

MIT

---

© 2025 RSC https://rsoftcon.com/
npm package: @rsc-labs/medusa-shippo-elements
Description: Plugin for using Shippo Elements to create shipping labels directly from admin dashboard
Author: RSC Labs
Latest version: 0.1.1

# Medusa Shippo Elements

## What is it?

Medusa Shippo Elements is a plugin which provides functionality for generating labels directly from the Admin UI.

## How to install?

1. Install the package with `yarn add @rsc-labs/medusa-shippo-elements` or `npm i @rsc-labs/medusa-shippo-elements`.
2. In `medusa-config.js`, add the plugin to the `plugins` array and set `enableUI`

```js
const plugins = [
  // ... other plugins
  {
    resolve: `@rsc-labs/medusa-shippo-elements`,
    options: {
      token: SHIPPO_API_TOKEN,
      enableUI: true
    }
  }
]
```

## Getting started

Before running a Medusa please remember to set your `SHIPPO_API_TOKEN`  in configuration.

After plugin installation, you can go to one of your orders and you will see additional UI element at the bottom.

You have there two tabs - `Shipping` and `Return`.

<picture>
  <img alt="Shippo fulfillment" src="./docs/shippo-fulfillment.PNG">
</picture>

### Shipping

This tab is used for creating a shipping label to send your items to customer. 

Before that, you need to create a fulfillment using `Create fulfillment` option, which is visible above (it is a part of default Admin UI functionalities).

<picture>
  <img alt="Create fulfillment" src="./docs/create-fulfillment.PNG">
</picture>

After creating a fulfillment, you can choose such fulfillment from the list and the label configuration will be automatically filled by the items which you have chosen in fulfillment. For your convenience, also the weight is calculated, so you have all information needed to generate a label.

<picture>
  <img alt="Shippo label" src="./docs/shipping-label.PNG">
</picture>

### Return

This tab is used for creating a return label which can be used by your customer.

Before that, you need to create a return using `Create return` option, which is available on the right sidebar (it is a part of default Admin UI functionalities).

After creating a return, you can choose such return from the list and the label configuration will be automatically filled. 

**_NOTE:_**
Shippo Elements does not provide ability to change sender address from API level. It means that you need to do manually through Shippo Elements. Please remember to switch addresses for the returns.

## Configuration

### Weight unit

By default Shippo Elements are using `g` (`Gram`) as the weight unit. If you would like to change it, you have 4 options:
- 'g'
- 'kg'
- 'oz'
- 'lb'

To apply other weight unit, please export environment variable called `MEDUSA_ADMIN_SHIPPO_WEIGHT_UNIT`. For example: `export MEDUSA_ADMIN_SHIPPO_WEIGHT_UNIT='oz'`

## Proposals, bugs, improvements

If you have an idea, what could be the next highest priority functionality, do not hesistate raise issue here: [Github issues](https://github.com/RSC-Labs/medusa-shippo-elements/issues)

## License

MIT

---

© 2024 RSC https://rsoftcon.com/